Summary (Overview)
- This paper challenges the prevailing notion that "RL generalizes, whereas SFT memorizes" by demonstrating that this conclusion depends critically on the properties of the SFT training dataset—specifically its source and scale.
- The authors show that data source matters: SFT data generated by a model closer to the base model being fine-tuned (RL-tuned model) yields better generalization than data from a stronger teacher model (Qwen3-14B), and an appropriate mixture of both sources performs best.
- Data scale is crucial: When the SFT training dataset size is matched to RL's rollout budget (including both correct and incorrect rollouts), SFT achieves generalization comparable to—or even better than—RL.
- Using LLM annotations to characterize solution methods, the authors demonstrate that larger datasets cover more tail methods (rare reasoning patterns), which provide generalizable signals for out-of-distribution reasoning tasks.
- Theoretical analysis of shallow transformer training dynamics confirms these findings: with sufficient method coverage through data scaling, SFT can match RL's OOD generalization.
Introduction and Theoretical Foundation
Background and Motivation
Large Language Models (LLMs) trained via Reinforcement Learning (RL) or Supervised Fine-Tuning (SFT) have achieved remarkable improvements in reasoning ability, exemplified by DeepSeek-R1 and s1. Prior work [3–5] has suggested that "RL generalizes, whereas SFT memorizes," indicating that SFT often struggles to match RL on reasoning tasks beyond the training domain.
However, the authors argue that this conclusion may be premature because previous comparisons did not give SFT comparable data resources to RL. Specifically, RL typically generates multiple rollouts per prompt (e.g., 8 in GRPO), while SFT often trains on only one correct rollout per prompt. This paper revisits the question through two key inquiries:
- What kind of data source best unlocks the generalization potential of SFT?
- How should we match the data consumed by SFT and RL to compare their generalization fairly?
Theoretical Foundation: RLVR and SFT Objectives
Reinforcement Learning with Verifiable Rewards (RLVR): The regularized RLVR objective for model parameter is:
where evaluates the correctness of response to question , and the second term regularizes the model to remain close to the reference model .
In practice, Group Relative Policy Optimization (GRPO) maximizes the surrogate objective:
where is the importance-sampling ratio, clips to , and is the group-normalized advantage.
SFT Objective: The long-reasoning SFT loss is:
Methodology
Experimental Setup
- Base models: Qwen2.5-7B and Qwen3-8B-Base
- Training data: Mathematical problems from the DAPO dataset
- RL training: GRPO implemented in VeRL with standard setup
- SFT training: LlamaFactory with rollouts generated by teacher models
- Evaluation:
- Math reasoning: AIME24, Minerva Math, GSM8K, MATH500, OlympiadBench
- General reasoning: 12 tasks from Language Model Evaluation Harness (GPQA-Diamond, MMLU-Pro, etc.)
Data Sources for SFT
Two primary data sources were constructed via rejection sampling:
- Qwen3-14B dataset (size: 15,607): Generated by a strong teacher model (Qwen3-14B), sampling at most 128 rollouts per question and retaining one correct rollout.
- RL-tuned dataset (size: 14,512): Generated by the RL-tuned model (derived from the base model), expected to be more aligned with the base model parameters.
Mixture datasets (Mix-k) were created by interpolating between these sources with ratios RL-tuned data and Qwen3-14B data for .
Data Scale Matching Criteria
Three matching criteria were used to scale SFT datasets relative to RL:
| Criterion | Description | Dataset Size |
|---|---|---|
| Solvable prompts | One correct rollout per solvable prompt | ~10,000 pairs |
| Correct rollouts | Match number of correct rollouts per prompt observed in RL | ~39,000 pairs |
| Total rollouts | Match total rollouts (correct + incorrect) used in RL | ~138,000 pairs |
Method Annotation
Qwen3-32B was used to annotate solution methods in training rollouts, identifying 138 unique methods for solving math problems. Tail methods were defined as those in the bottom 20% by frequency.
Empirical Validation / Results
Observation 1: Data Source Matters
Table 1 shows key results (selected columns):
| Model | AIME24 | Minerva Math | GSM8k | MATH500 | Olympiad Bench | ACP Bench | BBH | C-Eval | Ground Cocoa | MMLU-Pro |
|---|---|---|---|---|---|---|---|---|---|---|
| Qwen2.5-7B (base) | 4.7 | 26.5 | 88.6 | 63.6 | 30.2 | 23.3 | 10.9 | 40.1 | 34.7 | 9.2 |
| RL-tuned | 14.2 | 34.9 | 90.8 | 74.8 | 39.7 | 50.1 | 42.9 | 43.6 | 34.8 | 45.7 |
| SFT w/ RL-tuned | 13.8 | 37.1 | 91.4 | 74.8 | 39.3 | 58.0 | 33.8 | 42.4 | 35.6 | 19.4 |
| SFT w/ Mix-2 | 13.4 | 41.2 | 91.9 | 76.2 | 36.9 | 53.4 | 37.3 | 47.8 | 37.0 | 21.3 |
| SFT w/ Qwen3-14B | 13.9 | 33.5 | 90.5 | 75.0 | 38.5 | 45.3 | 42.1 | 36.5 | 33.2 | 1.1 |
Key findings:
- Both SFT variants achieve comparable math performance to RL, but lag on general reasoning.
- SFT with RL-tuned data outperforms SFT with Qwen3-14B data on general reasoning.
- Mix-2 (70% RL-tuned + 30% Qwen3-14B) achieves the best overall performance among SFT models.
Observation 1: The training data source is crucial for generalization: data from a model closer to the one being fine-tuned can be more effective than data from a stronger model, while data from a single model is not necessarily optimal; incorporating an appropriate amount of more diverse data can further improve general reasoning ability.
Observation 2: Data Scale Matters
Scaling the SFT dataset under different matching criteria revealed:
- Solvable-prompt matching → comparable math but better general reasoning than prompt matching
- Correct-rollout matching → substantially improves SFT generalization, approaching RL performance
- Total-rollout matching (including incorrect rollouts) → SFT achieves comparable or better performance than RL on both math and general reasoning
Observation 2: The amount of training data substantially influences SFT generalization: matching the number of correct rollouts greatly improves SFT generalization, while further matching the total rollout budget enables SFT to achieve comparable generalization to RL.
Observation 3: Compounding Effects
Combining optimal data source (90% RL-tuned + 10% Qwen3-14B) with matched rollout budget (138,000 pairs) yields SFT performance better than RL on general reasoning tasks.
Observation 3: With a carefully mixed dataset and a rollout budget matched to RL, SFT achieves promisingly better general reasoning ability than RL, undermining "RL generalizes, SFT memorizes."
Observation 4: Tail Methods Drive Generalization
Method distribution analysis (Figure 10) revealed:
- The method distribution is long-tailed: many methods appear only infrequently.
- Larger datasets cover more tail methods (methods in the bottom 20% by frequency).
- Tail methods are used more frequently and solve more questions on general reasoning tasks (MMLU-Pro, MMLU-Pro+) as training data scale increases.
Observation 4: One benefit of increasing the training samples is improved coverage of long-tailed patterns. Training on these rare but informative samples can enhance performance on downstream general reasoning tasks.
Theoretical and Practical Implications
Theoretical Analysis: Shallow Transformer Case Study
The authors provide theoretical grounding using a simplified data model with a one-layer attention transformer:
Assumption 4.1 (Long-Tailed Distribution in SFT Data): For each question , (head answer) and for (tail answers).
Theorem 4.2 (In-Distribution Convergence): Both SFT and RL achieve high accuracy on in-distribution problems after one gradient step, with wrong-answer probability bounded by . RL additionally learns a balanced distribution across all correct answers: .
Theorem 4.3 (OOD Generalization):
- RL always generalizes: For any OOD mixture, .
- SFT generalizes on covered methods: If OOD distribution is supported on answers with , then . However, if supported on answers with , then .
Practical Implications
- Data curation for SFT: Practitioners should prioritize data from models architecturally or behaviorally close to the base model, while incorporating diverse data to cover rare reasoning patterns.
- Fair comparison protocols: When benchmarking SFT vs. RL, the total rollout budget (including incorrect rollouts) should be matched, as incorrect rollouts contain valuable intermediate reasoning steps.
- Scaling strategy: Increasing SFT dataset size improves tail-method coverage, which directly translates to better OOD generalization.
Conclusion
This work rethinks the claim that "RL generalizes, whereas SFT memorizes" by showing that this conclusion requires specific prerequisites on SFT training data. The key findings are:
- Data source is critical: data from a model closer to the base model, mixed with appropriate amounts of diverse data, unlocks SFT's generalization potential.
- Data scale matters: matching SFT's rollout budget to RL's (including incorrect rollouts) enables SFT to generalize comparably to RL.
- Tail-method coverage is the mechanism: larger datasets cover more rare reasoning patterns that drive OOD generalization.
- Theoretical validation: Training dynamics analysis confirms that sufficient method coverage allows SFT to match RL's OOD generalization.
Limitation: The analysis focuses on LLMs; extending to other generative models (e.g., diffusion models) is left for future work.
Future directions include exploring optimal data mixing strategies, understanding the role of incorrect rollouts more deeply, and extending the theoretical framework to deeper architectures and other generative model families.
Related papers
- Not All Loops Cost the Same: Phase-Dependent Depth for Serving Looped Transformers
LoopDuet shows that asymmetric loop depths for prefilling versus decoding—with prefilling shallower—boost throughput by up to 19% and quality by 6.04 EM points without retraining.
- Agreement rather than normalisation keeps depth reusable in looped language models
Loop-boundary normalization in looped language models is a readout contract, not a stability mechanism; removing it breaks inference while state scale stays intact, and training without it extrapolates better.
- The RSI Tax: When Recursive Self-Improvement Is Not Worth the Cost
A simple bounded-note baseline (SRN) matches or beats costly recursive self-improvement methods' accuracy while cutting total token costs by 65.6–71.0%, revealing that verification-driven RSI taxes often exceed task execution costs.