Recent advancements in large language models (LLMs)—such as OpenAI’s o1—have demonstrated massive leaps in reasoning and planning capabilities, largely driven by Reinforcement Learning (RL). However, from a theoretical standpoint, the exact reasons why RL outperforms standard Supervised Fine-Tuning (SFT) for these tasks have remained elusive.
This paper provides a theoretical deep dive into the mechanics of RL versus SFT for language model planning. It reveals that while SFT tends to memorize "spurious" co-occurrences in training data, RL generalizes by actively exploring new paths. Crucially, the authors also identify a major pitfall in popular Policy Gradient (PG) methods—"diversity collapse"—and propose Q-learning paired with process rewards as a robust alternative.
The Problem: SFT Treats Planning Like Translation
The fundamental challenge with SFT is its framing of the problem. SFT treats planning like a translation task: given a start and end state, it learns to predict the next token. This often leads to models that memorize specific sequences rather than understanding the underlying "map" or logic of the problem space.
When an SFT-trained model encounters a slightly novel scenario, it frequently fails because it hasn't learned the transitive logic required to find a path (e.g., if A connects to B, and B connects to C, then A can reach C). To formalize these behaviors, the researchers abstracted the planning problem into a tractable graph-based framework, comparing SFT, Policy Gradient (PG), and Q-learning.
Methodology: A Graph-Based Abstraction
The authors model the planning problem as pathfinding on a directed graph, where nodes represent tokens and a "plan" is a valid sequence of edges from a source to a target. Using a simplified one-layer Transformer model, they mathematically tracked how gradients change the model's weights over time across three paradigms:
- Supervised Fine-Tuning (SFT): Training on a fixed dataset of successful paths.
- Policy Gradient (PG): An RL approach (similar to PPO or GRPO) that updates the model based on the rewards of its own generated trajectories.
- Q-Learning: An RL approach that estimates the "value" of taking a specific action in a specific state.
The study utilized synthetic Erdős-Rényi graphs and the classic AI planning benchmark, Blocksworld, to test their theories in both abstract and "real-world" logic environments.
Key Findings: Memorization, Exploration, and Diversity Collapse
The theoretical and empirical analyses yielded several critical insights into how these models learn to plan:
- SFT is a Memory Game: The authors prove that SFT essentially memorizes the frequency of edges in the training set. If a specific path wasn't seen often, the model won't "invent" it through logic, failing to learn transitivity.
- RL’s Secret Sauce is Exploration: PG outperforms SFT because the model is forced to explore. By trying new sequences and getting rewarded for successful ones, it effectively augments its own training data, discovering valid connections that SFT never observed.
- The "Diversity Collapse" Trap: A major finding is that PG methods are inherently "greedy." As they get better at finding a correct path, they stop trying others. Eventually, the model's output diversity collapses, producing only one specific path for a goal even if hundreds of valid alternatives exist. While KL regularization can mitigate this, it creates a Pareto frontier where you must trade off between diversity and accuracy.
The Q-Learning Alternative
To combat the limitations of PG, the authors highlight Q-learning as a powerful alternative. Unlike PG, Q-learning naturally preserves diversity at convergence and supports off-policy learning (learning from data generated by other models).
However, the reward structure is critical. The study found that "Outcome Rewards" (only rewarding the final goal) led to biased values and poor performance in Q-learning. Conversely, "Process Rewards" (rewarding each valid step) allowed the model to nearly perfectly recover the underlying graph structure, maintaining a high variety of valid solutions.
Conclusion and Future Directions
While the study relies on a structural abstraction—using a one-layer Transformer and fixed graphs rather than the multi-layered architectures and infinite state spaces of real-world LLMs—the theoretical predictions held true on the Blocksworld benchmark. RL methods significantly improved the model's understanding of state reachability compared to SFT.
Currently, Policy Gradient methods are the industry standard for reasoning models. However, this paper suggests that future research should focus on scaling Q-learning for LLMs. By combining Q-learning with step-by-step process rewards, developers may be able to build planning models that are not only highly accurate but also creatively diverse.
Summary updated