Manuscript Offprint

arXiv:2610.02700

Learning from Evolving Errors: Adaptive Iterative Repair for On-Policy Distillation

Rui Li, Liyang He, Zheng Zhang, Zhenya Huang, Linbo Zhu, Qi Liu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

On-policy self-distillation (OPSD) supplies dense token-level feedback on trajectories sampled from the student's own policy, a richer training signal than the outcome-level rewards of reinforcement learning. This feedback comes from a teacher conditioned on a full reference solution unavailable to the student. The reference solution specifies the target but not how to move from the student's current error toward it, creating a solution-conditioned shortcut risk. We introduce AIR-OPD, an adaptive iterative repair framework for on-policy distillation that provides error-to-repair supervision. Given a failed response, a guidance generator synthesizes repair guidance for the current error. The student samples an on-policy retry with this guidance. If the retry remains incorrect, the generator produces new repair guidance for the newly observed error. At each round, a fixed teacher receives the guidance as privileged context and supervises the student on an error-aligned region of its latest failed response. Outcome-aware stage weighting favors early repair stages and credits stages whose immediate retry passes verification. We train AIR-OPD on the DAPO-Math-17K dataset and evaluate on AIME24, AIME25, and HMMT25, alongside out-of-distribution tests on MMLU-Pro and GPQA. We examine two guidance sources, self-guidance from the current student policy and external guidance from a larger model. For both Qwen3-4B and Qwen3-8B, AIR-OPD attains the best mathematical-reasoning averages, improving over the strongest baseline by up to 3.6 points, while preserving base-model performance on the out-of-distribution benchmarks.

1 INTRODUCTION

Reinforcement learning with verifiable rewards (RLVR) is now a standard approach to improving language-model reasoning in post-training (Shao et al., 2024; Yu et al., 2025). However, typical RLVR algorithms such as GRPO (Guo et al., 2025; Shao et al., 2024) rely on outcome rewards to compute response-level advantages for policy optimization. Such response-level supervision does not distinguish fine-grained token-level contributions within a trajectory. On-policy distillation (OPD) complements this outcome signal with dense token-level supervision on the student's own trajectories (Agarwal et al., 2024; Lu & Thinking Machines Lab, 2025). On-policy self-distillation (OPSD) further removes the need for a separate teacher model (Zhao et al., 2026). Through in-context learning, the model serves as its own teacher, conditioned on a reference solution as privileged context that the student never observes.

Learning with privileged information uses training-only signals to guide the learner (Vapnik & Vashist, 2009; Lopez-Paz et al., 2016). In reference-conditioned OPSD, a successful attempt already satisfies the verifier, and further conditioning on a static reference may steer the student toward the reference's solution path. Privileged supervision is thus most informative on failed attempts, and recent work treats successful and failed trajectories asymmetrically (Hou et al., 2026; Zheng et al., 2026). For failed trajectories, a reference solution identifies the correct destination but does not specify the transition from the student's current error to a valid continuation. When the teacher remains conditioned on that same full solution, the student may learn to imitate privileged demonstrations rather than acquire generalizable error-correction mechanisms. We refer to this as the solution-conditioned shortcut risk.

This leads to our central research question:

How can privileged supervision turn a failed on-policy trajectory into a sequence of learnable error-to-repair transitions?

To answer this question, we introduce AIR-OPD. Inspired by instructional scaffolding (Wood et al., 1976), AIR-OPD performs multi-round adaptive repair that replaces a static reference-conditioned target with repair guidance synthesized for the student's latest error. Given a failed response, a privileged guidance generator uses the reference solution to synthesize repair guidance as scaffolding for the identified error, and the student samples an on-policy retry with this guidance. If the retry remains incorrect, the generator synthesizes fresh repair guidance targeting the newly observed error. At every round, the guidance serves as teacher-only privileged context for supervising the student on its latest failed response. AIR-OPD supervises only an error-aligned repair region of that response and excludes tokens that the repair guidance does not target, which would otherwise add noise. Each round thus contributes one stage loss. To combine these losses across rounds, we design outcome-aware stage weighting, which favors earlier repair stages and rewards stages whose retry passes verification.

We train on mathematical problems from DAPO-Math-17K (Yu et al., 2025), pairing each problem with a reference solution generated by GPT-5.5, and evaluate on AIME24, AIME25, and HMMT25. We additionally test transfer beyond this mathematical training distribution on MMLU-Pro and GPQA, and compare two guidance sources, self-guidance from the current student policy and external guidance from a larger model. Across these settings, AIR-OPD attains the best mathematical-reasoning averages on both Qwen3-4B and Qwen3-8B while preserving base-model performance on the out-of-distribution (OOD) benchmarks.

Our contributions are:

  1. We introduce AIR-OPD, an adaptive iterative repair framework that aligns privileged on-policy supervision with the student's evolving errors. AIR-OPD synthesizes error-specific repair guidance and updates it in response to subsequent failed on-policy attempts.

  2. We develop an error-aligned distillation objective that uses newly synthesized guidance as privileged teacher context when scoring the current failed response. Each supervision region covers the span where the teacher still expresses correction, and outcome-aware stage weighting allocates supervision across repair stages.

  3. Across Qwen3-4B and Qwen3-8B with self- and external guidance, AIR-OPD improves average mathematical-reasoning accuracy by up to 3.6 percentage points over the strongest evaluated baseline, while keeping average OOD performance near that of the base model. Ablations support the roles of error-aligned supervision and stage weighting.

References (69)