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 propose ThinkSafe, a self-generated alignment framework that restores safety alignment 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, guiding the model to generate in-distribution safety reasoning traces. Fine-tuning on these self-generated responses effectively realigns the model while minimizing distribution shift. Experiments on DeepSeek-R1-Distill and Qwen3 show ThinkSafe significantly improves safety while preserving reasoning proficiency. Notably, it achieves superior safety and comparable reasoning to GRPO, with significantly reduced computational cost. Code, models, and datasets are available at https://github.com/seanie12/ThinkSafe.git.


翻译:大型推理模型通过利用强化学习在推理任务上生成长链思维推理,取得了显著性能。然而,这种过度优化往往优先考虑指令遵循,使得模型容易受到有害提示的攻击。为了缓解这种安全性退化,现有方法依赖于外部教师蒸馏,但这引入了分布差异,从而损害了模型固有的推理能力。我们提出了ThinkSafe,一种无需外部教师的自生成对齐框架,旨在恢复模型的安全对齐。我们的核心洞见是:尽管指令遵循会抑制安全机制,但模型通常保留着识别危害的潜在知识。ThinkSafe通过轻量级的拒绝引导来解锁这种知识,指导模型生成分布内的安全推理轨迹。基于这些自生成响应进行微调,能有效重新对齐模型,同时最小化分布偏移。在DeepSeek-R1-Distill和Qwen3上的实验表明,ThinkSafe在保持推理能力的同时,显著提升了安全性。值得注意的是,与GRPO相比,ThinkSafe实现了更优的安全性和相当的推理能力,且计算成本显著降低。代码、模型和数据集可在 https://github.com/seanie12/ThinkSafe.git 获取。

0
下载
关闭预览

相关内容

从感知到推理:深度思考赋能多模态大语言模型
专知会员服务
24+阅读 · 2025年11月19日
《大型推理模型的安全性:综述》
专知会员服务
24+阅读 · 2025年4月25日
小型推理模型简要综述:训练、推理、应用与研究方向
专知会员服务
42+阅读 · 2025年4月16日
增强大模型智能:数学推理能力的提升策略与实践
专知会员服务
25+阅读 · 2024年8月25日
【大模型对齐】利用对齐使大型语言模型更好地推理
专知会员服务
48+阅读 · 2023年9月8日
「知识增强预训练语言模型」最新研究综述
专知
18+阅读 · 2022年11月18日
从Seq2seq到Attention模型到Self Attention(一)
量化投资与机器学习
76+阅读 · 2018年10月8日
关系推理:基于表示学习和语义要素
计算机研究与发展
19+阅读 · 2017年8月22日
国家自然科学基金
10+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
相关基金
国家自然科学基金
10+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员