TL;DR
Researchers have introduced ReAlign, a reinforcement learning framework that safety-aligns Large Reasoning Models (LRMs) without sacrificing their complex problem-solving abilities or making them overly prone to refusing user queries. By using a hybrid reward system that penalizes both harmful content and lazy refusals, ReAlign produces models that are significantly safer and more robust against jailbreaks while maintaining peak performance on benchmarks like AIME and GPQA.
What Problem Does This Paper Address?
As AI moves from simple chat to "reasoning" models (like OpenAI’s o1 or Qwen3), a new challenge emerges: the Safety Tax. Traditionally, when we fine-tune a model to be safe, its performance on difficult tasks like math and coding tends to drop. Furthermore, these models often become "overly cautious," refusing benign prompts because they might be tangentially related to a sensitive topic—a frustrating user experience known as the refusal problem.
For reasoning models, there is an added layer of complexity: the Chain-of-Thought (CoT). Does a safe internal "thought" process guarantee a safe final answer? Current Supervised Fine-Tuning (SFT) methods struggle to balance these factors, often forcing a choice between a model that is smart but dangerous, or safe but "lobotomized."
Methods
The authors propose ReAlign, a Reinforcement Learning from AI Feedback (RLAIF) framework. The core innovation is a Hybrid Reward System designed to navigate the trilemma of safety, helpfulness, and refusal.
The reward function $r(x, t, y)$ (where $x$ is the prompt, $t$ is the CoT, and $y$ is the answer) integrates three signals:
- Safety Assessment: Uses a "guard model" (Qwen3Guard) to check both the internal thinking and the final output. If either is unsafe, it triggers a large penalty (-10).
- Refusal Penalty: If the model gives a canned refusal (e.g., "I cannot fulfill this request"), it receives a moderate penalty (-5). This incentivizes the model to find safe, helpful alternatives rather than just giving up.
- Helpfulness Score: A general reward model (WorldPM-Helpsteer2) evaluates the quality and nuance of the response.
For the actual optimization, they use Group Sequence Policy Optimization (GSPO). Unlike standard RL that updates token-by-token, GSPO works at the sequence level and compares a group of candidate responses to the same prompt to calculate "advantages," making the training more stable and efficient for long-reasoning chains.
Datasets
- Training: The model was trained using prompts from WildJailbreak, a dataset designed to test model limits with adversarial queries.
- Evaluation:
- Safety: Evaluated on WildJailbreak-eval using both LLM-as-a-judge (Qwen3-235B) and the WildGuard model.
- Reasoning/Capability: Tested on Arena-Hard-V2 (general alignment), AIME-25 (mathematics), LiveCodeBench-V6 (coding), and GPQA (PhD-level science questions).
- Robustness: Evaluated against the AdvBench dataset using the GCG (Greedy Coordinate Gradient) white-box jailbreak attack.
Key Insights and Ideas
- The CoT-Answer Decoupling: One of the paper's most striking findings is that the safety of the internal "thinking" trace and the final answer are partially decoupled. A model can have a 97% safe CoT but still produce an unsafe answer 17% of the time. This suggests that safety alignment must target the entire reasoning process, not just the final output.
- The "Rise-and-Fall" of Refusals: During RL training with the hybrid reward, the model’s refusal rate initially spikes as it learns to avoid danger, but then steadily declines. The model eventually learns a "third way": providing safe, constructive responses that satisfy the user without violating safety boundaries.
- RL > SFT for Safety: The authors show that SFT is a blunt instrument. If you use "in-distribution" data (the model's own safe outputs), it doesn't learn enough. If you use "off-distribution" data (from a smarter model), it incurs a heavy "Safety Tax," tanking reasoning scores. RL allows the model to explore its own capabilities to find safe paths.
Key Results
- Safety Gains: On the Qwen3-4B model, ReAlign improved the safety rate from 43.8% to 83.4% in thinking mode, as judged by a 235B-parameter model.
- Low Refusal: While a "Guard-only" reward system caused refusals to skyrocket to 95%, ReAlign kept the refusal rate at a measly 6.2%, comparable to the base model.
- Preserved Intelligence: Reasoning capabilities remained remarkably stable. For example, on the difficult GPQA benchmark, the score only shifted from 55.9 to 51.2, whereas traditional safety training often erases reasoning gains entirely.
- Jailbreak Resilience: In "Think" mode, the model was nearly immune to transferred GCG attacks, maintaining almost 100% safety even when faced with adversarial suffixes that successfully broke the non-reasoning version of the model.
Limitations and Future Work
The authors note that while ReAlign is highly effective, enforcing safety constraints specifically on the CoT (the "thinking" part) does introduce a slight performance penalty on reasoning benchmarks compared to only checking the final output.
Future work may focus on better understanding the "transferability" of safety. The study found that safety alignment is somewhat "mode-specific"—a model trained to be safe while "thinking" isn't quite as safe when the thinking mode is turned off. Bridging this gap remains an open research question.
Summary updated