arXiv:2605.15239cs.LG2026-05被引 2

用自生成数据提升大模型安全对齐,减少对推理能力的损害。

Reducing the Safety Tax in LLM Safety Alignment with On-Policy Self-Distillation

论文配图:Reducing the Safety Tax in LLM Safety Alignment with On-Policy Self-Distillation
图 1 · 摘自论文原文
  • 模型自主生成推理轨迹,通过教师模型提供逐令牌安全监督。
  • 在小模型上安全得分提升最高达8.85分,推理能力损失更少。
  • 适合追求安全与推理平衡的模型训练者,尤其小模型适用。

安全对齐常以牺牲推理能力为代价,称为安全税。传统方法因分布不匹配导致此问题:微调使用人类、外部模型或固定自生成示范,而非模型自身策略采样的轨迹。本文发现离策略训练是另一成因,并提出基于策略自蒸馏的安全对齐方法OPSA。模型自生成轨迹,由一个冻结的教师模型在特权安全上下文条件下提供逐令牌KL监督。教师必须比学生轨迹更安全,因此引入“教师翻转率”——衡量特权上下文将不安全回应转为安全回应的频率,用于寻找激活潜在安全推理的上下文而非仅生成安全表面行为。在两个推理模型家族、五个模型规模下,OPSA在相同数据和全参数微调条件下,优于离策略自蒸馏与外教师蒸馏,小模型增益显著(如R1-Distill-1.5B +8.85,Qwen3-0.6B +5.49),且在不同训练集大小与自适应越狱攻击下仍有效。逐令牌分析显示,更新集中在早期合规决策位置,实现安全提升同时保留通用推理能力。

原文摘要 · Abstract (English)

Safety alignment often improves robustness to harmful queries at the cost of reasoning ability, a tradeoff known as the safety tax. A common cause is distributional mismatch: supervised fine-tuning trains the target model on safety demonstrations produced by humans, external models, or fixed self-generated traces, rather than on trajectories sampled from its own policy. We identify off-policy training mismatch as a second source of this tax and study on-policy self-distillation for safety alignment, which we call OPSA. The model generates its own rollouts and receives dense per-token KL supervision from a frozen teacher copy of itself conditioned on a privileged safety context. Because this teacher must be safer than the sampled student trajectory, we introduce \emph{teacher flip rate}: a criterion that measures how often a privileged context converts unsafe responses into safe ones. We use this signal to search for contexts that activate latent safety reasoning rather than merely elicit safe-looking demonstrations. Across two reasoning-model families and five model scales, OPSA achieves a stronger safety--reasoning tradeoff than off-policy self-distillation and external-teacher distillation under matched data and full-parameter fine-tuning, with the largest gains on smaller models (+8.85 points on R1-Distill-1.5B and +5.49 points on Qwen3-0.6B). The gains persist across training-set sizes and adaptive jailbreak evaluations. Token-level analyses further show that OPSA concentrates updates near early compliance-decision tokens, providing a mechanism for improving safety while preserving general reasoning.

安全对齐自蒸馏大模型推理能力

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