NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Self-Verifying Reflection Helps Transformers with CoT Reasoning

Zhongwei Yu, Wannian Xia, Xue Yan, Bo Xu, Haifeng Zhang, Yali Du, Jun Wang

Abstract

Recent advancements in Large Language Models (LLMs), such as OpenAI’s o1 and DeepSeek-R1, rely heavily on "reflection"—the ability to self-verify reasoning steps and explore alternative solutions during Chain-of-Thought (CoT) processing. However, a paradox exists: LLMs are notoriously poor at detecting their own errors. This paper investigates why reflection remains effective despite weak verification skills. By training tiny transformers (1M–16M parameters) on minimalistic, non-language logic tasks like Sudoku and integer multiplication, we demonstrate that self-verification acts as a powerful regularizer that enhances hidden representations. Furthermore, we reveal that while Reinforcement Learning (RL) incentivizes reflection, it often does so by optimizing for an "optimistic bias"—minimizing false negatives—rather than fundamentally improving error detection.

Introduction

The ability to pause, evaluate, and correct one's own reasoning is a hallmark of sophisticated intelligence. In the context of LLMs, this is implemented as reflective Chain-of-Thought (CoT). While empirical results show that reflection improves performance, the underlying mechanics remain opaque. Analyzing these behaviors in massive models is computationally expensive and confounded by the complexities of natural language.

This study strips away these complexities by formulating reasoning as a Markov Thought Process (MTP). By using tiny causal-attention transformers, we isolate the impact of reflection on logical tasks to understand how verification training influences model performance and how Reinforcement Learning (RL) shapes reflective behavior.

Methodology

To study reflection systematically, the authors introduce two variants of the MTP:

  1. Reflective MTP (RMTP): The model generates a reasoning step and immediately produces a self-verification label. If an error is detected, the step is rejected, and the model attempts a new one.
  2. Reflective Trace-Back Search (RTBS): A more advanced search mechanism where the model can make tentative guesses and backtrack to previous states if subsequent logic fails, effectively performing a depth-first search.

Training Pipeline

The models were trained using a four-stage pipeline designed to mirror modern LLM development:

  1. Pretraining: Initial training on task-specific data.
  2. Non-reflective Supervised Fine-Tuning (SFT): Standard CoT training.
  3. Reflective SFT: Training the model to generate explicit verification labels (Binary or Detailed) alongside reasoning steps.
  4. Reinforcement Learning (RL): Fine-tuning using Group Relative Policy Optimization (GRPO) to reward correct final answers.

Tasks and Datasets

The research utilized two primary synthetic tasks: Integer Multiplication (step-by-step calculation) and Sudoku (grid completion). These tasks provide unambiguous ground truths for verification. Data was categorized into In-Distribution (ID) Easy, ID Hard, and Out-of-Distribution (OOD) Hard to test generalization.

Key Insights

1. Verification as a Regularizer

One of the most striking findings is that training a model to verify its own steps improves its forward-planning ability, even if the reflection mechanism is disabled during inference. This "Reflective SFT" forces the transformer to learn more robust hidden representations, effectively acting as a regularizer that sharpens the model's internal logic.

2. The Asymmetry of Errors

The effectiveness of reflection is highly sensitive to the type of verification error. False negatives—where the model incorrectly rejects a valid step—are significantly more damaging than false positives (accepting an incorrect step). Rejecting a correct path wastes computational budget and often leads the model into a cycle of confusion, whereas a false positive simply allows the model to continue, potentially correcting itself later.

3. RL and the "Optimistic Bias"

While RL (via GRPO) successfully increases the frequency of reflection and improves accuracy on ID tasks, it does not necessarily make the model a better "critic." Instead, RL tends to find a statistical shortcut: it lowers the false negative rate by becoming more "optimistic," accepting steps more readily to avoid the high penalty of rejecting a correct path. This suggests that RL-tuned reflection might be more about managing search heuristics than improving objective truth-detection.

Results

Despite their small size, the models achieved remarkable results:

  • Competitive Performance: A 4M parameter Sudoku model matched the performance of OpenAI’s o3-mini on ID tasks. A 16M parameter Multiplication model outperformed DeepSeek-R1 on ID-Hard difficulties.
  • SFT Impact: In the 1M parameter Multiplication model, adding Reflective SFT caused ID-Easy accuracy to soar from 23.6% to 95.8%.
  • RL Gains and Generalization: RL significantly boosted ID-Hard accuracy (e.g., a 23.7% gain for the 4M Multiplication model). However, these gains rarely translated to OOD tasks, where performance improvements remained below 1%.

Conclusion and Future Work

This research provides a foundational look at the mechanics of reflection in transformers. It proves that even tiny models can achieve high-level reasoning through self-verification training. However, the reliance of RL on "optimistic bias" and the struggle with OOD generalization highlight critical areas for improvement. Future research will focus on whether these findings hold in linguistically rich environments and how to develop RL objectives that encourage genuine error detection rather than simple heuristic shortcuts.

Summary updated

BibTeX
@inproceedings{yu2025self,
  author = {Zhongwei Yu and Wannian Xia and Xue Yan and Bo XU and Haifeng Zhang and Yali Du and Jun Wang},
  title = {{Self-Verifying Reflection Helps Transformers with CoT Reasoning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=4MvqmXnCEr},
}
Figure