arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.07022cs.LGcs.AIcs.CR

AlphaSteer: 通过原理性零空间约束学习拒绝引导

AlphaSteer: Learning Refusal Steering with Principled Null-Space Constraint

National University of Singapore(国立新加坡大学);University of Science and Technology of China(中国科学技术大学);Harbin Institute of Technology(哈尔滨工业大学)

Leheng Sheng, Changshuo Shen, Weixiang Zhao, Junfeng Fang, Xiaohao Liu, Zhenkai Liang, Xiang Wang, An Zhang, Tat-Seng Chua

AI总结:

AlphaSteer 通过原理性零空间约束学习拒绝引导,提升大语言模型的安全性与效用平衡。

摘要:

随着大语言模型(LLMs)在现实世界中的应用日益增加,确保其能够拒绝恶意提示,尤其是 jailbreak 攻击,对于安全可靠地使用 LLMs 是至关重要的。最近,激活引导作为一种增强 LLM 安全性的有效方法,通过在推理过程中将拒绝方向向量添加到 LLMs 的内部激活中,从而进一步诱导 LLMs 的拒绝行为。然而,随意应用激活引导本质上面临着安全与效用之间的权衡,因为相同的引导向量也可能导致过度拒绝并在良性提示上产生性能下降。尽管先前的努力,如向量校准和条件引导,已经尝试缓解这种权衡,但它们缺乏理论基础限制了其稳健性和有效性。为了更好地解决安全与效用之间的权衡,我们提出了一种理论上有根据且经验上有效的激活引导方法,称为 AlphaSteer。具体来说,它将激活引导视为一个可学习的过程,有两个原理性的学习目标:效用保持和安全增强。对于效用保持,它学习构建一个接近零向量以引导良性数据,通过零空间约束。对于安全增强,它学习构建一个拒绝方向向量以引导恶意数据,通过线性回归的帮助。在多个 jailbreak 攻击和效用基准测试中,实验展示了 AlphaSteer 的有效性,显著提高了 LLMs 的安全性,而不会影响通用能力。我们的代码可在 https://github.com/AlphaLab-USTC/AlphaSteer 上获得。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑