arXiv:2601.23143cs.AI2026-01被引 8

让推理模型自动生成安全对齐,无需外部教师。

THINKSAFE: Self-Generated Safety Alignment for Reasoning Models

  • 利用模型自身过滤后的安全分布作为最优目标,实现无外部依赖的安全对齐。
  • 在DeepSeek-R1-Distill和Qwen3上显著提升安全性,推理能力几乎不受影响。
  • 相比GRPO方法节省近90%算力,适合追求高效安全推理的开发者。

大型推理模型(LRMs)通过强化学习在长链式思维(CoT)任务上取得卓越表现,但过度优化导致模型易受有害提示影响。现有方法依赖外部教师蒸馏,引入分布差异并损害原生推理能力。本文将安全对齐形式化为对安全单纯形的KL投影,证明学生模型自身的安全过滤分布是唯一的KL最优目标,而外部教师必然带来不可消除的额外KL代价。基于此,提出ThinkSafe框架,通过轻量级拒绝引导机制激活模型隐含的安全识别能力,既保留最优目标又提升接受率。实验表明,ThinkSafe在DeepSeek-R1-Distill与Qwen3上显著增强安全性,同时保持推理能力,并在约1/10计算量下超越GRPO的性能。代码、模型及数据集见GitHub与HuggingFace。

原文摘要 · Abstract (English)

Large reasoning models (LRMs) achieve remarkable performance by leveraging reinforcement learning (RL) on reasoning tasks to generate long chain-of-thought (CoT) reasoning. However, this over-optimization often prioritizes compliance, making models vulnerable to harmful prompts. To mitigate this safety degradation, recent approaches rely on external teacher distillation, yet this introduces a distributional discrepancy that degrades native reasoning. We formalize safety realignment as a KL projection onto the safe simplex and prove that the student's own safety-filtered distribution is the unique KL-optimal target, while any external teacher incurs an irreducible excess KL penalty. Guided by this analysis, we propose ThinkSafe, a self-generated alignment framework that restores safety without external teachers. Our key insight is that while compliance suppresses safety mechanisms, models often retain latent knowledge to identify harm. ThinkSafe unlocks this via lightweight refusal steering, which preserves the KL-optimal target while increasing the acceptance rate. Experiments on DeepSeek-R1-Distill and Qwen3 show ThinkSafe significantly improves safety while preserving reasoning proficiency, and achieves superior safety and comparable reasoning to GRPO with roughly an order of magnitude less compute. Code, models, and datasets are available at https://github.com/seanie12/ThinkSafe and https://huggingface.co/Seanie-lee/collections.

安全对齐推理模型强化学习轻量级

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