A Token-Level Analysis of Sampled-Token Reverse-KL On-Policy Distillation
Organizations: College of Computer Science and Artificial Intelligence, Fudan University
Abstract
On-policy distillation (OPD) supervises a student on its own trajectories with token-level signals from a frozen teacher, yet how a sampled loss allocates updates across tokens remains poorly understood. We analyze the gradient of the per-token K2 estimator of reverse KL with respect to the student logits. The norm of this gradient factorizes into the absolute teacher--student log-probability gap and a student-side softmax factor that grows as the sampled token becomes less likely under the student. In our math-distillation runs, these per-token norms are highly non-uniform: low-student-probability tokens account for a disproportionate share of their sum and are also enriched in large teacher--student gaps. As a lightweight intervention suggested by this analysis, we study Surprise-aware Reweighting (SuRe), a detached, bounded weighting rule that further amplifies this existing allocation. Across two Qwen3 student scales, SuRe improves several math metrics over vanilla OPD and shows no clear degradation on the selected out-of-domain benchmarks. Our primary contribution is therefore a gradient-level characterization of reverse-KL OPD trained with the K2 estimator, with SuRe as one empirical instantiation.
Figures & tables
| AIME24 | AIME25 | AMC23 | MATH-500 | |||||
| Methods | avg@ | pass@ | avg@ | pass@ | avg@ | pass@ | avg@ | pass@ |
| Qwen3-1.7B-Base | ||||||||
| - Base | 4.17 | 16.67 | 4.17 | 16.67 | 30.00 | 65.00 | 56.35 | 76.80 |
| - KD | 7.08 | 20.00 | 3.33 | 13.33 | 30.94 | 67.50 | 56.45 | 75.60 |
| - SeqKD | 5.83 | 20.00 | 4.17 | 20.00 | 32.19 | 72.50 | 56.25 | 74.80 |
| - Vanilla OPD | 9.17 | 16.67 | 5.83 | 16.67 | 39.38 | 67.50 | 66.55 | 80.80 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Hyper-parameter | Qwen3 (8B 1.7B) | Qwen3 (8B 4B) |
| Student model | Qwen3-1.7B-Base | Qwen3-4B-Base |
| Teacher model | Qwen3-8B | Qwen3-8B |
| Optimizer | AdamW | AdamW |
| Learning rate | ||
| LR warmup steps | 10 | 10 |
| Training epochs | 2 | 2 |
| CRUX | IFEval | MMLU-Pro | |||||||
| Method | @1 | @5 | @10 | @1 | @5 | @10 | @1 | @5 | @10 |
| Qwen3-1.7B-Base | |||||||||
| Base | 4.75 | 21.75 | 33.12 | 22.92 | 47.50 | 57.86 | 27.07 | 62.94 | 78.17 |
| Vanilla OPD | 35.38 | 63.00 | 70.62 | 27.73 | 44.18 | 53.97 | 26.44 | 57.32 | 69.91 |
| SuRe ( ) | 34.62 | 63.25 | 71.12 | 26.80 | 44.92 | 53.05 | 26.52 | 57.37 | 69.98 |
| SuRe ( ) | 34.75 | 60.88 | 68.50 | 27.17 | 44.92 | 52.68 | 26.86 | 57.31 | 69.56 |
| Item | Content |
|---|---|
| Task | MATH-500 example asking for primes such that has no solution. |
| Config | Qwen3-1.7B OPD student at step ; Qwen3-1.7B-Base as base; Qwen3-8B as teacher; temperature , top- , max length . |
| Prompt | “Determine the sum of all such . Please reason step by step, and put your final answer within \boxed{} .” |
| Response sketch | The student argues that the congruence is solvable iff ; only the prime divides ; therefore the answer is . |
| Global pattern | response tokens; mean JS ; only of tokens have JS . |
| Where | Sampled token | OPD vs. base | Interpretation |
|---|---|---|---|
| After “analyze the given congruence” | newline after “:” | rank , | The final OPD checkpoint ranks the transition into displayed-equation format more highly than Base. |
| At the key concept “invertible modulo ” | emphasis marker before “invertible” | rank , | The largest endpoint difference occurs where the solution introduces the modular-inverse idea. |
| At the restatement “which primes …” | the transition token “the” | rank , | Some large endpoint differences occur on discourse or fluency tokens, not only mathematical symbols. |
| At an intermediate mention of the answer | token “2” | rank , | The final OPD checkpoint assigns this token lower probability than Base; the final answer remains correct, but the local confidence profile differs. |
| Hyper-parameter | KD | SeqKD | GRPO |
|---|---|---|---|
| Data source | DeepMath hard | Teacher rollouts | DeepMath hard |
| Teacher model | Qwen3-8B | Qwen3-8B | – |
| Supervision | Token-level | Sequence sampled from | Verifiable answer reward |
| Loss | Forward KL on teacher tokens | SFT cross-entropy on teacher seq. | GRPO clipped policy gradient |
| Rollout sampling | off-policy (teacher) | off-policy (teacher) | on-policy (student) |
| Generation temperature | – | 1.0 | 1.0 |
| AIME24 | AIME25 | AMC23 | MATH-500 | |||||
|---|---|---|---|---|---|---|---|---|
| Method | avg@ | pass@ | avg@ | pass@ | avg@ | pass@ | avg@ | pass@ |
| GRPO | 8.33 | 23.33 | 4.17 | 20.00 | 41.56 | 70.00 | 65.80 | 79.00 |
| SuRe ( ) | 9.58 | 23.33 | 7.08 | 16.67 | 43.12 | 75.00 | 67.65 | 80.80 |
| AIME24 | AIME25 | AMC23 | MATH-500 | |||||
|---|---|---|---|---|---|---|---|---|
| Training objective | avg@ | pass@ | avg@ | pass@ | avg@ | pass@ | avg@ | pass@ |
| Vanilla OPD | 9.17 | 16.67 | 5.83 | 16.67 | 39.38 | 67.50 | 66.55 | 80.80 |
| Mean-normalized SuRe | 10.00 | 20.00 | 4.58 | 10.00 | 41.88 | 72.50 | 69.20 | 82.20 |
| Exact-shuffled | 10.00 | 23.33 | 5.83 | 23.33 | 38.44 | 70.00 | 67.95 | 81.00 |
| Exact rank-reversed | – | – | – | – | – | – | 67.00 | 81.40 |
| Mean-normalized uplift-only | 9.58 | 26.67 | 4.17 | 13.33 | 39.38 | 72.50 | 68.40 | 81.40 |
| Seed | Vanilla OPD | Original SuRe |
|---|---|---|
| 42 | 66.55 | 67.65 |
| 43 | 66.40 | 67.50 |
Language Model Distillation
Language model distillation transfers a larger model’s capabilities to smaller or specialized models using outputs, probabilities, or internal representations.
See all 506 papers