SAFEPATH: Preventing Harmful Reasoning in Chain-of-Thought via Early Alignment
Wonje Jeung, Sangyeon Yoon, Minsuk Kahng, Albert No
TL;DR
SAFEPATH addresses the safety-reasoning trade-off in Large Reasoning Models by inserting a lightweight eight-token Safety Primer at the start of the reasoning process for harmful prompts, while keeping the rest of the chain-of-thought unsupervised. The method trains only the primer tokens and uses a two-part data setup (Safety Trigger Set and Reasoning Retain Set) with a fixed interleaving ratio, plus a zero-shot variant that requires no fine-tuning. Empirical results on DeepSeek-R1 distilled LRMs show substantial reductions in harmful outputs (up to ~90%) and jailbreak success (up to ~83%), with dramatically lower training costs (up to ~314x faster than strong baselines) and minimal impact on reasoning performance. The approach also exhibits emergent behavior, reactivating the Safety Primer during intermediate reasoning under adversarial prompts, and demonstrates generalization beyond distilled models, offering a scalable pathway to safer, high-precision reasoning in real-world deployments.
Abstract
Large Reasoning Models (LRMs) have become powerful tools for complex problem solving, but their structured reasoning pathways can lead to unsafe outputs when exposed to harmful prompts. Existing safety alignment methods reduce harmful outputs but can degrade reasoning depth, leading to significant trade-offs in complex, multi-step tasks, and remain vulnerable to sophisticated jailbreak attacks. To address this, we introduce SAFEPATH, a lightweight alignment method that fine-tunes LRMs to emit a short, 8-token Safety Primer at the start of their reasoning, in response to harmful prompts, while leaving the rest of the reasoning process unsupervised. Empirical results across multiple benchmarks indicate that SAFEPATH effectively reduces harmful outputs while maintaining reasoning performance. Specifically, SAFEPATH reduces harmful responses by up to 90.0% and blocks 83.3% of jailbreak attempts in the DeepSeek-R1-Distill-Llama-8B model, while requiring 295.9x less compute than Direct Refusal and 314.1x less than SafeChain. We further introduce a zero-shot variant that requires no fine-tuning. In addition, we provide a comprehensive analysis of how existing methods in LLMs generalize, or fail, when applied to reasoning-centric models, revealing critical gaps and new directions for safer AI.
