TL;DR
Training a language model by letting it generate its own mistakes and having a "teacher" correct it token-by-token—known as On-Policy Distillation (OPD)—sounds like the ultimate post-training recipe, yet it mysteriously collapses into gibberish on some tasks while excelling at others. This paper cracks open the black box of OPD and its self-taught cousin (OPSD), revealing the exact mathematical bugs and distributional quirks behind these failures. Better yet, it hands us a clean toolkit of fixes to keep models from losing their minds during training.
What Problem Does This Paper Address?
Imagine learning to play chess. Standard off-policy distillation is like memorizing grandmaster games: great in theory, until you make one weird move in a real match and find yourself in unfamiliar territory. On-Policy Distillation (OPD) fixes this by letting the student model generate its own responses (trajectories) and asking a stronger teacher model to grade every single token along the way. A trendy variant, On-Policy Self-Distillation (OPSD), skips the external teacher entirely—instead, the student teaches itself by peeking at "privileged information" (PI) during training, like the ground-truth math answer or a detailed system prompt.
The catch? Literature on OP(S)D is a mess of contradictions. Some papers hail it as a miracle for internalizing prompts and reasoning; others report catastrophic collapse, where the student suddenly starts repeating the word "maybe" thousands of times. The authors ask a foundational question: When do OPD and OPSD actually work, why do they fail, and how do we stabilize them?
Methods
To diagnose and cure OPD's instabilities, the authors dissect standard training pipelines and introduce three practical stabilizers:
- Fixing the Loss Function: Standard OPD minimizes the Reverse Kullback-Leibler (KL) divergence across the entire vocabulary—a memory-heavy operation. Engineers usually save VRAM by truncating to the Top-$K$ tokens. The authors prove mathematically that naive Top-$K$ truncation breaks a crucial gradient cancellation, leaving behind a biased $+1$ term that actively suppresses good teacher tokens unless the teacher is massively more confident than the student. To fix this, they propose Stop-Gradient Top-$K$ KL (treating the log-probability ratio as a detached advantage, like in policy gradients) and Renormalized Top-$K$ KL. To further save memory in inference engines like SGLang, they only backpropagate on the intersection of the teacher's and student's Top-$K$ sets.
- RLVR-Adapted Teachers: Instead of grabbing a giant off-the-shelf teacher, they first adapt a smaller teacher to the target dataset using Reinforcement Learning with Verifiable Rewards (RLVR, specifically DAPO/GRPO) so its speaking style better matches the student's.
- SFT Warm-up: Before running OPD on raw base models, they apply Supervised Fine-Tuning (SFT) on teacher traces so the student doesn't feed garbled Unicode nonsense into the teacher.
Datasets
The authors rely on existing benchmarks across three distinct regimes (no new datasets are introduced):
- Math & Scientific Reasoning: OpenThoughts and DAPO-Math-17k for training; Math500, AIME24, AIME25, and GPQA-Diamond for evaluation.
- Style & Persona Alignment: CharacterBench and EmotionBench.
- System Prompt Internalization (Safety & Compression): Wildguardmix (adversarial safety) and DAPO-Math-17k (for compressing long chain-of-thought traces).
Key Insights and Ideas
Three core mechanisms explaining why OP(S)D fails.
- Student Prefixes Confuse Strong Teachers: In OPD, the teacher must grade continuations of the student's half-baked thoughts. Forced down an unnatural reasoning path, the teacher panics and assigns high probabilities to backtracking words like "wait" or "but". The student dutifully learns to spam hesitation tokens until its context window explodes.
- Why Self-Distillation (OPSD) Fails at Math: Because the student doesn't get to see the privileged cheat-sheet at test time, OPSD mathematically forces the student to learn the geometric mean of all PI-conditioned teachers. When PI is a shared rule (like a global safety prompt or persona style), averaging across examples distills a clean, reusable habit. When PI is instance-specific (like the answer
42for problem A andx=7for problem B), averaging incompatible answers yields a watered-down, useless policy—and giving richer full-solution cheat sheets actually makes the distribution mismatch worse! - Compatibility Beats Raw IQ in Teachers: A massive teacher isn't always a better teacher. A smaller teacher trained via RL on the target domain shares much higher vocabulary overlap with the student, providing smoother, locally compatible supervision without triggering trajectory wars.
Key Results
- Quantifying Prefix Distortion: On GPQA-Diamond, a standalone Qwen3-14B teacher scores 62.1%. When forced to continue prefixes generated by a Qwen3-1.7B student, that exact same teacher's accuracy plummets to 46.0%.
- Curing Collapse: Under naive Top-20 Reverse KL on OpenThoughts, a Qwen3-1.7B student collapses around step 700—its 3-gram repeat ratio hits 0.9984 by step 1000 (spamming "maybe") and Math500 accuracy drops near zero. Switching to Stop-Gradient or Renormalized Top-$K$ completely eliminates collapse and sustains accuracy near 0.75–0.80 on Math500.
- RLVR Teacher Triumph: A Qwen3-1.7B-GRPO teacher matches a much larger Qwen3-8B model on standalone benchmarks (~82–83% on Math500, ~28–30% on AIME24), yet significantly outperforms the 8B teacher when distilling into a 1.7B student due to higher Top-20 token overlap.
- Where OPSD Shines: On CharacterBench and EmotionBench, OPSD converges faster and scores higher than both PPO and GRPO under identical sampling budgets. For reasoning compression on Qwen3-8B, OPSD slashes response lengths from ~5000 to ~3000 tokens without hurting MATH-500 Pass@1 (~93%).
Limitations and Future Work
The authors note that their experiments focus on a specific slice of model families and scales (primarily Qwen3 models ranging from 1.7B to 14B); frontier-scale models might handle student prefixes or self-distillation dynamics differently. Looking ahead, they envision an iterative self-improvement loop that marries all three post-training paradigms: SFT to establish clean formatting, RL to discover stronger task-specific behaviors, and stabilized OPD to efficiently compress those gains back into the student.
Summary updated