betaFeedback

WorksComputer Science

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

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.

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 [7] (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 [1, 26]. 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 [24] (Vapnik & Vashist 2009). 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 [11] (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.

  1. 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.

  1. 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.

Related Work

Reinforcement learning with verifiable rewards. Building on reinforcement learning from human feedback (Schulman et al., 2017; Ouyang et al., 2022), reinforcement learning with verifiable rewards (RLVR) improves language-model reasoning using rewards from automatically checkable outcomes [21, 7] (Yu et al. 2025). DeepSeekMath introduces Group Relative Policy Optimization (GRPO) for mathematical reasoning (Shao et al., 2024), while DAPO advances large-scale reasoning training through improved sampling and policy optimization (Yu et al., 2025). Process-level rewards densify this outcome signal by scoring intermediate steps [22] (Wang et al. 2024a), yet the supervision remains a scalar reward rather than a token-level target. For group-relative methods such as GRPO, difficult samples on which all rollouts are incorrect provide no relative advantage signal for updating the policy. To address this limitation, hint-based RL uses auxiliary guidance to make hard problems more tractable and recover useful training signals [2, 5]. StepHint guides exploration with partial solution steps (Zhang et al., 2026a). NuRL injects abstract hints when independent attempts fail [3], while Scaf-GRPO provides progressively more detailed hints from a pre-generated, fixed hierarchy (Zhang et al., 2026b). HiLL further learns hints conditioned on the reasoner’s current failures, seeking to restore informative reward variation while encouraging transfer to no-hint reasoning (Xia et al., 2026). While these approaches use hints to reduce effective task difficulty and recover outcome-based reward signals (from fixed pre-generated hierarchies or from a learned hinter), AIR-OPD synthesizes repair guidance for each failed response during multi-turn repair and uses it as privileged teacher context for token-level supervision of the repair.

On-policy (self-) distillation. Knowledge distillation trains a student to match a teacher’s output distribution [8, 15]. On-policy distillation (OPD) instead has the teacher score responses sampled from the student’s own policy [23, 1, 6, 17, 26] (Ross et al. 2011), avoiding the mismatch between fixed demonstrations and the states the student reaches at deployment. OPSD extends OPD through in-context self-distillation, where the same model produces teacher and student distributions under asymmetric contexts (Zhao et al., 2026). In the reference-conditioned setting, the teacher receives a reference solution that is unavailable to the student, yielding dense token-level feedback on states that the student actually visits. Subsequent methods adjust the strength or routing of this signal using outcomes, reliability, or trajectory structure [11] (Zheng et al. 2026; Zhang et al. 2026c). Closer to our setting, several distillation methods anchor supervision at failures (Xu et al., 2026; Wang et al., 2026). HINT-SD distills a feedback-conditioned teacher on failure-relevant spans selected in hindsight (Yeo et al., 2026), and TAPO inserts a diagnosis-and-correction transition after the learner’s first critical error [14]. Across these methods, the corrected trajectory or privileged context is constructed in a single pass and does not respond to how the learner fails again. We focus on how privileged context should be updated from one failed retry to the next.

Self-correction and iterative refinement. Inference-time methods treat an initial response as an intermediate state and use subsequent feedback to revise it. Self-Refine alternates self-generated feedback and refinement [27], while Reflexion converts task feedback into verbal reflections that guide later trials (Shinn et al., 2023). Their effectiveness depends on the information in the feedback, as language models struggle to identify and repair complex reasoning mistakes without external reference signals [13].

Training-time methods instead seek to internalize improvement behavior. Self-training bootstraps from the model’s own verified rationales [10] (Zelikman et al. 2022; Singh et al. 2024), RISE fine-tunes on multi-turn revision trajectories (Qu et al., 2024), SCoRe learns multi-turn self-correction under the model’s own distribution via reinforcement learning [19], and SuperCorrect distills teacher-generated thought templates and correction traces (Yang et al., 2025). AIR-OPD uses iterative repair to construct error-aligned distillation targets on the student’s own failed responses: at each stage, a teacher conditioned on newly synthesized repair guidance supervises the current response.

Preliminaries: On-Policy Self-Distillation

Let qq denote a problem and pθp_{\theta} a trainable student policy that defines next-token distributions given a conditioning context. On-policy distillation (OPD) trains the student on states that it actually visits [1, 26]. Given a response y∼pθ(⋅∣q)y \sim p_{\theta}(\cdot\mid q) sampled from the current policy, a teacher pTp_{\mathrm{T}} scores every token yjy_j given its prefix y<jy_{<j} (tokens indexed from 0), and OPD minimizes the token-level divergence

LOPD(q,y)=1∣y∣∑j=0∣y∣−1D(pT(⋅∣q,y<j)∥pθ(⋅∣q,y<j)).(1)\mathcal{L}_{\mathrm{OPD}}(q,y)=\frac{1}{|y|}\sum_{j=0}^{|y|-1}D\left(p_{\mathrm{T}}(\cdot\mid q,y_{<j})\mathbin{\|}p_{\theta}(\cdot\mid q,y_{<j})\right). \tag*{(1)}

Because the response is sampled from pθp_{\theta}, the teacher provides dense feedback on prefixes generated by the evolving student. In OPD, the teacher is typically a separate, more capable model.

On-policy self-distillation (OPSD) further initializes the student and the teacher from the same model, removing the need for a separately trained teacher (Zhao et al., 2026). Providing the reference solution zz as additional input to the teacher gives it information that the student cannot access. Here the teacher pTp_{\mathrm{T}} is instantiated as the frozen initial backbone pˉ\bar{p}. For an on-policy response y∼pθ(⋅∣q)y \sim p_{\theta}(\cdot\mid q), distillation compares the two branches at the same student-generated prefixes y<jy_{<j}. The teacher conditions on (q,z,y<j)(q, z, y_{<j}), the student conditions on (q,y<j)(q, y_{<j}), and the OPSD loss is

LOPSD(q,z,y)=1∣y∣∑j=0∣y∣−1D(pT(⋅∣q,z,y<j)∥pθ(⋅∣q,y<j)),(2)\mathcal{L}_{\mathrm{OPSD}}(q,z,y)=\frac{1}{|y|}\sum_{j=0}^{|y|-1}D\left(p_T(\cdot\mid q,z,y_{<j})\mathbin{\|}p_\theta(\cdot\mid q,y_{<j})\right), \tag*{(2)}

where only the teacher branch observes zz. Following OPSD, we instantiate DD as the forward KL divergence DKL(pT∥pθ)D_{\mathrm{KL}}(p_T\mathbin{\|}p_\theta) and apply pointwise clipping, which caps each vocabulary entry’s divergence contribution so that a few high-divergence tokens cannot dominate the update.

In OPSD, in-context learning thus converts the reference solution into fine-grained supervision over the probability of each token in the student’s on-policy response. However, under this construction, the teacher must extract relevant information from the complete reference solution and relate it to the student’s current reasoning response. This process is performed implicitly and does not explicitly teach the student how to transition from its current error state to a valid solution state.

Air-OPD: Adaptive Iterative Repair for On-Policy Distillation

Air-OPD makes explicit the extraction step that OPSD leaves to the teacher (Figure 1). A guidance generator reads the reference solution and writes repair guidance for the student’s current error, and the teacher receives this guidance in place of the full reference solution. The rest of the method answers three questions: how the guidance is updated across repair rounds (§ 4.1), which tokens of each failed response the teacher supervises (§ 4.2), and how the resulting stage losses are combined (§ 4.3).

Figure 1. Overview of AIR-OPD. When an on-policy rollout fails verification, the guidance generator G\mathcal{G} quotes the first flawed step as an error anchor ata_t and synthesizes repair guidance gtg_t. A frozen teacher conditioned on gtg_t then supervises the student over the error-aligned repair region RtR_t, and the student retries with the guidance in context. A verified retry ends the trajectory, and outcome-aware stage weighting combines the stage losses with weights wt∝γtρstw_t \propto\gamma^t\rho^{s_t}.

Multi-round adaptive repair

Air-OPD performs up to KK repair rounds, adapting the guidance to the student’s latest failed response. Let Ht\mathcal{H}_t denote the student-visible dialogue history at stage tt, with H0\mathcal{H}_0 containing only the problem qq. The student generates an on-policy response

yt∼pθ(⋅∣Ht).(3)y_t \sim p_\theta(\cdot\mid\mathcal{H}_t). \tag*{(3)}

If yty_t fails verification by an outcome verifier VV, the guidance generator G\mathcal{G} uses the reference solution zz to diagnose the current failure and produce

(at,gt)=G(q,z,Ht,yt).(4)(a_t, g_t) = \mathcal{G}(q, z, \mathcal{H}_t, y_t). \tag*{(4)}

Here, ata_t quotes the identified first flawed step verbatim, and gtg_t provides concise guidance for correcting it. Rule-based checks filter out guidance that reveals the final answer (Appendix § 10 details the rules).

To advance the repair process, we prompt the student to repair the previous erroneous response yty_t according to gtg_t:

Ht+1=Update⁡(Ht,yt,gt).(5)\mathcal{H}_{t+1} = \operatorname{Update}(\mathcal{H}_t, y_t, g_t). \tag*{(5)}

Update appends yty_t to the history as the model’s own output turn, and appends gtg_t, rendered with a repair instruction, as the next input turn. If budget remains, the student then generates the retry yt+1∼pθ(⋅∣Ht+1)y_{t+1} \sim p_\theta(\cdot\mid\mathcal{H}_{t+1}); if the retry remains incorrect, G\mathcal{G} re-localizes the error in yt+1y_{t+1} and generates updated guidance. The process ends when a response passes verification or the budget is exhausted. Throughout this process, the privileged context keeps adapting to the student’s current error state. Appendix § 12.§ 1 presents worked repair examples from training.

Error-aligned privileged distillation

At stage tt, the teacher and student score the same failed response yty_t under the shared dialogue history Ht\mathcal{H}_t. The frozen teacher pTp_T additionally receives the newly generated guidance gtg_t, which is withheld from the student when scoring yty_t.

To cover both the current error and the potentially recoverable region that follows, the supervision region starts at the beginning of the error region. We exactly match ata_t against yty_t to obtain the start position btb_t. Supervising the error region alone would lose this recoverable region, so we rely on the corrective signal from the teacher to determine the endpoint of the supervision region. At position jj, we measure this signal as the total positive teacher–student probability difference over alternatives to the observed token:

Ct,j=∑v≠yt,j[pT(v∣Ht,gt,yt,<j)−pθ(v∣Ht,yt,<j)]+.(6)C_{t,j} = \sum_{v \ne y_{t,j}} \left[p_T(v \mid\mathcal{H}_t, g_t, y_{t,<j}) - p_\theta(v \mid\mathcal{H}_t, y_{t,<j})\right]_+. \tag*{(6)}

Both distributions are already computed for the stage loss, so measuring this signal introduces no additional computational overhead.

To avoid ending the region within a reasoning block, we partition the suffix of yty_t starting at btb_t at blank-line boundaries. Let EtE_t denote the resulting block endpoints, including the response end ∣yt∣\lvert y_t\rvert. For a tolerance ϵ∈(0,1)\epsilon\in(0,1), we select the earliest endpoint retaining at least a 1−ϵ1-\epsilon fraction of the suffix’s total corrective signal:

et=min⁡{r∈Et:∑j=btr−1Ct,j≥(1−ϵ)∑j=bt∣yt∣−1Ct,j}.(7)e_t = \min\left\{r \in E_t : \sum_{j=b_t}^{r-1} C_{t,j} \ge(1-\epsilon)\sum_{j=b_t}^{\lvert y_t\rvert-1} C_{t,j}\right\}. \tag*{(7)}

By construction, the discarded tail carries at most an ϵ\epsilon fraction of the suffix’s total corrective signal. If the total signal is zero, we retain the full suffix. Following Eq. (2), the stage loss averages the divergence over the selected repair region Rt=yt[bt:et]R_t = y_t[b_t:e_t], i.e., tokens btb_t to et−1e_t - 1:

Lt=1et−bt∑j=btet−1D(pT(⋅∣Ht,gt,yt,<j)∥pθ(⋅∣Ht,yt,<j)).(8)\mathcal{L}_t = \frac{1}{e_t-b_t}\sum_{j=b_t}^{e_t-1} D\left(p_T(\cdot\mid\mathcal{H}_t, g_t, y_{t,<j}) \mathbin{\|} p_\theta(\cdot\mid\mathcal{H}_t, y_{t,<j})\right). \tag*{(8)}

Gradients flow only through the student branch.

Outcome-aware stage weighting

Training samples contain different numbers of repair stages, and directly summing stage losses would grant samples with more repair rounds a larger total weight. To avoid this, we introduce outcome-aware stage weighting. The scheme allocates the stage weights within each supervised trajectory by stage depth and the outcome of the retry immediately following each stage.

This allocation rests on two assumptions about the repair process. First, imperfect retries accumulate noise across stages. The later a stage is, the more failed responses and repair guidance accumulate in its context and the less reliable its supervision signal becomes, so the weights should lean toward earlier stages. Second, whether the immediate retry passes verification reflects the stage’s supervision quality. A successful retry indicates that the stage’s repair guidance pointed to a valid repair, and such a stage should receive an additional weight bonus.

Concretely, for trajectory nn with final supervised stage TnT_n and stage losses Ln,t\mathcal{L}_{n,t} (Eq. (8)), let sn,t=1[V(yn,t+1)=1]s_{n,t} = \mathbb{1}[V(y_{n,t+1}) = 1] indicate whether the on-policy retry immediately following stage tt passes the outcome verifier VV, with sn,t=0s_{n,t} = 0 when no retry is available (after the final round). The stage weights are

wn,t=w~n,t∑k=0Tnw~n,k,w~n,t=γtρsn,t,w_{n,t} = \frac{\widetilde{w}_{n,t}}{\sum_{k=0}^{T_n} \widetilde{w}_{n,k}}, \qquad\widetilde{w}_{n,t} = \gamma^t \rho^{s_{n,t}},
γ∈(0,1],ρ≥1.(9)\gamma\in(0,1], \qquad\rho\ge1. \tag*{(9)}

The temporal factor γt\gamma^t (with γ<1\gamma< 1) decays the weights with stage depth, the outcome bonus ρsn,t\rho^{s_{n,t}} rewards a verified immediate retry, and the normalization gives each supervised trajectory unit total weight.

For a minibatch of repair trajectories B\mathcal{B}, the final objective is

LAIR−OPD=1∣B∣∑n∈B∑t=0Tnwn,tLn,t.(10)\mathcal{L}_{\mathrm{AIR-OPD}} = \frac{1}{|\mathcal{B}|} \sum_{n \in\mathcal{B}} \sum_{t=0}^{T_n} w_{n,t}\mathcal{L}_{n,t}. \tag*{(10)}

The complete algorithm is summarized in Appendix § 9.

Experimental Setup

Models, training data, and baselines

We use two Qwen variants of different scales, Qwen3-4B and Qwen3-8B (Qwen Team, 2025). We train on the DAPO-Math-17K dataset (Yu et al., 2025), generating the reference solution for each problem with GPT-5.5 and retaining the 15,650 problems whose generated solution verifies against the dataset answer. Outcome verification at every repair round uses rule-based answer matching. We compare self-guidance generated by the current student policy with external guidance generated by a larger model (Qwen3.5-27B). The main baselines are the corresponding base model and three trained methods. Supervised fine-tuning (SFT) trains on the reference solutions with a cross-entropy loss. GRPO optimizes rule-based outcome rewards over groups of on-policy rollouts. OPSD distills a reference-conditioned teacher on the student’s own rollouts. All trained baselines are our reproductions on the same training corpus and backbones (Appendix § 11).

Evaluation benchmarks and metrics

We evaluate models along two dimensions, mathematical reasoning and out-of-distribution generalization. Mathematical reasoning is evaluated on AIME24, AIME25, and HMMT25 (HMMT, [9]). Each mathematical benchmark contains 30 problems. We report per-benchmark accuracy as Avg@12, with Math Avg. the unweighted mean of the three benchmark scores. Out-of-distribution evaluation uses MMLU-Pro (Wang et al., 2024b) and GPQA (Rein et al., 2024) to assess transfer beyond the mathematical training distribution, reporting accuracy as Avg@4, with OOD Avg. the mean of the two benchmarks. During evaluation, no repair guidance is added to the model input.

Implementation details

We adopt the OPSD training recipe (Zhao et al., 2026), using the frozen initial backbone with its adapters disabled as the distillation teacher. During training, the student operates in non-thinking mode and the teacher in thinking mode. Optimization uses rank-64 LoRA adapters (Hu et al., [12]) and AdamW (Loschilov & Hutter, [25]) with a learning rate of 5×10−65 \times10^{-6} and an effective batch size of 32.

AIR-OPD is built on TRL (von Werra et al., 2020) and trains for 100 optimizer steps. Each problem allows at most K=3K = 3 adaptive repair rounds, and each round samples a single on-policy rollout from the current student (temperature 1.1, top-pp 0.95), capped at 8,192 tokens. Sampler weights are synchronized after every optimizer step. The default stage weighting is (γ,ρ)=(0.8,1.5)(\gamma, \rho) = (0.8, 1.5), and the endpoint budget is ϵ=0.1\epsilon= 0.1. Both guidance sources are generated in thinking mode (temperature 0.7, top-pp 0.9) and filtered by the same validation rules. All experiments are conducted on a single node with eight H100 GPUs. Appendix C documents the complete training and evaluation configuration.

Main Results

AIR-OPD achieves the best mathematical reasoning at both scales. Table 1 compares AIR-OPD against the base model, SFT, GRPO, and OPSD. Both guidance settings surpass every baseline on Math Avg., and external guidance, where a stronger generator supplies higher-quality repair guidance, exceeds the strongest baseline, OPSD, by 3.6 and 2.7 points at 4B and 8B, respectively. The improvement is consistent across benchmarks. AIR-OPD variants attain the best score on every mathematical benchmark at both scales, with pronounced gains on HMMT25.

Self-guidance alone accounts for most of the improvement. Without introducing any external model, the self-guided variant already improves over OPSD by 2.8 and 2.1 Math Avg. points. External guidance further improves the Math Avg. The additional gain from external guidance is smaller at 8B than at 4B, possibly because the larger student generates better repair guidance itself.

AIR-OPD attains stronger mathematical reasoning while preserving near-base OOD performance. SFT lowers the OOD average by 9.6 and 9.8 points at 4B and 8B, consistent with forgetting under task-specific fine-tuning (Kirkpatrick et al., [16]; Kotha et al., [18]), and OPSD also regresses at both scales. In contrast, AIR-OPD stays within 0.4 points of the base model at 4B and within 0.1 points at 8B. It is the only evaluated reference-based training method that maintains a near-base OOD average at both scales. GRPO preserves OOD performance comparably, but its Math Avg. trails AIR-OPD by 2.9–4.4 points. One possible explanation lies in the granularity of supervision. RLVR provides only scalar feedback, and full-response distillation supervises every token, whereas AIR-OPD provides corrective signals only on regions aligned with the student’s errors. This selective supervision may limit over-specialization to the mathematical training distribution while preserving the gains of distillation.

Ablations and Analysis

All ablations start from the default Qwen3-4B configuration of § 5.3 and report the in-domain Math Avg. We organize the analysis into three parts. § 7.1 controls for failure-only sample selection and ablates the supervision region and the stage weighting of the objective, § 7.2 measures how large a repair budget is needed, and § 7.3 traces how capability evolves over the course of training relative to GRPO and OPSD.

Effect of sample selection, supervision region, and stage weighting

In Table 2, the two OPSD rows vary which rollouts are supervised, and each remaining row changes one component of AIR-OPD, the supervision region (§ 4.2) or the stage weighting (§ 4.3), while keeping the rest of the default configuration.

SettingMath Avg.
AIR-OPD65.8
Sample selection (OPSD)
All rollouts63.1
Failed rollouts only62.5
Supervision region
w/o error alignment64.7
Error block only64.2
Stage weighting (γ\gamma, ρ\rho)
Uniform (1, 1)65.0
Temporal factor only (0.8, 1)65.4
Outcome bonus only (1, 1.5)65.4

Table 2. Ablation results (Qwen3-4B, SELF-G). We test failure-only sample selection for OPSD and ablate the supervision region and the stage-weighting components of AIR-OPD.

Sample selection. AIR-OPD supervises only failed rollouts, so its gains could stem from this selection alone. Applying the OPSD loss only to failed rollouts yields 62.5, 0.6 points below standard OPSD and 3.3 below AIR-OPD. The gains thus depend on how AIR-OPD supervises each failure, not on which rollouts it selects.

Supervision region. We compare the default repair region RtR_t with two ablations. W/o error alignment supervises every token of the failed response in place of this region, and error block only ends the region at the boundary of the first reasoning block. Both ablations lower the Math Avg. Widening supervision to the full response costs 1.1 points, and narrowing it to the error block alone costs 1.6. We suspect that full-response supervision dilutes the signal with tokens the repair guidance does not target, while the error block alone omits downstream reasoning that may also require correction. These results support supervising both the identified error region and the selected downstream reasoning.

Stage weighting. We ablate the temporal factor γt\gamma^t and the outcome bonus ρsn,t\rho^{s_n,t} of Eq. (9). Uniform (1, 1) removes both factors and weights all stages equally, while temporal factor only (0.8, 1) and outcome bonus only (1, 1.5) each restore a single factor. Either factor alone already improves over uniform weighting, and combining the two performs best. This indicates that the weights should combine a preference for earlier stages with feedback from the immediate retry outcome rather than allocate supervision by a single criterion.

Effect of the repair budget

We vary the maximum number of repair rounds K∈{1,…,5}K \in\{1,\ldots,5\} for both guidance settings. Figure 2 traces Math Avg. as the budget grows alongside the number of supervised stages. Both variants already surpass OPSD with a single repair round, and the overall trend rises and then flattens. At K=1K = 1 every supervised trajectory contains exactly one stage, so this gain does not depend on additional repair rounds. K=1K = 1 also exceeds failure-only OPSD by

Figure 2. Effect of the repair budget KK (Qwen3-4B). Math Avg. (left axis) rises through the default K=3K = 3 and then flattens, while each variant’s number of supervised stages (dashed, right axis, % of the samples OPSD supervises) grows with diminishing increments.

1.1–1.5 points (Table 2), suggesting that error-aligned repair supervision provides a stronger learning signal than reference-conditioned full-response distillation. Raising the budget to K=3K = 3 brings further gains, which confirms the value of continuing to supply fresh repair signals for unresolved failures during training. Beyond this point both curves show diminishing returns. K=4K = 4 adds only a small improvement, and K=5K = 5 falls slightly below K=4K = 4. We suspect that stages added at deep rounds carry accumulated noise, as their contexts pile up failed attempts and guidance, and their less reliable supervision begins to offset the gains.

The dashed curves show that the number of supervised stages keeps increasing with KK but with shrinking increments, as later rounds activate only for trajectories that remain incorrect and yield validated repair guidance rather than for all trajectories. The count rises from 22.2% of the samples OPSD supervises at K=1K = 1 to 35.2–37.4% at K=5K = 5. We keep K=3K = 3 as the practical default. It captures most of the observed gains while requiring fewer supervised stages than larger budgets. Comparing the two dashed curves further shows that external guidance adds fewer supervised stages per extra round than self-guidance, possibly because higher-quality external guidance resolves more failures in earlier rounds.

Training dynamics

Figure 3 plots the three-benchmark average and per-benchmark accuracy over the checkpoints of both AIR-OPD variants, OPSD, and GRPO, saved every 20 optimizer steps, with the base model as a fixed reference. On the three-benchmark average, both AIR-OPD variants lead both baselines at every checkpoint, and external guidance matches or exceeds the self-guided average throughout. AIR-OPD also converges substantially faster. By step 40, both variants already reach the score OPSD attains at step 100. This faster convergence also uses much less supervision. At the default K=3K = 3, the number of stages supervised by AIR-OPD is approximately one third of the number of samples supervised by OPSD (Section 7.2), with each stage covering an error-aligned repair region rather than a full response. This suggests that supervision concentrated on erroneous regions yields more learning signal per supervised token.

Figure 3. Training dynamics on the mathematical benchmarks (Qwen3-4B). Both AIR-OPD variants lead OPSD and GRPO on the three-benchmark average from the first checkpoint onward. Curves show Avg@12 at checkpoints saved every 20 optimizer steps, and dashed lines mark the base model.

Conclusion

We introduced AIR-OPD, an adaptive iterative repair framework for on-policy distillation that addresses the solution-conditioned shortcut risk of reference-privileged supervision. Instead of conditioning the teacher on a static reference solution, a guidance generator synthesizes answer-free repair guidance that evolves with the student’s errors, the teacher distills each repair over an error-aligned region of the latest failed response, and outcome-aware stage weighting allocates supervision across rounds. Across two model scales, both guidance sources surpass strong RL and distillation baselines on mathematical reasoning while preserving base-model performance out of distribution, and self-guidance alone accounts for most of the improvement. Our analysis further shows that the gains emerge from the first checkpoints of training, and that a small repair budget captures most of the gains observed in our sweep while supervising roughly a third as many samples as OPSD.

Complete Training Algorithm

Algorithm 1 gives the complete procedure that AIR-OPD runs on one training minibatch, from the initial on-policy rollouts to the returned training loss. The method definitions and design rationale remain in § 4.

Algorithm 1 AIR-OPD: multi-round repair and stage-weighted distillation

  1. Input: minibatch B\mathcal{B} of problems qq with reference solutions zz, student pθp_\theta, frozen teacher pTp_T, outcome verifier VV, and guidance generator GG

  2. Hyperparameters: repair budget KK, endpoint tolerance ϵ∈(0,1)\epsilon\in(0,1), temporal factor γ∈(0,1]\gamma\in(0,1], and outcome bonus ρ≥1\rho\ge1

  3. Output: minibatch training loss LAIR-OPD\mathcal{L}_{\mathrm{AIR\text{-}OPD}}

  4. for all (q,z)∈B(q,z) \in\mathcal{B}, indexed by nn do

  5. Sn←∅S_n \leftarrow\varnothing, Ln←0\mathcal{L}_n \leftarrow0, t←0t \leftarrow0, H0←Render⁡(q)\mathcal{H}_0 \leftarrow\operatorname{Render}(q), and sample y0∼pθ(⋅∣H0)y_0 \sim p_\theta(\cdot\mid\mathcal{H}_0)

  6. while t<Kt < K and yty_t is a well-formed response with V(yt)=0V(y_t)=0 do

  7. (at,gt)←G(q,z,Ht,yt)(a_t,g_t) \leftarrow G(q,z,\mathcal{H}_t,y_t)

  8. if (at,gt)(a_t,g_t) fails validation then

  9. break

  10. end if

  11. bt←b_t \leftarrow the exact match position of ata_t in yty_t

  12. et←e_t \leftarrow the earliest block endpoint with corrective coverage 1−ϵ1-\epsilon

  13. Compute Ln,t\mathcal{L}_{n,t} on the repair region Rt=yt[bt:et]R_t = y_t[b_t:e_t] and add (t,Ln,t)(t,\mathcal{L}_{n,t}) to SnS_n

  14. Ht+1←Update⁡(Ht,yt,gt)\mathcal{H}_{t+1} \leftarrow\operatorname{Update}(\mathcal{H}_t,y_t,g_t) and, if t<K−1t < K-1, sample yt+1∼pθ(⋅∣Ht+1)y_{t+1} \sim p_\theta(\cdot\mid\mathcal{H}_{t+1})

  15. sn,t←1[V(yt+1)=1]s_{n,t} \leftarrow\mathbb{1}[V(y_{t+1})=1], or 00 if no retry is sampled, and t←t+1t \leftarrow t+1

  16. end while

  17. if Sn≠∅S_n \ne\varnothing then

  18. Tn←t−1T_n \leftarrow t-1

  19. wn,t←γtρsn,t∑k=0Tnγkρsn,kw_{n,t} \leftarrow\dfrac{\gamma^t\rho^{s_{n,t}}}{\sum_{k=0}^{T_n}\gamma^k\rho^{s_{n,k}}} for t=0,…,Tnt=0,\ldots,T_n

  20. Ln←∑t=0Tnwn,tLn,t\mathcal{L}_n \leftarrow\sum_{t=0}^{T_n} w_{n,t}\mathcal{L}_{n,t}

  21. end if

  22. end for

  23. return LAIR-OPD=1∣B∣∑n∈BLn\mathcal{L}_{\mathrm{AIR\text{-}OPD}} = \dfrac{1}{|\mathcal{B}|}\sum_{n\in\mathcal{B}}\mathcal{L}_n

Prompts and Validation Details

Guidance generator instruction

Figure 4 and Figure 5 show the full user templates of the guidance generator for the first repair round and for the later rounds. At every round the generator receives the problem, the reference solution and its final answer as privileged checking evidence, and the latest failed response. From the second round it also receives the guidance the student has already seen. Braced fields are filled at runtime.

Guidance generator — first-round user template

Figure 4. Guidance generator, first repair round. The template diagnoses the initial failed response y0y_0 under the privileged reference solution and final answer.

Guidance generator later-round user template

Figure 5. Guidance generator, later repair rounds. The template replaces the current guidance after a retry that is still incorrect, and additionally receives the guidance the student has already seen.

Repair dialogue

The retry is sampled from a multi-turn dialogue whose turns are shown below. The initial user turn poses the problem, and each unsuccessful response is followed by a feedback turn that delivers the current repair guidance. From the second feedback turn onward the opening line instead reads The previous answer is still incorrect.

Repair dialogue — initial problem turn

Problem: {problem}

Please reason step by step, and put your final answer within \boxed{}.

Repair dialogue — feedback turn after an unsuccessful response

The previous answer is incorrect.

Use the following repair guidance, which explains how to correct the reasoning:

=== Repair Guidance Begin ===
{current repair guidance}
=== Repair Guidance End ===

Revise the reasoning and answer again. Do not simply repeat the previous attempt.

Please reason step by step, and put your final answer within \boxed{}.

Validation rules

The generator output is accepted only when it matches one of the two declared forms in full, with a nonempty error quote and a nonempty repair-guidance field. The error quote must be located in the latest response, and guidance that states the final answer is rejected. The leak check excludes the error quote and rejects guidance containing boxed answers or rule-based matches to the normalized reference answer, such as explicit answer statements or variable assignments. These surface-form checks do not guarantee detection of all semantic answer leakage. When any check fails, or when the generator returns no_repair, the round yields no supervised stage and stops further retries.

Training and Evaluation Details

Training settings

Following the comparison setup of OPSD (Zhao et al., 2026), Table 3 places SFT, GRPO, OPSD, and AIR-OPD side by side, grouping their optimization and on-policy sampling settings. All trained baselines in Table 1 are our own reproductions on the same training corpus and backbones as AIR-OPD; the GRPO reproduction applies no KL penalty, and the untrained base-model row has no optimization settings. Training problems come from DAPO-Math-17K (Yu et al., 2025), and outcome verification at every repair round uses rule-based answer matching. Reference solutions are generated by GPT-5.5 and retained only when their final answers verify against the dataset answers, leaving 15,650 of the 17,398 problems as training rows. SFT minimizes cross-entropy on these reference solutions without on-policy sampling and uses a 16,000-token maximum sequence length measured over the full supervised sequence.

MethodAIME24AIME25HMMT25Math Avg.MMLU-ProGPQAOOD Avg.
Qwen3-4B
Base model75.066.442.261.251.562.957.2
SFT70.661.442.858.243.152.047.6
GRPO75.667.543.962.351.362.456.8
OPSD76.469.443.363.150.460.255.3
AIR-OPD (SELF-G)76.773.147.865.852.561.456.9
AIR-OPD (EXTERNAL-G)80.073.346.766.751.761.956.8
Qwen3-8B
Base model75.865.643.961.857.964.161.0
SFT75.363.643.660.846.555.851.2
GRPO76.969.245.864.056.664.560.6
OPSD77.869.746.764.757.461.759.6
AIR-OPD (SELF-G)78.372.549.766.958.363.560.9
AIR-OPD (EXTERNAL-G)79.773.149.467.458.064.161.1

Table 1. Main results on mathematical-reasoning (Avg@12) and out-of-distribution (Avg@4) benchmarks. Both AIR-OPD variants surpass all baselines on Math Avg. at each scale while preserving base-model performance on the OOD group. SELF-G/EXTERNAL-G generate repair guidance with the current student policy and Qwen3.5-27B, respectively. Bold/underlined: best/second-best within each block.

Table 3: Training settings for SFT, GRPO, OPSD, and AIR-OPD. Lengths are measured in tokens; the SFT limit applies to the full supervised sequence. A dash denotes a setting that is not applicable. For AIR-OPD, one rollout is sampled per dialogue state: the initial response can be followed by at most K−1K - 1 retries.

ParameterSFTGRPOOPSDAIR-OPD
Optimization and adaptation
OptimizerAdamWAdamWAdamWAdamW
Learning rate5×10−65 \times10^{-6}5×10−65 \times10^{-6}5×10−65 \times10^{-6}5×10−65 \times10^{-6}
Effective batch size32323232
Training precisionBF16BF16BF16BF16
LoRA rank / alpha64 / 12864 / 12864 / 12864 / 128
Optimizer steps100500100100
SFT maximum sequence length16,000–––
On-policy sampling
Maximum completion length–16,0008,1928,192
Rollouts per prompt / dialogue state–811
Sampling temperature–1.21.11.1

Table 3.

All trained methods are implemented on top of TRL (von Werra et al., 2020) and use AdamW, BF16, and FlashAttention-2 (Dao, [4]), with a colocated vLLM sampler (Kwon et al., [20]) for on-policy rollouts. For OPSD and AIR-OPD, the pointwise divergence-clipping threshold is τ=0.05\tau= 0.05.

AIR-OPD-specific settings. AIR-OPD adds a repair loop and a guidance generator on top of the shared configuration in Table 3. Each problem allows at most K=3K = 3 repair rounds, with stage weighting (γ,ρ)=(0.8,1.5)(\gamma, \rho) = (0.8, 1.5) and endpoint tolerance ϵ=0.1\epsilon= 0.1. The student decodes with top-pp 0.95 and top-kk 20, generating at most 8,192 completion tokens under a total sequence-length limit of 19,168 tokens. Self-guidance from the current student policy and external guidance from Qwen3.5-27B share the same inference settings. Both generate with thinking mode enabled, a temperature of 0.7, top-pp 0.9, and at most 8,192 new tokens.

Inference settings

Table 4 summarizes the inference settings shared by the base model and all trained methods for mathematical-reasoning evaluation. We use the fixed random seed 2026 to generate 12 responses per problem, with a sampling temperature of 1.0, top-pp 0.95, no top-kk restriction, a maximum of 38,912 new tokens, a model context length of 40,960, and thinking enabled. Following the OPSD evaluation protocol (Zhao et al., 2026), we evaluate checkpoints every 20 steps up to 100 steps. Overall Math Avg. is the macro-average of the three mathematical benchmark scores.

ParameterValue
Maximum new tokens38,912
Maximum model length (tokens)40,960
Thinking modeEnabled
Sampling temperature1.0
Top-pp0.95
Top-kk–
Samples per problem12
Random seed2026

Table 4. Inference settings for mathematical-reasoning evaluation. The base model and all trained methods use these settings on AIME24, AIME25, and HMMT25, without repair guidance.

Out-of-distribution evaluation. MMLU-Pro is evaluated on a fixed 1,000-question subset that covers all 14 subject categories, and GPQA on the 198-question GPQA-Diamond split. For the base model and every trained method, both benchmarks draw four samples per question (Avg@4) with a sampling temperature of 1.0, top-pp 0.95, no top-kk restriction, and the random seed 2026071201. MMLU-Pro applies the chat template with thinking enabled, a maximum of 8,192 new tokens, and a model context length of 12,288. GPQA feeds the question prompt to the model without the chat template, with a maximum of 38,912 new tokens and a model context length of 40,960. The option is read from the last \boxed{} in the response, and MMLU-Pro additionally accepts an explicit final-answer statement.

Additional Results and Examples

Worked repair examples

We reconstruct two complete repair trajectories from the training-time repair logs of the Qwen3-4B self-guidance run, both repaired at the second round. In the first the retry fixes the anchored slip but returns the identical wrong answer, and in the second the retry adopts the corrected equation yet slips again in the very next step although the guidance is valid. The two trajectories illustrate the rationale of the outcome-aware stage weighting in § 4.3. Because a retry can fail even under valid guidance, a failed retry is not penalized, and the weighting grants its outcome bonus only to the stage whose guidance leads to the verified repair. In each round box, the error anchor at located by the guidance generator is highlighted in the failed response, and the supervised repair region RtR_t opens at the anchor and ends at the endpoint Eq. (7) selects for that stage. Elisions are marked [. . .].

Example 1: repaired in two rounds. The initial attempt counts (202)=190\binom{20}{2}=190 choices for Terry and (182)=153\binom{18}{2}=153 for Mary but writes the product as 29,170, counts only the two-red and two-blue cases, and reduces the resulting fraction with a faulty remainder chain to 12/139, answering 151. The first-round guidance anchors the earliest error, the multiplication slip; the retry corrects the product to 29,070 yet repeats the earlier remainder chain during the reduction and returns the identical 151, so s0=0s_0=0. The second-round guidance targets the remaining omission, the mixed one-red-one-blue case, and the following retry sums all three cases and reaches the verified 441, so s1=1s_1=1.

Example 1, round 0 — failed attempt y0y_0 (verified incorrect)

Problem. A jar has 10 red candies and 10 blue candies. Terry picks two candies at random, then Mary picks two of the remaining candies at random. Given that the probability that they get the same color combination, irrespective of order, is m/nm/n, where mm and nn are relatively prime positive integers, find m+nm+n.

[. . .] (Terry has (202)=190\binom{20}{2}=190 choices and Mary has (182)=153\binom{18}{2}=153) So the total number of possible pairs of choices (Terry picks first, then Mary) is:

190×153=29170190 \times153 = 29170

[. . .] (only two favorable cases are considered, both picking two reds and both picking two blues, each counted as (102)(82)=45×28=1260\binom{10}{2}\binom{8}{2}=45 \times28=1260)

Total favorable outcomes:

1260+1260=25201260+1260=2520

[. . .] (a Euclidean reduction of 2520/29170 with a faulty remainder chain gives)

252029170=12139\frac{2520}{29170}=\frac{12}{139}

So m=12m=12, n=139n=139, and:

m+n=151m+n=151

Example 1 — generator output after round 0: a0a_0 and g0g_0

Error anchor a0a_0. 190 \times 153 = 29170

Repair guidance g0g_0. The incorrect solution miscalculates the total number of possible outcomes as 190 × 153 = 29170, but the correct value is 190 × 153 = 29070. This error arises from an arithmetic mistake in multiplication. [. . .] The correct logic is to compute (102)×(182)=190×153=29070\binom{10}{2} \times\binom{18}{2} = 190 \times153 = 29070, ensuring the denominator is accurate for the probability computation.

Example 1, round 1 — retry y1y_1 (verified incorrect, s0=0s_0 = 0)

[. . .] (the retry adopts the correction) So the total number of possible outcomes (Terry’s pick × Mary’s pick) is:

190×153=29070190 \times153 = \boxed{29070}

So the correct total number of outcomes is 29070, not 29170. [. . .] (the same two cases are counted again)

Total favorable outcomes

1260+1260=25201260 + 1260 = 2520

[. . .] (the reduction repeats the earlier faulty remainder chain, 29070÷2520=1129070 \div2520 = 11 remainder 1050, and lands on the same fraction)

252029070=2520÷21029070÷210=12139\frac{2520}{29070} = \frac{2520 \div210}{29070 \div210} = \frac{12}{139}

Thus,

m=12,n=139⇒m+n=151m = 12,\quad n = 139 \Rightarrow m+n = \boxed{151}

Example 1 — generator output after round 1: a1a_1 and g1g_1

Error anchor a1a_1. Total favorable outcomes

Repair guidance g1g_1. Add the 8100 favorable outcomes from Case 3 (both picking one red and one blue) to the total, resulting in 1260 + 1260 + 8100 = 10620

Example 1, round 2 — retry y2y_2 (verified correct, s1=1s_1 = 1)

[. . .] (the retry keeps the corrected total 29070, recounts Cases 1 and 2, and adds the new case)

Case 3: Both pick one red and one blue. Terry can pick one red and one blue in (101)×(101)=100\binom{10}{1} \times\binom{10}{1} = 100 ways [. . .] after Terry’s pick, 9 reds and 9 blues remain, so Mary has (91)×(91)=81\binom{9}{1} \times\binom{9}{1} = 81 ways, and the total for this case is 100 × 81 = 8100.

Total favorable outcomes:

1260+1260+8100=106201260 + 1260 + 8100 = \boxed{10620}

[. . .] (a fresh Euclidean run gives gcd = 90, and 118 and 323 are checked to be coprime)

1062029070=10620÷9029070÷90=118323\frac{10620}{29070} = \frac{10620 \div90}{29070 \div90} = \frac{118}{323}

Hence:

m=118,n=323⇒m+n=441m = 118,\quad n = 323 \Rightarrow m+n = \boxed{441}

Example 2: a retry that fails under valid guidance. The initial attempt equates the binomial probabilities of exactly two and exactly three heads but mishandles the (3/4)(3/4) exponent while cancelling the common factor, reducing the equality to (n2)=(n3)⋅316\binom{n}{2} = \binom{n}{3} \cdot\frac{3}{16} and reaching n=18n = 18. The first-round guidance anchors this equation and derives the correct coefficient 13\frac{1}{3}. The retry derives the correct equation but mishandles the right-hand side while clearing denominators. The next guidance recommends multiplying by 18 to clear all denominators in one step, after which the retry succeeds.

Example 2, round 0 — failed attempt y0y_0 (verified incorrect)

Problem. An unfair coin lands on heads with a probability of 14\frac{1}{4}. When tossed nn times, the probability of exactly two heads is the same as the probability of exactly three heads. What is the value of nn?

[…][\ldots] (the response equates the two binomial probabilities)

(n2)(14)2(34)n−2=(n3)(14)3(34)n−3\binom{n}{2}\left(\frac{1}{4}\right)^2\left(\frac{3}{4}\right)^{n-2}=\binom{n}{3}\left(\frac{1}{4}\right)^3\left(\frac{3}{4}\right)^{n-3}

[…][\ldots] (dividing both sides by the common factor (14)2(34)n−2\left(\frac{1}{4}\right)^2\left(\frac{3}{4}\right)^{n-2}, the equation becomes)

(n2)=(n3)⋅14⋅34\binom{n}{2}=\binom{n}{3}\cdot\frac{1}{4}\cdot\frac{3}{4}

So now, simplify:

(n2)=(n3)⋅316\binom{n}{2}=\binom{n}{3}\cdot\frac{3}{16}

Now plug them in:

n(n−1)2=n(n−1)(n−2)6⋅316\frac{n(n-1)}{2}=\frac{n(n-1)(n-2)}{6}\cdot\frac{3}{16}

[…][\ldots] (multiplying by 6 and dividing by 3n(n−1)3n(n-1) gives)

1=116(n−2)⇒16=n−2⇒n=181=\frac{1}{16}(n-2)\Rightarrow16=n-2\Rightarrow n=18

Final Answer: 1818

Example 2 — generator output after round 0: a0a_0 and g0g_0

Error anchor a0a_0. binom(n,2) = binom(n,3) * \frac{3}{16}

Repair guidance g0g_0. The incorrect solution incorrectly simplifies the exponent terms after dividing by the common factors. The correct coefficient after simplification should be 13\frac{1}{3}, not 316\frac{3}{16}. This arises from miscalculating the exponents: the right-hand side should be (n3)⋅14⋅43\binom{n}{3}\cdot\frac{1}{4}\cdot\frac{4}{3} (from (1/4)1⋅(3/4)−1(1/4)^1\cdot(3/4)^{-1}), which simplifies to 13\frac{1}{3}. […][\ldots] The correct equation after dividing by the common factor is (n2)=(n3)⋅13\binom{n}{2}=\binom{n}{3}\cdot\frac{1}{3}, not 316\frac{3}{16}.

Example 2, round 1 — retry y1y_1 (verified incorrect, s0=0s_0=0)

[…][\ldots] (the retry rederives the cancellation with the correct exponents)

(n2)=(n3)⋅(14)3−2⋅(34)(n−3)−(n−2)=(n3)⋅14⋅43=(n3)⋅13\binom{n}{2}=\binom{n}{3}\cdot\left(\frac{1}{4}\right)^{3-2}\cdot\left(\frac{3}{4}\right)^{(n-3)-(n-2)}=\binom{n}{3}\cdot\frac{1}{4}\cdot\frac{4}{3}=\binom{n}{3}\cdot\frac{1}{3}

This is the correct simplified equation. […][\ldots]

n(n−1)2=n(n−1)(n−2)6⋅13\frac{n(n-1)}{2}=\frac{n(n-1)(n-2)}{6}\cdot\frac{1}{3}

Multiply both sides by 6 to eliminate denominators:

3n(n−1)=13n(n−1)(n−2)⋅6⇒3n(n−1)=2n(n−1)(n−2)3n(n-1)=\frac{1}{3}n(n-1)(n-2)\cdot6\Rightarrow3n(n-1)=2n(n-1)(n-2)

Divide both sides by n(n−1)n(n-1) […][\ldots]

3=2(n−2)⇒3=2n−4⇒2n=7⇒n=73=2(n-2)\Rightarrow3=2n-4\Rightarrow2n=7\Rightarrow n=7

Final Answer: 77

Example 2 — generator output after round 1: a1a_1 and g1g_1

Error anchor a1a_1. Multiply both sides by 6 to eliminate denominators

Repair guidance g1g_1. Correct the multiplication factor to 18 instead of 6 when eliminating denominators in the equation

Example 2, round 2 — retry y2y_2 (verified correct, s1=1s_1 = 1)

[. . .] (the retry again reaches (n2)=13(n3)\binom{n}{2} = \frac{1}{3}\binom{n}{3} and substitutes the binomial expressions)

n(n−1)2=13⋅n(n−1)(n−2)6=n(n−1)(n−2)18\frac{n(n-1)}{2} = \frac{1}{3}\cdot\frac{n(n-1)(n-2)}{6} = \frac{n(n-1)(n-2)}{18}

Now eliminate n(n−1)n(n-1) from both sides [. . .]

12=n−218\frac{1}{2} = \frac{n-2}{18}

Multiply both sides by 18:

9=n−2⇒n=119 = n - 2 \Rightarrow n = \boxed{11}

Final Answer:

11\boxed{11}

References

  1. [1]Rishabh Agarwal, Nino Vieillard, Yongchao Zhou, Piotr Stanczyk, Sabela Ramos, Matthieu Geist, and Olivier Bachem. On-policy distillation of language models: Learning from self-generated mistakes. In International Conference on Learning Representations (ICLR), 2024. URL https://openreview.net/forum?id=3zKtaqxLhW.arxiv.org/abs/2306.13649
  2. [2]Zhiyu Cao, Kaixin Wu, Mingjie Zhong, Peifeng Li, Xiaobo Li, Can Ye, and Qiaoming Zhu. Hint-guided diversified policy optimization for LLM reasoning. arXiv preprint arXiv:2606.03021, 2026. URL https://arxiv.org/abs/2606.03021.
  3. [3]Justin Chih-Yao Chen, Becky Xiangyu Peng, Prafulla Kumar Choubey, Kung-Hsiang Huang, Jiaxin Zhang, Mohit Bansal, and Chien-Sheng Wu. Nudging the boundaries of LLM reasoning. In International Conference on Learning Representations (ICLR), 2026. URL https://openreview.net/forum?id=hfNnQHkTtv.arxiv.org/abs/2509.25666
  4. [4]Tri Dao. FlashAttention-2: Faster attention with better parallelism and work partitioning. In International Conference on Learning Representations (ICLR), 2024. URL https://openreview.net/forum?id=mZn2Xyh9Ec.arxiv.org/abs/2307.08691
  5. [5]Yuchun Fan, Bei Li, Peiguang Li, Yilin Wang, Yongyu Mu, Jian Yang, Xin Chen, Rongxiang Weng, Jinjang Wang, Xunliang Cai, Jingbo Zhu, and Tong Xiao. LANG: Reinforcement learning for multilingual reasoning with language-adaptive hint guidance. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 43838–43866, 2026. URL https://aclanthology.org/2026.acl-long.2029/.
  6. [6]Yuxian Gu, Li Dong, Furu Wei, and Minlie Huang. MiniLLM: Knowledge distillation of large language models. In International Conference on Learning Representations (ICLR), 2024. URL https://openreview.net/forum?id=5hQf7IBZz.
  7. [7]Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, et al. DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning. Nature, 645(8081):633–638, 2025. doi: 10.1038/s41586-025-09422-z. URL https://doi.org/10.1038/s41586-025-09422-z.
  8. [8]Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. URL https://arxiv.org/abs/1503.02531.
  9. [9]HMMT. Harvard–MIT mathematics tournament (HMMT) february 2025. https://www.hmmt.org/, 2025. Accessed 2026-09.
  10. [10]Arian Hosseini, Xingdi Yuan, Nikolay Malkin, Aaron Courville, Alessandro Sordoni, and Rishabh Agarwal. V-STaR: Training verifiers for self-taught reasoners. In Conference on Language Modeling (COLM), 2024. URL https://openreview.net/forum?id=stmqBSW2dV.arxiv.org/abs/2402.06457
  11. [11]Wenjin Hou, Shangpin Peng, Weinong Wang, Zheng Ruan, Yue Zhang, Zhenglin Zhou, Mingqi Gao, Yifei Chen, Kaiqi Wang, Hongming Yang, Chengguan Zhang, Zhuotao Tian, Han Hu, Yi Yang, Fei Wu, and Hehe Fan. Uni-opd: Unifying on-policy distillation with a dual-perspective recipe. arXiv preprint arXiv:2605.03677, 2026. URL https://arxiv.org/abs/2605.03677.
  12. [12]Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations (ICLR), 2022. URL https://openreview.net/forum?id=nZeVKeeFYf9.arxiv.org/abs/2106.09685
  13. [13]Jie Huang, Xinyun Chen, Swaroop Mishra, Huai­xiu Steven Zheng, Adams Wei Yu, Xinying Song, and Denny Zhou. Large language models cannot self-correct reasoning yet. In International Conference on Learning Representations (ICLR), 2024. URL https://openreview.net/forum?id=IkmD3fKBPQ.arxiv.org/abs/2310.01798
  14. [14]Zhilin Huang, Hang Gao, Ziqiang Dong, Yuan Chen, Yifeng Luo, Chujun Qin, Jingyi Wang, Yang Yang, and Guanjun Jiang. Learning from your own mistakes: Constructing learnable micro-reflective trajectories for self-distillation. arXiv preprint arXiv:2606.18844, 2026. URL https://arxiv.org/abs/2606.18844.
  15. [15]Yoon Kim and Alexander M. Rush. Sequence-level knowledge distillation. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1317–1327, 2016. URL https://aclanthology.org/D16-1139/.arxiv.org/abs/1606.07947
  16. [16]James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences (PNAS), 114(13):3521–3526, 2017. doi: 10.1073/pnas.1611835114.DOI
  17. [17]Jongwoo Ko, Sungnyun Kim, Tianyi Chen, and Se-Young Yun. DistilLM: Towards streamlined distillation for large language models. In Proceedings of the 41st International Conference on Machine Learning (ICML), 2024. URL https://proceedings.mlr.press/v235/ko24c.html.arxiv.org/abs/2402.03898
  18. [18]Suhas Kotha, Jacob Mitchell Springer, and Aditi Raghunathan. Understanding catastrophic forgetting in language models via implicit inference. In International Conference on Learning Representations (ICLR), 2024. URL https://openreview.net/forum?id=VrHiF2hsrm.arxiv.org/abs/2309.10105
  19. [19]Aviral Kumar, Vincent Zhuang, Rishabh Agarwal, Yi Su, John D. Co-Reyes, Avi Singh, Kate Bauml i, Shariq Iqbal, Colton Bishop, Rebecca Roelofs, Lei M. Zhang, Kay McKinney, Disha Shrivastava, Cosmin Paduraru, George Tucker, Doina Precup, Feryal Behb ahani, and Aleksandra Faust. Training language models to self-correct via reinforcement learning. In International Conference on Learning Representations (ICLR), 2025. URL https://openreview.net/forum?id=Cj wERC AU7w. Oral.arxiv.org/abs/2409.12917
  20. [20]Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with PagedAttention. In Proceedings of the 29th Symposium on Operating Systems Principles (SOSP), pp. 611–626, 2023. doi: 10.1145/3600006.3613165.DOI
  21. [21]Nathan Lambert, Jacob Morrison, Valentina Pyatkin, Shengyi Huang, Hamish Ivison, Faeze Brahman, Lester James V. Miranda, Alisa Liu, Nouha Dziri, Shane Lyu, et al. Tulu 3: Pushing frontiers in open language model post-training. In Conference on Language Modeling (COLM), 2025. URL https://openreview.net/forum?id=nu1GbHfHpH.arxiv.org/abs/2411.15124
  22. [22]Hunter Lightman, Vineet Kosaraju, Yura Burda, Harri Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let’s verify step by step. In International Conference on Learning Representations (ICLR), 2024. URL https://openreview.net/forum?id=v8LOpN6EOi.arxiv.org/abs/2305.20050
  23. [23]Alexander Lin, Jeremy Wohlwend, Howard Chen, and Tao Lei. Autoregressive knowledge distillation through imitation learning. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 6121–6133, 2020. URL https://aclanthology.org/2020.emnlp-main.494/.arxiv.org/abs/2009.07253
  24. [24]David Lopez-Paz, Léon Bottou, Bernhard Schölkopf, and Vladimir Vapnik. Unifying distillation and privileged information. In International Conference on Learning Representations (ICLR), 2016. URL https://arxiv.org/abs/1511.03643.
  25. [25]Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations (ICLR), 2019. URL https://openreview.net/forum?id=Bkg6RiCqY7.
  26. [26]Kevin Lu and Thinking Machines Lab. On-policy distillation. Thinking Machines Lab: Connectionism, 2025. URL https://thinkingmachines.ai/blog/on-policy-distillation/. Published Oct 27, 2025; doi: 10.64434/tm.20251026.
  27. [27]Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, Shashank Gupta, Bodhisattwa Prasad Majumder, Katherine Hermann, Sean Welleck, Amir Yazdanbakhsh, and Peter Clark. Self-refine: Iterative refinement with self-feedback. In Advances in Neural Information Processing Systems (NeurIPS), 2023. URL https://arxiv.org/abs/2303.17651.

Paper details

vlnc:W_dbfdvq6k
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 4

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents