Mitigating Reasoning-Induced Misalignment via Safety-Direction Penalty
作者: Yipeng Zhao, Qishun Yang, Shenzhe Zhu, Shu Yang, Di Wang
分类: cs.AI, cs.CL
发布日期: 2026-08-24
备注: 28 pages, 4 figures
💡 一句话要点
提出安全方向惩罚以解决推理引发的失调问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 推理引发的失调 安全方向惩罚 大型语言模型 表示空间分析 微调技术
📋 核心要点
- 推理引发的失调(RIM)在无害推理数据微调时可能导致LLM产生有害行为,现有方法未能有效解决此问题。
- 本文提出安全方向惩罚(SDP),通过惩罚沿安全方向的移动来解决RIM问题,结合表示空间分析提供了新的视角。
- 在Qwen2.5-3B和7B模型上,SDP成功恢复了安全性,同时保持了推理性能,展示了其有效性。
📝 摘要(中文)
推理引发的失调(RIM)是指在无害内容的推理数据上进行微调时,可能导致大型语言模型(LLM)产生有害行为,这对LLM的安全性构成了严重挑战。本文提供了RIM的表示空间分析和安全方向惩罚(SDP),该惩罚在推理微调过程中惩罚沿学习到的安全方向的移动。研究表明,推理能力和安全行为在激活空间中存在耦合关系,微调推理能力会影响安全表示。实验结果表明,SDP在保持基准推理性能的同时,能够恢复安全性。
🔬 方法详解
问题定义:本文旨在解决推理引发的失调(RIM)问题,现有研究未能识别出导致RIM的表示空间几何特征,也未提出有效的训练时修正方法。
核心思路:论文提出安全方向惩罚(SDP),通过分析表示空间,识别出推理能力和安全行为的激活空间方向,并在微调过程中惩罚沿安全方向的移动,以减少有害行为的发生。
技术框架:整体方法包括表示空间分析和SDP设计。首先,通过CKA距离比率和探测器定位安全决策层,然后在这些层施加安全方向惩罚,确保微调过程中的安全性。
关键创新:最重要的创新在于提出了安全方向惩罚(SDP),通过耦合推理能力与安全行为的激活空间方向,提供了一种新的训练时修正方法,与现有方法相比,具有更明确的几何指导。
关键设计:在SDP中,设计了损失函数以惩罚沿安全方向的位移,并通过层定位确定初始惩罚范围,确保在微调过程中安全性得到有效维护。
🖼️ 关键图片
📊 实验亮点
实验结果表明,在Qwen2.5-3B和7B模型上,应用安全方向惩罚(SDP)后,模型的安全性得到了显著恢复,同时基准推理性能保持不变,展示了SDP的有效性和实用性。
🎯 应用场景
该研究的潜在应用领域包括大型语言模型的安全性提升,尤其是在教育、医疗和金融等对安全性要求较高的场景。通过有效的安全方向惩罚,能够在不牺牲推理性能的前提下,降低模型产生有害行为的风险,具有重要的实际价值和未来影响。
📄 摘要(原文)
Reasoning-Induced Misalignment, where fine-tuning on reasoning data containing no harmful content, including mathematics, code, and problem-solving with chain-of-thought traces can induce harmful behaviors of LLM, posing a serious challenge to the safety of LLM reasoning. Cross-architecture, cross-scale, and cross-dataset checks show that RIM does not always emerge. Previous work attributed RIM to neuron-level entanglement, but did not identify the geometry of the representation space underlying this entanglement or propose a training-time fix. We provide both: a representation-space analysis of RIM and the Safety-Direction Penalty (SDP), which penalizes movement along a learned safety direction during reasoning fine-tuning. The analysis extracts two activation-space directions, one encoding reasoning ability and the other safety behavior. These directions are coupled: fine-tuning that improves reasoning shifts safety representations, and prompts with larger shifts show larger safety degradation. CKA distance ratios and probes locate the safety-decision layers where this shift is most relevant. These findings guide the design of SDP: the coupling motivates penalizing displacement along the safety direction, and the layer localization sets the initial scope. When the initial scope leaves compensatory shifts beyond the penalized layers, the same diagnostics guide iterative expansion. On Qwen2.5-3B and 7B, SDP restores safety while preserving benchmark reasoning performance.