arXiv:2605.08936cs.AIcs.LG2026-05被引 1

让大模型学会自我纠错,对抗恶意诱导攻击

Self-ReSET: Learning to Self-Recover from Unsafe Reasoning Trajectories

论文配图:Self-ReSET: Learning to Self-Recover from Unsafe Reasoning Trajectories
图 1 · 摘自论文原文
  • 用强化学习让模型从自身错误中学习恢复
  • 在多种攻击下提升鲁棒性,尤其对陌生攻击有效
  • 适合关注安全推理与模型自愈能力的研究者

大型推理模型虽具备通用自修正能力,但在对抗攻击下常无法从不安全推理路径中恢复。现有对齐方法通过在专家数据(如反思轨迹或对抗前缀)上微调模型来缓解此问题,但受限于静态训练数据,难以覆盖模型动态生成空间,导致其无法学习自身失败的恢复策略。为此,我们提出 Self-ReSET,一种纯强化学习框架,使大模型具备从自身安全错误轨迹中自我恢复的能力,并将这些轨迹作为强化学习的初始状态。大量实验表明,Self-ReSET显著提升了模型在多种大模型和基准测试中对对抗攻击的鲁棒性,尤其在分布外(OOD)越狱提示下表现优异,同时保持通用能力并实现高效数据利用。进一步分析显示,该方法有效催生了自我恢复模式,使模型能更好识别并从不安全中间错误状态回归良性路径。代码与数据已开源。

原文摘要 · Abstract (English)

Large Reasoning Models possess remarkable capabilities for self-correction in general domain; however, they frequently struggle to recover from unsafe reasoning trajectories under adversarial attacks. Existing alignment methods attempt to mitigate this vulnerability by fine-tuning the model on expert data including reflection traces or adversarial prefixes. Crucially, these approaches are often hindered by static training data which inevitably deviate from model's dynamic, on-policy reasoning traces, resulting in model hardly covering its vast generation space and learning to recover from its own failures. To bridge this gap, we propose Self-ReSET, a pure reinforcement learning framework designed to equip LRMs with the intrinsic capacity to recover from their own safety error trajectories, which are subsequently reused as an initial state for reinforcement learning. Extensive experiments across various LRMs and benchmarks demonstrate that Self-ReSET significantly enhances robustness against adversarial attacks especially out-of-distribution (OOD) jailbreak prompts while maintaining general utility, along with efficient data utilization. Further analysis reveals that our method effectively fosters self-recovery patterns, enabling models to better identify and recover from unsafe intermediate error states back to benign paths. Our codes and data are available at https://github.com/Ing1024/Self-ReSET.

大模型安全自修复强化学习

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