We propose CRAFT, a red-teaming alignment framework that leverages model reasoning capabilities and hidden representations to improve robustness against jailbreak attacks. Unlike prior defenses that operate primarily at the output level, CRAFT aligns large reasoning models to generate safety-aware reasoning traces by explicitly optimizing objectives defined over the hidden state space. Methodologically, CRAFT integrates contrastive representation learning with reinforcement learning to separate safe and unsafe reasoning trajectories, yielding a latent-space geometry that supports robust, reasoning-level safety alignment. Theoretically, we show that incorporating latent-textual consistency into GRPO eliminates superficially aligned policies by ruling them out as local optima. Empirically, we evaluate CRAFT on multiple safety benchmarks using two strong reasoning models, Qwen3-4B-Thinking and R1-Distill-Llama-8B, where it consistently outperforms state-of-the-art defenses such as IPO and SafeKey. Notably, CRAFT delivers an average 79.0% improvement in reasoning safety and 87.7% improvement in final-response safety over the base models, demonstrating the effectiveness of hidden-space reasoning alignment.


翻译:我们提出CRAFT,一种红队对抗对齐框架,它利用模型推理能力和隐藏表征来提升对越狱攻击的鲁棒性。与以往主要在输出层面进行防御的方法不同,CRAFT通过显式优化定义在隐藏状态空间上的目标,使大型推理模型生成具有安全意识的推理轨迹。在方法论上,CRAFT将对比表征学习与强化学习相结合,以分离安全与不安全的推理轨迹,从而形成支持稳健、推理级安全对齐的潜在空间几何结构。在理论上,我们证明将潜在-文本一致性纳入GRPO可消除表面对齐策略,并将其视为局部最优解予以排除。在实证上,我们使用Qwen3-4B-Thinking和R1-Distill-Llama-8B这两个强推理模型,在多个安全基准上评估CRAFT,结果表明它始终优于IPO和SafeKey等最先进的防御方法。值得注意的是,与基础模型相比,CRAFT在推理安全方面平均提升79.0%,在最终响应安全方面平均提升87.7%,这证明了隐藏空间推理对齐的有效性。

0
下载
关闭预览

相关内容

【大模型对齐】利用对齐使大型语言模型更好地推理
专知会员服务
48+阅读 · 2023年9月8日
【ICML2023】表示驱动强化学习
专知会员服务
39+阅读 · 2023年6月2日
【MIT】反偏差对比学习,Debiased Contrastive Learning
专知会员服务
92+阅读 · 2020年7月4日
可解释强化学习,Explainable Reinforcement Learning: A Survey
专知会员服务
132+阅读 · 2020年5月14日
对比自监督学习
深度学习自然语言处理
35+阅读 · 2020年7月15日
对比学习(Contrastive Learning)相关进展梳理
PaperWeekly
11+阅读 · 2020年5月12日
图上的归纳表示学习
科技创新与创业
23+阅读 · 2017年11月9日
关系推理:基于表示学习和语义要素
计算机研究与发展
19+阅读 · 2017年8月22日
【强化学习】强化学习+深度学习=人工智能
产业智能官
55+阅读 · 2017年8月11日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
4+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关资讯
对比自监督学习
深度学习自然语言处理
35+阅读 · 2020年7月15日
对比学习(Contrastive Learning)相关进展梳理
PaperWeekly
11+阅读 · 2020年5月12日
图上的归纳表示学习
科技创新与创业
23+阅读 · 2017年11月9日
关系推理:基于表示学习和语义要素
计算机研究与发展
19+阅读 · 2017年8月22日
【强化学习】强化学习+深度学习=人工智能
产业智能官
55+阅读 · 2017年8月11日
相关基金
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员