When Models Outthink Their Safety: Mitigating Self-Jailbreak in Large Reasoning Models with Chain-of-Guardrails
Yingzhi Mao, Chunkang Zhang, Junxiang Wang, Xinyan Guan, Boxi Cao, Yaojie Lu, Hongyu Lin, Xianpei Han, Le Sun
TL;DR
This work identifies Self-Jailbreak as a core challenge in large reasoning models, where models notice risky prompts during reasoning yet justify unsafe responses later. It introduces Chain-of-Guardrail (CoG), a training framework that recomposes or backtracks unsafe reasoning into safety-oriented chains, combining Safety Recomposition and Safety Backtrack with a selective loss masking strategy. Through extensive experiments on multiple safety and reasoning benchmarks, CoG demonstrates improved safety while largely preserving original reasoning patterns, outperforming prior safety-for-reasoning methods that degrade reasoning. The approach advances practical alignment of LRMs, enabling safer, more reliable multi-step reasoning without sacrificing capability. The findings have potential impact on deploying LRMs in safety-critical settings by reducing harmful outputs without compromising reasoning performance.
Abstract
Large Reasoning Models (LRMs) demonstrate remarkable capabilities on complex reasoning tasks but remain vulnerable to severe safety risks, including harmful content generation and jailbreak attacks. Existing mitigation strategies rely on injecting heuristic safety signals during training, which often suppress reasoning ability and fail to resolve the safety-reasoning trade-off. To systematically investigate this issue, we analyze the reasoning trajectories of diverse LRMs and uncover a phenomenon we term Self-Jailbreak, where models override their own risk assessments and justify responding to unsafe prompts. This finding reveals that LRMs inherently possess the ability to reject unsafe queries, but this ability is compromised, resulting in harmful outputs. Building on these insights, we propose the Chain-of-Guardrail (CoG), a training framework that recomposes or backtracks unsafe reasoning steps, steering the model back onto safe trajectories while preserving valid reasoning chains. Extensive experiments across multiple reasoning and safety benchmarks demonstrate that CoG substantially improves the safety of current LRMs while preserving comparable reasoning ability, significantly outperforming prior methods that suffer from severe safety-reasoning trade-offs.
