arXivDaily arXiv每日学术速递 周一至周五更新
北美退伍军人节(Veterans Day),12 日无更新
arXiv 2602.07892cs.LGcs.CL
收藏

安全对齐作为持续学习:通过正交梯度投影缓解对齐税

Safety Alignment as Continual Learning: Mitigating the Alignment Tax via Orthogonal Gradient Projection

School of Life Sciences, IDG/McGovern Institute for Brain Research(生命科学学院,IDG/麦戈文脑科学研究所);Dept. of Comp. Sci. and Tech., Institute for AI, Tsinghua-Bosch Joint ML Center, THBI Lab, BNRist Center(计算机科学与技术系,人工智能研究所,清华大学-博世联合机器学习中心,THBI实验室,BNRist中心);Tsinghua University, Beijing, China(清华大学,北京,中国)

Guanglong Sun, Siyuan Zhang, Liyuan Wang, Jun Zhu, Hang Su, Yi Zhong

AI总结:

本文通过持续学习视角研究安全对齐与通用能力退化之间的权衡,提出OGPSA方法通过正交梯度投影提升安全性和实用性,实验显示在不同训练流程中显著改善安全-效用权衡。

摘要:

安全预训练可以提高大语言模型的有害性及策略合规性,但可能降低通用效用,这种现象常被称为对齐税。本文通过持续学习视角研究这一权衡:连续对齐阶段使模型暴露于偏移的数据分布和目标,其梯度可能干扰支持先前获得的通用能力的方向。本文提出OGPSA,一种轻量级更新规则,通过从少量通用能力数据的梯度估计低维参考子空间,并从每个安全梯度中移除该子空间中的成分。所得更新是在参考目标的一阶保护约束下,最陡的局部安全下降方向。OGPSA兼容标准预训练流程,避免大规模重放,尽管引入了周期性参考梯度计算。在监督微调(SFT)、直接偏好优化(DPO)及连续SFT→DPO设置中,OGPSA在不同模型上显著改善安全-效用权衡。

英文摘要:

Safety post-training can improve the harmfulness and policy compliance of Large Language Models (LLMs), but it may also reduce general utility, a phenomenon often described as the \emph{alignment tax}. We study this trade-off through the lens of continual learning: sequential alignment stages expose the model to shifted data distributions and objectives, and their gradients may interfere with directions that support previously acquired general capabilities. This view does not claim that all alignment degradation has a single cause; rather, it provides a useful first-order mechanism for mitigating one important source of capability regression. We propose \textbf{O}rthogonal \textbf{G}radient \textbf{P}rojection for \textbf{S}afety \textbf{A}lignment (\textbf{OGPSA}), a lightweight update rule that estimates a low-rank reference subspace from gradients on a small set of general-capability data and removes from each safety gradient the component lying in this subspace. The resulting update is the steepest local safety-descent direction subject to first-order preservation constraints on the reference objectives. OGPSA is compatible with standard post-training pipelines and avoids large-scale replay, although it introduces periodic reference-gradient computation. Across Supervised Fine-Tuning (SFT), Direct Preference Optimization (DPO), and sequential SFT$\rightarrow$DPO settings, OGPSA improves the observed safety--utility trade-off over standard baselines. Under the sequential SFT$\rightarrow$DPO pipeline, the average performance gain increases from 33.98\% to 42.74\% on Qwen2.5-7B-Instruct and from 19.74\% to 32.98\% on Llama3.1-8B-Instruct. We have open sourced our code at https://github.com/SunGL001/OGPSA.

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

↑