arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.09674cs.CLcs.AI
收藏

LLM对齐的隐藏维度:正交安全方向的多维分析

The Hidden Dimensions of LLM Alignment: A Multi-Dimensional Analysis of Orthogonal Safety Directions

Wenbo Pan(温波 Pan);Zhichao Liu(刘志超 Liu);Qiguang Chen(陈启广 Chen);Xiangyang Zhou(周祥阳 Zhou);Haining Yu(于航 Yu);Xiaohua Jia(贾小华 Jia)

Wenbo Pan, Zhichao Liu, Qiguang Chen, Xiangyang Zhou, Haining Yu, Xiaohua Jia

AI总结:

本研究揭示LLM安全对齐由多维正交方向共同控制,主导方向控制拒绝行为,次要方向可被触发词移除以绕过安全能力,提供多维视角理解安全脆弱性。

摘要:

大型语言模型的安全对齐行为,例如拒绝有害查询,可以用激活空间中的线性方向来表示。以往的研究用单一方向建模安全行为,将机制理解限制在孤立的安全特征上。在本工作中,我们发现安全对齐行为由多维方向共同控制。具体而言,我们研究了在Llama 3 8B上进行安全微调以拒绝越狱时表示变化的向量空间。通过研究该空间中的正交方向,我们首先发现一个主导方向控制模型的拒绝行为,而多个较小的方向代表不同且可解释的特征,如假设性叙述和角色扮演。然后,我们测量不同方向如何促进或抑制主导方向,显示次要方向在塑造模型拒绝表示中的重要作用。最后,我们证明在有害查询中移除某些触发词可以缓解这些方向,从而绕过学习到的安全能力,为从多维角度理解安全对齐的脆弱性提供了新的见解。代码和工件可在https://github.com/BMPixel/safety-residual-space获取。

英文摘要:

Large Language Models' safety-aligned behaviors, such as refusing harmful queries, can be represented by linear directions in activation space. Previous research modeled safety behavior with a single direction, limiting mechanistic understanding to an isolated safety feature. In this work, we discover that safety-aligned behavior is jointly controlled by multi-dimensional directions. Namely, we study the vector space of representation shifts during safety fine-tuning on Llama 3 8B for refusing jailbreaks. By studying orthogonal directions in the space, we first find that a dominant direction governs the model's refusal behavior, while multiple smaller directions represent distinct and interpretable features like hypothetical narrative and role-playing. We then measure how different directions promote or suppress the dominant direction, showing the important role of secondary directions in shaping the model's refusal representation. Finally, we demonstrate that removing certain trigger tokens in harmful queries can mitigate these directions to bypass the learned safety capability, providing new insights on understanding safety alignment vulnerability from a multi-dimensional perspective. Code and artifacts are available at https://github.com/BMPixel/safety-residual-space.

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

↑