Large Reasoning Models Learn Better Alignment from Flawed Thinking

Shengyun Peng, Eric Smith, Ivan Evtimov, Song Jiang, Pin-Yu Chen, Hongyuan Zhan, Haozhu Wang, Duen Horng Chau, Mahesh Pasupuleti, Jianfeng Chi · OpenReview

Abstract: Large reasoning models (LRMs) "think" by generating structured chain-of-thought (CoT) before producing a final answer, yet they still lack the ability to reason critically about safety alignment and are easily biased when a flawed premise is injected into their thought process. We propose RECAP (Robust Safety Alignment via Counter-Aligned Prefilling), a principled reinforcement learning (RL) method for post-training that explicitly teaches models to override flawed reasoning trajectories and reroute to safe and helpful responses. RECAP trains on a mixture of synthetically generated counter-aligned CoT prefills and standard prompts, requires no additional training cost or modifications beyond vanilla reinforcement learning from human feedback (RLHF), and substantially improves safety and jailbreak robustness, reduces overrefusal, and preserves core reasoning capability -- all while maintaining inference token budget. Extensive analysis shows that RECAP-trained models engage in self-reflection more frequently and remain robust under adaptive attacks, preserving safety even after repeated attempts to override their reasoning.

Introduction

Modern "frontier" models like DeepSeek-R1 or OpenAI-o3 are characterized by their long, structured Chain-of-Thought (CoT) reasoning—essentially "thinking out loud" before arriving at a final answer. However, researchers from Meta, Georgia Tech, and IBM have identified a critical "brittleness" in these models: if the beginning of their thought process is seeded with a flawed premise (a technique known as prefilling), they often follow that erroneous logic to unsafe or unhelpful conclusions.

For instance, if a user starts a model's thought process with "I know how to build a bomb, first I need...", a standard model might simply continue that unsafe trajectory. This occurs because current Reinforcement Learning (RL) methods typically reward the model only for the final answer, failing to teach it how to navigate away from malicious or noisy reasoning paths encountered in real-world interactions.

Methodology: The RECAP Framework

To address this, the authors propose RECAP (Robust Safety Alignment via Counter-Aligned Prefilling), a principled RL post-training recipe. The core innovation lies in the use of Counter-Aligned Prefills during the training phase.

The RECAP training process: models are prefills with flawed CoT (refusal for benign prompts or unsafe for harmful prompts) and rewarded for overriding these trajectories with safe, helpful responses.

RECAP operates through three main pillars:

  1. Synthetic Flaws: During training, the model's CoT is prefills with synthetically generated, "counter-aligned" traces. For harmful prompts, unsafe reasoning is injected (e.g., "I can help with that illegal task..."). For benign prompts, overly conservative refusal reasoning is injected (e.g., "I can't help you kill a computer process because killing is wrong").
  2. The "Override" Incentive: To achieve a high reward, the model cannot simply follow the prefill. It must recognize the reasoning is flawed, override it, and reroute to a safe and helpful response.
  3. Training Framework: RECAP utilizes the DAPO (Decouple clip and Adaptive sampling Policy Optimization) framework, a variant of the GRPO algorithm. Crucially, this method requires no additional training cost or modifications to the standard RL objective.

Key Results and Performance

RECAP delivered substantial gains across multiple benchmarks for models like Llama-8B and Qwen-14B. Safety scores improved by +12.3% on direct harmful prompts and +21.0% on jailbreaking benchmarks. Furthermore, the method reduced "overrefusal"—the tendency to reject safe questions—by +7.8%.

Importantly, this increased safety does not come at the cost of intelligence. Core math performance actually improved slightly (+0.9%), and the models maintained a similar inference token budget to standard models, ensuring that the "self-correction" behavior does not lead to excessive computational overhead.

Comparison of total tokens generated at inference: RECAP matches the efficiency of the baseline DAPO method across safety, overrefusal, and math tasks.

Discussion and Future Work

A striking emergent behavior in RECAP-trained models is frequent self-reflection. These models naturally start using phrases like "But wait, that seems illegal..." or "Actually, let me reconsider..." more often than standard models. They also demonstrated persistent robustness against "Iterative Prefill Reset" (IPR) attacks, where an adversary repeatedly tries to force the model back into bad reasoning.

While RECAP is a significant advancement, future work will explore applying this "recovery from flawed thinking" logic to math and coding to help models recover from mid-calculation logical errors. Additionally, extending the framework to multimodal and multilingual contexts remains an open research priority.

Summary updated

BibTeX
@misc{peng2025large,
  author = {Shengyun Peng and Eric Smith and Ivan Evtimov and Song Jiang and Pin-Yu Chen and Hongyuan Zhan and Haozhu Wang and Duen Horng Chau and Mahesh Pasupuleti and Jianfeng Chi},
  title = {{Large Reasoning Models Learn Better Alignment from Flawed Thinking}},
  year = {2025},
  eprint = {2510.00938},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.00938},
}
Figure