arXiv:2602.21346cs.CLcs.AI2026-02被引 1

让大模型学会说‘为什么不能做’,提升对抗恶意指令的能力

Alignment-Weighted DPO: A principled reasoning approach to improve safety alignment

  • 用思维链数据训练模型,使其拒绝有害请求时有逻辑依据
  • 在多个安全基准上显著提升对越狱攻击的抵御能力
  • 适合关注大模型安全性与可解释性的研究者和开发者

近期的对齐技术如监督微调(SFT)、基于人类反馈的强化学习(RLHF)和直接偏好优化(DPO)虽提升了大语言模型(LLM)的安全性,但模型仍易受越狱攻击——通过间接或欺骗性表述隐藏有害意图。我们通过因果干预实证发现,该脆弱性源于缺乏深层推理的浅层对齐机制,模型常在未真正理解危害性的情况下拒绝请求。为此,我们提出通过推理感知的后训练增强对齐。构建并发布一个包含效用导向与安全关键提示的思维链(CoT)微调数据集,其中包含逐步推理过程。在该数据集上微调可促使模型生成基于推理的合理拒绝,优于标准SFT基线。此外,针对CoT微调中的失败模式,引入对齐加权DPO,对推理与最终回答部分分配不同偏好权重,实现更精细、有针对性的更新,显著提升对多样化越狱策略的鲁棒性。在多个安全与效用基准上的实验表明,本方法在保持模型整体实用性的同时,持续提升对齐鲁棒性。

原文摘要 · Abstract (English)

Recent advances in alignment techniques such as Supervised Fine-Tuning (SFT), Reinforcement Learning from Human Feedback (RLHF), and Direct Preference Optimization (DPO) have improved the safety of large language models (LLMs). However, these LLMs remain vulnerable to jailbreak attacks that disguise harmful intent through indirect or deceptive phrasing. Using causal intervention, we empirically demonstrate that this vulnerability stems from shallow alignment mechanisms that lack deep reasoning, often rejecting harmful prompts without truly understanding why they are harmful. To mitigate this vulnerability, we propose enhancing alignment through reasoning-aware post-training. We construct and release a novel Chain-of-Thought (CoT) fine-tuning dataset that includes both utility-oriented and safety-critical prompts with step-by-step rationales. Fine-tuning on this dataset encourages models to produce principled refusals grounded in reasoning, outperforming standard SFT baselines. Furthermore, inspired by failure patterns in CoT fine-tuning, we introduce Alignment-Weighted DPO, which targets the most problematic parts of an output by assigning different preference weights to the reasoning and final-answer segments. This produces finer-grained, targeted updates than vanilla DPO and improves robustness to diverse jailbreak strategies. Extensive experiments across multiple safety and utility benchmarks show that our method consistently improves alignment robustness while maintaining overall model utility.

模型对齐安全防御思维链越狱攻击

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。