This paper provides a deep dive into the mechanics of On-Policy Distillation (OPD), a popular technique for refining large language models (LLMs) by having a "student" model learn from a "teacher" using trajectories the student generates itself. While OPD is widely used in state-of-the-art pipelines like Qwen3 and DeepSeek-V4, the authors argue that we haven't fully understood which tokens actually drive the learning process.
TL;DR
By analyzing the gradients of the reverse-KL objective, the authors show that learning in OPD is naturally concentrated on "surprising" tokens—those the student model finds unlikely. They introduce Surprise-aware Reweighting (SuRe), a simple, lightweight trick that amplifies this natural concentration, leading to significant performance gains in complex mathematical reasoning tasks.
What Problem Does This Paper Address?
Distilling knowledge from a massive teacher model into a smaller student is standard practice. OPD is preferred over offline distillation because it reduces "distribution shift"—the student learns on the kind of data it will actually produce at inference time.
However, LLM training involves millions of tokens, and not all tokens are created equal. Some are trivial (like punctuation), while others represent critical logical leaps. This paper asks: How does the OPD loss actually allocate its "update budget" across these different tokens? By understanding the gradient-level behavior, we can potentially steer the optimization process more effectively.
Methods
The authors focus on the K2 estimator of reverse KL divergence, a common objective in OPD. Their primary contribution is a mathematical factorization of the gradient norm.
- Gradient Analysis: They derive that the $\ell_1$ norm of the per-token gradient factorizes into two intuitive parts:
- The Gap: The absolute difference in log-probabilities between the teacher and student ($|\Delta \log p_t|$).
- The Surprise: A student-side factor ($1 - \pi_S$) that increases as the student becomes less confident in the sampled token.
- SuRe (Surprise-aware Reweighting): Based on this analysis, they propose SuRe. Instead of treating every token's loss equally, SuRe applies a weight $w_t = 1 + \alpha(1 - \pi_S)$. This further boosts the importance of tokens the student finds surprising. Crucially, SuRe is "detached" (it doesn't add complexity to the gradient calculation) and requires no extra models or forward passes.
Datasets
- Training: The models were trained on the DeepMath dataset (specifically a "hard" split of 57k problems with difficulty $\ge 6$).
- Math Benchmarks: Evaluation was performed on AIME24, AIME25, AMC23, and MATH-500.
- Out-of-Domain (OOD) Benchmarks: To ensure the models didn't lose general capabilities, they were tested on CRUX (code), IFEval (instruction following), and MMLU-Pro (general knowledge).
Key Insights and Ideas
- Natural Concentration: The math reveals that OPD naturally ignores tokens the student is already confident about. Updates are inherently larger for "surprising" tokens.
- The "Joint Empirical Pattern": In math tasks, the authors found that the largest teacher-student gaps are also enriched in these low-probability regions. This means the update budget is even more concentrated than the math alone suggests.
- Update Budget Efficiency: As shown in their analysis, a tiny fraction of tokens (the top 10%) can account for nearly 75% of the total gradient mass.
- Surprise vs. Uncertainty: The authors argue that "surprise" (low probability of the sampled token) is a better signal for reweighting than general "uncertainty" (high entropy across all possible tokens).
Key Results
- Math Performance Boost: SuRe consistently outperformed vanilla OPD. On the AMC23 benchmark, SuRe improved the 1.7B student's
pass@8score by 7.5 percentage points over vanilla OPD. - Scalability: The benefits held across different student sizes (Qwen3-1.7B and Qwen3-4B).
- Robustness: Despite focusing heavily on "surprising" math tokens, the SuRe-trained models showed no clear degradation on out-of-domain tasks like code generation or general instruction following.
Limitations and Future Work
- Domain Specificity: The empirical findings are primarily based on mathematical reasoning. It remains to be seen if the same concentration patterns hold in more creative or conversational domains.
- Objective Functions: The analysis is specific to the reverse-KL objective using the K2 estimator. Other objectives (like Jensen-Shannon Divergence or Forward KL) might exhibit different gradient dynamics.
- Trajectory Dynamics: The current analysis treats tokens in isolation. A more complex analysis could look at how updates to one token affect the entire generated trajectory.
- Model Scale: The study used relatively small student models (up to 4B parameters). Testing SuRe on much larger scales (e.g., 70B+) is a natural next step.
Summary updated