Self-ReSET: Learning to Self-Recover from Unsafe Reasoning TrajectoriesSelf-ReSET: Learning to Self-Recover from Unsafe Reasoning Trajectories
Translation in progress — untranslated text is omitted.
Quick read
Based on the paper PDF (AI-generated); refer to the original
The researchers propose a pure reinforcement learning framework, Self-ReSET, which enables large reasoning models to learn to self-recover from their own unsafe reasoning trajectories and improves robustness against out-of-distribution jailbreak prompts across multiple models. The method uses the model's own generated unsafe error trajectories as reinforcement learning initial states, avoiding reliance on static expert data that easily deviates from dynamic on-policy trajectories. The paper states that the experiments improve data utilization efficiency while maintaining general utility, and analysis shows the model is better able to recognize unsafe intermediate states and return to benign paths. Code and data are publicly available on GitHub.
- LRMs can self-correct in general domains, but after entering an unsafe reasoning trajectory in response to adversarial prompts they often cannot escape it. The authors believe existing methods rely on static expert trajectories or fixed prefixes, which do not match the model's own on-policy trajectory distribution and are hard-pressed to cover OOD attacks.
- Self-ReSET uses Qwen3Guard-Stream to perform token-level monitoring of on-policy reasoning, truncates at the earliest unsafe state and stores it in a FIFO experience replay pool, then replays the unsafe prefix as the initial state and trains the model with a binary safety reward and DAPO to recover to safe outputs.
- On three open-source LRMs, the authors state Self-ReSET achieves the highest DSR on four jailbreak benchmarks, XSTest compliance rate is close to the base model, and AIME24 avg@16 is maintained or slightly improved; on H-CoT, DS-Llama-8B scores 37, higher than RECAP's 10.5.
- In the Limitation section, the authors point out that the monitoring stage relies on an external stream guard, and that representation probing or SAE-based stream guards could be used in the future. The experiments cover only three 7–8B open-source LRMs, and the training data is 3,000 prompts.