Recent breakthroughs in large language models (LLMs), such as OpenAI's o1 and DeepSeek-R1, have highlighted a consistent trend: Reinforcement Learning with Verifiable Rewards (RLVR) significantly outperforms Supervised Fine-Tuning (SFT) on complex reasoning tasks. While this performance gap is widely recognized, the underlying theoretical reasons have remained largely intuitive.
This paper bridges that gap by providing a rigorous mathematical proof for why RL fine-tuning induces superior reasoning capabilities compared to purely supervised methods. The secret, it turns out, lies in the model's ability to backtrack.
The "Golden Path" Trap vs. The Value of Failure
To understand why SFT fails to generalize reasoning as effectively as RLVR, we must look at the training data. SFT relies heavily on imitation learning. Models are trained on massive datasets of perfect, human-generated solutions—the "golden paths." Because the training data lacks negative examples or dead ends, the model never learns how to recover from mistakes. During inference, if an SFT-trained model takes a single wrong step, it becomes lost and wanders aimlessly, as the gradient for backward-pointing transitions during training was effectively zero.
RLVR, on the other hand, forces the model to explore. By navigating the problem space on-policy and receiving rewards only for successful outcomes (coupled with penalties for path length), the model's unsuccessful attempts become a crucial learning signal. The gradient generated by these "failures" pushes the model to learn how to efficiently retreat from dead ends and return to previous decision points.
Modeling Chain-of-Thought as Pathfinding
To prove this mathematically, the authors model Chain-of-Thought (CoT) reasoning as a pathfinding problem on a custom multigraph (the "path-star" graph). This graph features a "fork" leading into multiple branches, each containing a series of "diamonds" (nodes connected by multiple parallel edges).
The researchers use a dynamical analysis of gradient flow to observe how the model's internal policy—the probability of transitioning between nodes—evolves under both SFT and RLVR paradigms. They specifically analyze whether the training signals update the "backward-pointing" edges essential for backtracking.
Key Insights and Exponential Separation
The theoretical analysis yields a striking result: an exponential separation in inference-time compute between the two methods.
- RLVR's Efficiency: RLVR converges to a policy where all forward-pointing edges go forward, and all backward-pointing edges efficiently return the model to the initial fork when it hits a dead end. At inference time, an RLVR model can find the target in $\Theta(WK)$ time (where $W$ is the number of branches and $K$ is the depth).
- SFT's Inefficiency: Lacking the ability to backtrack, an SFT model requires $\Theta(WL^K)$ time, where $L$ represents the number of multiedges. This exponential difference highlights how RLVR optimizes the allocation of inference-time compute by learning the location of difficult decisions in a reasoning chain.
- Experimental Validation: Using a single-layer transformer, the authors confirmed their theory. The "Expected Hitting Time" (how long it takes to find the answer) for the RLVR model plummeted as it learned to backtrack, eventually reaching the theoretical optimum of $4WK$.
Distilling Reasoning Traces
Interestingly, the paper demonstrates that SFT can learn to backtrack, but only if the training data includes the "messy," self-correcting reasoning traces of an RLVR model that has already mastered the skill. This finding underscores the true value of synthetic data generated by models like DeepSeek-R1: it is not just about providing the correct answer, but about demonstrating the process of recognizing errors and self-correcting.
Limitations and Future Directions
While the theoretical framework is robust, it relies on a simplified, discrete world model (akin to a bigram or trigram model) where the graph structure is already known. In reality, LLMs must simultaneously learn the "rules" of the environment and the reasoning steps, navigating a fluid, continuous language space rather than discrete graph nodes.
Future research will need to map these discrete graph nodes to abstract "thought states" in high-dimensional LLMs. Additionally, the authors suggest exploring how process-based rewards (rewarding individual steps rather than just the outcome) or advanced search algorithms like Monte Carlo Tree Search (MCTS) interact with these learned backtracking behaviors.
Summary updated