TL;DR
On-Policy Distillation (OPD) is a powerful way to transfer knowledge from teacher to student LLMs, but teacher guidance can sometimes contradict the actual correctness of a response. This paper introduces Reward-Aligned On-Policy Distillation (RA-OPD), a simple and elegant filtering mechanism that discards these reward-misaligned training trajectories. Without adding any extra computational or rollout overhead, RA-OPD significantly boosts student model performance across major math and code reasoning benchmarks.
What Problem Does This Paper Address?
When distilling large language models (LLMs), On-Policy Distillation (OPD) has become the gold standard. Unlike off-policy distillation (where a student learns from static teacher text), OPD forces the student to generate its own text prefixes, which the teacher then evaluates. This minimizes the training-inference mismatch.
However, teacher guidance isn't infallible. For complex, verifiable tasks like mathematics or coding, the ultimate goal is to maximize outcome correctness (the final reward). During OPD, a teacher model might mistakenly praise an incorrect student trajectory because it contains locally plausible patterns. Conversely, it might penalize a perfectly correct student trajectory simply because it deviates from the teacher's preferred stylistic distribution. This "reward-misaligned" guidance misleads the student's optimization process, causing training instability or performance degradation.
Prior attempts to fix this either looked only at local token-level metrics or relied on expensive relative consistency checks (like Uni-OPD) that require generating multiple rollouts per prompt, drastically inflating training times.
Methods
The authors propose Reward-Aligned On-Policy Distillation (RA-OPD), an absolute, group-free reliability check.
Instead of evaluating guidance token-by-token or comparing multiple responses, RA-OPD aggregates token-level teacher guidance into a single trajectory-level distillation return ($G_i$). It then cross-references this return with a binary outcome reward ($R_i$) obtained from a hard verifier (e.g., a code execution environment or a math answer checker).
The filtering logic is straightforward:
- Keep a correct trajectory ($R_i = 1$) only if the teacher's distillation return is non-negative ($G_i \ge 0$).
- Keep an incorrect trajectory ($R_i = 0$) only if the teacher's distillation return is non-positive ($G_i \le 0$).
If a trajectory violates these rules (e.g., the student got the answer wrong but the teacher gave it a highly positive return), it is masked out before the policy update occurs. Because it reuses the student rollouts and teacher probabilities already computed for standard OPD, it introduces virtually zero computational overhead.
Datasets
The method was rigorously evaluated on two demanding domains:
- Mathematics: Trained on DAPO-Math-17K. Evaluated across seven benchmarks: AIME24/25/26, AMC, MATH, Minerva Math, and OlympiadBench.
- Code Generation: Trained on Eurus-2-RL-Data-Code-25K. Evaluated across three benchmarks: HumanEval+, MBPP+, and LiveCodeBench v6.
Key Insights and Ideas
- Misalignment is Prevalent: The authors discovered that reward-misaligned trajectories are incredibly common throughout training, averaging 48.63% in the Qwen3 setting and 68.23% in the DeepSeek-R1 setting.
- Dynamic Filtering: Early in training, almost all correct trajectories are filtered out because the student's unique correct paths don't match the teacher's style. As training progresses and the student policy improves, the teacher begins assigning higher probabilities to these correct paths, allowing more correct trajectories to pass through the filter.
- Absolute vs. Relative Decisions: Unlike previous methods that require multiple rollouts to rank trajectories against each other, RA-OPD makes an independent, absolute decision for every single trajectory. This makes it highly modular and compatible with single-rollout training pipelines.
Key Results
RA-OPD consistently outperformed standard OPD and other competitive baselines (like ExOPD and Uni-OPD) across both model families tested (Qwen3 and DeepSeek-R1).
- Math Performance: For a Qwen3-8B-Base student, RA-OPD achieved an average accuracy of 49.43% across seven math benchmarks, outperforming standard OPD by 5.09 percentage points.
- Code Performance: On code generation tasks, RA-OPD achieved an average score of 58.97%, beating standard OPD by 3.93 points.
- Training Efficiency: While Uni-OPD achieved decent results, it required 3.22× more training time than RA-OPD due to its multi-rollout requirement. RA-OPD added a mere 0.1 hours of total training time over standard OPD.
Limitations and Future Work
The primary limitation of RA-OPD is its reliance on a binary outcome verifier. This makes it exceptionally well-suited for objective fields like mathematics and software engineering where answers can be strictly validated. However, extending RA-OPD to open-ended or subjective tasks (such as creative writing or general dialogue)—where ground-truth outcome rewards are difficult or expensive to compute automatically—remains an open challenge for future research.
Summary updated