AlphaSteer: Learning Refusal Steering with Principled Null-Space Constraint

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Sheng, Leheng, Shen, Changshuo, Zhao, Weixiang, Fang, Junfeng, Liu, Xiaohao, Liang, Zhenkai, Wang, Xiang, Zhang, An, Chua, Tat-Seng
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866915782628212736
author Sheng, Leheng
Shen, Changshuo
Zhao, Weixiang
Fang, Junfeng
Liu, Xiaohao
Liang, Zhenkai
Wang, Xiang
Zhang, An
Chua, Tat-Seng
author_facet Sheng, Leheng
Shen, Changshuo
Zhao, Weixiang
Fang, Junfeng
Liu, Xiaohao
Liang, Zhenkai
Wang, Xiang
Zhang, An
Chua, Tat-Seng
contents As LLMs are increasingly deployed in real-world applications, ensuring their ability to refuse malicious prompts, especially jailbreak attacks, is essential for safe and reliable use. Recently, activation steering has emerged as an effective approach for enhancing LLM safety by adding a refusal direction vector to internal activations of LLMs during inference, which will further induce the refusal behaviors of LLMs. However, indiscriminately applying activation steering fundamentally suffers from the trade-off between safety and utility, since the same steering vector can also lead to over-refusal and degraded performance on benign prompts. Although prior efforts, such as vector calibration and conditional steering, have attempted to mitigate this trade-off, their lack of theoretical grounding limits their robustness and effectiveness. To better address the trade-off between safety and utility, we present a theoretically grounded and empirically effective activation steering method called AlphaSteer. Specifically, it considers activation steering as a learnable process with two principled learning objectives: utility preservation and safety enhancement. For utility preservation, it learns to construct a nearly zero vector for steering benign data, with the null-space constraints. For safety enhancement, it learns to construct a refusal direction vector for steering malicious data, with the help of linear regression. Experiments across multiple jailbreak attacks and utility benchmarks demonstrate the effectiveness of AlphaSteer, which significantly improves the safety of LLMs without compromising general capabilities. Our codes are available at https://github.com/AlphaLab-USTC/AlphaSteer.
format Preprint
id arxiv_https___arxiv_org_abs_2506_07022
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle AlphaSteer: Learning Refusal Steering with Principled Null-Space Constraint
Sheng, Leheng
Shen, Changshuo
Zhao, Weixiang
Fang, Junfeng
Liu, Xiaohao
Liang, Zhenkai
Wang, Xiang
Zhang, An
Chua, Tat-Seng
Machine Learning
Artificial Intelligence
Cryptography and Security
As LLMs are increasingly deployed in real-world applications, ensuring their ability to refuse malicious prompts, especially jailbreak attacks, is essential for safe and reliable use. Recently, activation steering has emerged as an effective approach for enhancing LLM safety by adding a refusal direction vector to internal activations of LLMs during inference, which will further induce the refusal behaviors of LLMs. However, indiscriminately applying activation steering fundamentally suffers from the trade-off between safety and utility, since the same steering vector can also lead to over-refusal and degraded performance on benign prompts. Although prior efforts, such as vector calibration and conditional steering, have attempted to mitigate this trade-off, their lack of theoretical grounding limits their robustness and effectiveness. To better address the trade-off between safety and utility, we present a theoretically grounded and empirically effective activation steering method called AlphaSteer. Specifically, it considers activation steering as a learnable process with two principled learning objectives: utility preservation and safety enhancement. For utility preservation, it learns to construct a nearly zero vector for steering benign data, with the null-space constraints. For safety enhancement, it learns to construct a refusal direction vector for steering malicious data, with the help of linear regression. Experiments across multiple jailbreak attacks and utility benchmarks demonstrate the effectiveness of AlphaSteer, which significantly improves the safety of LLMs without compromising general capabilities. Our codes are available at https://github.com/AlphaLab-USTC/AlphaSteer.
title AlphaSteer: Learning Refusal Steering with Principled Null-Space Constraint
topic Machine Learning
Artificial Intelligence
Cryptography and Security
url https://arxiv.org/abs/2506.07022