arXiv(opens in a new tab)cs.AIOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.11989

MetaOPD: Meta-Learned Token Weighting for On-Policy Distillation

Zipeng Wang, Xinpeng Dong, Yuefan Wang, Pingchen Lu, Xian Wei, Kun Kuang, Fei Wu, Zhongxiang Dai, Min Zhang

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

ABSTRACT

On-policy distillation (OPD) trains a student on its own generated responses using token-level teacher supervision. However, uniform weighting overlooks differences in token learning value, while existing weighting methods rely on predefined mappings from prediction signals to token weights. These mappings are not learned from the effectiveness of the resulting student updates, limiting their ability to adapt to evolving learning needs. In this paper, we propose MetaOPD, a bilevel optimization framework that jointly learns the student model and a lightweight token-weighting network. The inner objective updates the student through weighted OPD, while the outer objective optimizes the weighting network using validation loss on reference solutions after a virtual student update. Differentiating through this update connects weighting decisions to their effects on post-update performance, allowing the mapping from prediction signals to token weights to evolve alongside the student. Experiments on six mathematical reasoning and three out-of-domain datasets, covering two student scales and seven baselines, demonstrate the effectiveness of MetaOPD, with Avg@8/Pass@8 gains over OPD of 1.99/5.97 percentage points for the 0.6B student and 2.25/6.41 points for the 1.7B student.

1 INTRODUCTION

Off-policy distillation trains a student on teacher-generated sequences, which can lead to a distribution mismatch between training and inference (Lin et al., 2020; Agarwal et al., 2024). To mitigate this issue, on-policy distillation (OPD) trains the student on its own generated trajectories, with a frozen teacher providing dense token-level supervision. OPD typically employs a mode-seeking reverse-KL objective that encourages the student to capture the teacher's high-probability behaviors (Wen et al., 2023; Gu et al., 2024). However, experiments by (Li et al., 2026b) show that tokens differ substantially in their learning value, a distinction that standard OPD's uniform weighting fails to capture.

Recent approaches address this limitation by allocating token-level weights through static proxy rules. For example, EOPD (Jin et al., 2026) uses predictive entropy, while TIP (Xu et al., 2026b) leverages teacher-student disagreement. These methods provide useful signals for allocating supervision based on predictive uncertainty or differences between model predictions. However, their mappings from proxy signals to token weights are predefined rather than adapted to the student's actual learning gains. As training progresses, the student's capabilities and generated contexts evolve, and the learning benefit associated with the same proxy signal may change accordingly. Thus, even when token weights vary across inputs, a fixed weighting rule may not transfer effectively across training stages or task contexts. The central challenge is to learn a weighting rule that adapts supervision to the student's evolving learning needs through feedback from the resulting updates.

To examine whether different token weighting strategies translate into actual learning gains, we conduct a motivating experiment. As illustrated in Figure 1(a), we compare assigning weights through predefined proxies with learning weights. Figure 1(b) reports validation loss reductions relative to Uniform OPD, with larger values indicating greater gains. EOPD yields only a modest improvement, while TIP and random weighting perform close to the uniform baseline. In contrast,

∗^{*}Corresponding authors

(a) Comparison of token weighting strategies

Figure

(b) Loss reduction over Uniform OPD

Figure

Loss(Uniform OPD) – Loss(Method) ( ×10−3\times 10^{-3})

Figure 1: Motivating experiment on token weighting strategies. (a) Static proxy methods assign token weights using predefined signals, while MetaOPD learns weights through validation-loss feedback. (b) Validation loss reductions relative to Uniform OPD for MetaOPD, EOPD (Jin et al., 2026), TIP (Xu et al., 2026b), and random token weighting. MetaOPD achieves the largest reduction, supporting the benefit of learning token weights aligned with the validation objective.

learning weights through validation-loss feedback produces a substantially larger improvement. These results suggest that, in this setting, predefined rules do not fully exploit the potential benefits of token weighting, whereas the student's update performance provides valuable feedback for weight allocation. The key is therefore not only to distinguish tokens using prediction signals, but also to adapt the signal-to-weight mapping based on the effectiveness of the resulting updates. This leads to our central question: How can we use the student's post-update performance to learn a token weighting rule that translates prediction signals into effective supervision?

In this paper, we take a step forward by proposing MetaOPD, an on-policy distillation framework that jointly optimizes the student model and the token-weighting rule. Specifically, we introduce a lightweight token-weighting network that maps prediction signals to token weights. The student and the weighting network perform two coupled learning tasks: the student improves through weighted teacher supervision, while the weighting network learns to allocate supervision based on the effectiveness of student updates. To achieve this, we formulate their joint learning as a bilevel optimization problem. At the inner level, we update the student on its own generated responses using an OPD loss weighted by the network's outputs. At the outer level, we evaluate the student's loss on validation reference solutions after a virtual update and use this loss to optimize the weighting network. Differentiating through the virtual update allows the student's post-update performance to guide token weight allocation, enabling the network to learn which allocations lead to greater subsequent improvements. Alternating between the two levels allows the student and the weighting rule to evolve together, replacing predefined proxy weighting with adaptive supervision allocation driven by update outcomes. Our main contributions are summarized as follows:

• We identify a gap between static proxy weighting and actual learning gains in OPD, and empirically motivate learning token weights from post-update performance feedback.

• We propose MetaOPD, a bilevel framework that jointly optimizes the student through weighted OPD and a lightweight token-weighting network through update validation loss.

• We conduct extensive experiments across six reasoning and three out-of-domain datasets on two student scales against seven baselines, demonstrating the effectiveness of our MetaOPD.

References (97)

  • On-policy distillation of language models: Learning from self-generated mistakes
  • Matharena: Evaluating llms on uncontaminated math competitions
  • Length-controlled alpacaeval: A simple way to debias automatic evaluators (opens arXiv in a new tab)
  • Minillm: Knowledge distillation of large language models
  • Measuring Mathematical Problem Solving With the MATH Dataset
  • Distilling the Knowledge in a Neural Network
  • Meta-learning online adaptation of language models
  • Entropy-aware on-policy distillation of language models (opens arXiv in a new tab)
  • Sequence-level knowledge distillation
  • Distillm: Towards streamlined distillation for large language models (opens arXiv in a new tab)
  • Scaling reasoning efficiently via relaxed on-policy distillation (opens arXiv in a new tab)
  • Advances in neural information processing systems, 35:3843–3857, 2022
  • Learning temporally-aware sample weights for preference optimization
  • Phenomenology, mechanism, and recipe (opens arXiv in a new tab)
  • Filter, then reweight: Rethinking optimization granularity in on-policy distillation (opens arXiv in a new tab)
  • Let's verify step by step
  • Autoregressive knowledge distillation through imitation learning
  • When are teacher tokens reliable? position-weighted on-policy self-distillation for reasoning (opens arXiv in a new tab)
  • Decoupled Weight Decay Regularization
  • ScaleBiO: Scalable bilevel optimization for LLM data reweighting
  • Spot: Sparse probing and outcome calibration for on-policy distillation (opens arXiv in a new tab)
  • GPQA: A Graduate-Level Google-Proof Q&A Benchmark
  • Learning to reweight examples for robust deep learning
  • DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
  • Meta-weight-net: Learning an explicit mapping for sample weighting
  • Not all disagreement is learnable: Token teachability in on-policy distillation (opens arXiv in a new tab)
  • A more robust and challenging multi-task language understanding benchmark
  • F-divergence minimization for sequence-level knowledge distillation
  • On the position bias of on-policy distillation (opens arXiv in a new tab)
  • Pass the baton: Trajectory-relayed on-policy distillation (opens arXiv in a new tab)
  • Tip: Token importance in on-policy distillation (opens arXiv in a new tab)
  • Qwen2 Technical Report
  • Qwen3 Technical Report
  • Learning beyond teacher: Generalized on-policy distillation with reward extrapolation (opens arXiv in a new tab)
  • LLM data selection and utilization via dynamic bi-level optimization (opens arXiv in a new tab)
  • Mismatch matters: On-policy distillation beyond token agreement (opens arXiv in a new tab)
  • Preference data weights optimization for reward modeling in LLM alignment
  • American invitational mathematics examination (aime) 2024, 2024
  • American invitational mathematics examination (aime)
  • Because $\mu$ need not be bijective, the pulled-back teacher scores do not necessarily sum to one over $V_S$
  • Both $\mathcal{T}(s)$ and $Z_\mu(s)$ are fixed with respect to the student parameters in this differentiation
  • At $\theta = \theta_{\mathrm{old}}, r = 1$ and
  • The importance ratio supports a local update from cached behavior-policy actions; it does not restore exact reverse-KL equivalence at an arbitrary $\theta$
  • Under the convention following Equation (4), all normalized weights are zero when $n_i = 0$
  • Thus normalization subtracts the response-level weighted mean from $c_{i,j}$, rather than using its sign alone
  • The rank-one term accounts for the dependence of the clipping coefficient on the weights through $\boldsymbol{g}_{\mathrm{in}}(\eta)$
  • For standard AdamW, the virtual moments, bias corrections, and virtual student parameters are
  • The learning rate $\alpha_j$ is read from the current real parameter group, including scheduled decay
  • Thus the validation-loss term of Equation (10) is the $q$-vector
  • The VJP–JVP procedure in §3.3 supplies these values
  • They are not constrained to be sample-disjoint, and the experimental setup does not create a separate validation pool for meta-updates
  • Top-$k_f$ token identities are used only to compute the top-1 match and top-$k_f$ overlap; the identities themselves are not network inputs
  • The same position grid is shared across rows before masking; it is not renormalized by each response's number of valid completion tokens
  • The entropy features are
  • With teacher identities canonicalized as in Appendix B.5, the overlap feature is
  • Its final scalar head is zero-initialized
  • Settings for the weighting network and virtual updates apply only to variants with meta-updates
  • The underlying surrogate form, student optimizer, and training schedule are shared; method-specific selection, weighting, reward processing, and loss reduction are specified below
  • Entropy denominators are lower-bounded by FP32 machine epsilon; removed responses contribute neither loss nor denominator tokens
  • The numerator is accumulated across all local microbatches and distributed ranks before division by $N_{B}$; the implementation does not average independently normalized microbatch losses
  • Because completion lengths differ, $N_{B}$ and $N_{ref}$ are generally different even though both global example batches contain 32 examples
  • The checkpoint probes in Appendix D restore the trained student optimizer state
  • The student uses cosine decay, advanced once per rollout round; all four optimizer minibatches in that round read its current rate
  • The context conversion $\mathcal{T}$ leaves prompt tokens unchanged and applies this mapping only to the first valid completion occurrence of 151643 in the teacher view
  • The teacher-view mapping does not change this student target identity
  • Let $\mathcal{L}_{\mathrm{OPD}}^{w}$ denote the OPD loss on student-generated responses with token weights w
  • Let $\mathcal{L}_{\text{SFT}}$ denote the supervised fine-tuning (SFT) loss: the mean token prediction loss on reference solutions under teacher forcing
  • Calibration uses training data only and is not selected by benchmark performance
  • Table 8 compares uniform OPD, four restricted-input weighting networks, and MetaOPD with all descriptors
  • All other descriptor coordinates are zeroed while the 74-dimensional input and 74–256–64–1 architecture remain fixed
  • MetaOPD performs a meta-update at each of the 696 student updates; OPD has no outer objective
  • Evaluation and diagnostic probes are excluded
  • Both methods complete 696 student updates; MetaOPD performs one meta update per step
  • Within each panel, all strategies start from the same initial student and optimizer state and perform one actual student update on the same student-generated responses
  • Each panel contains 16 prompts with two responses per prompt
  • TIP uses the Soft-OR selection described in Appendix B.2.1
  • We average the paired reductions across the 12 panels and obtain 95% percentile confidence intervals from 10,000 bootstrap resamples of panels, retaining the pairing between strategies
  • Here $c_{i,t}$ is proportional to the negative validation-loss derivative with respect to a token weight, as defined in Equation (15)
  • Early, middle, and final denote MetaOPD steps 232, 464, and 696
  • Checkpoints share the same rollout prompts but generate responses separately
  • (a) Token-weight standard deviation over training
  • For each batch, we average the vectors $d$ from its four banks, weighted by their valid reference-token counts, then compute and center $c_{i,t}$
  • We report the median within-response correlations of learned weights with the resulting $c_{i,t}^{\circ}$ values or their magnitudes
  • Agreement compares $c_{i,t}^{\circ}$ computed from 32-example reference batches; weight correlations use $c_{i,t}^{\circ}$ obtained after averaging $d$ over 256 reference examples, weighted by valid reference-token counts, and centering within each response
  • The gap has a larger absolute correlation than the learned weights (0.267), in the opposite direction
  • Learned uses weights directly from the checkpoint's frozen weighting network, without a new meta-update; this probe evaluates the allocation already learned at that checkpoint
  • Within each bank, we compute token-mean validation loss and average the two group results equally, then average the 32 banks equally:
  • Negative $\Delta L_{h}^{\text{step}}$ indicates a lower mean loss than the unchanged checkpoint
  • These intervals condition on the checkpoint and its fixed responses, excluding training-seed variation
  • Both allocations nevertheless increase mean loss relative to the unchanged checkpoint at every stage, so Learned's advantage is relative rather than absolute
  • These interventions use local derivative rankings to take finite steps at the reference rate; their relative ordering does not guarantee descent or improvement over the full training trajectory
  • Learned–Uniform intervals use 10,000 reference-bank bootstrap resamples with checkpoint and rollouts fixed
  • >Checkpoint (step)</td><td colspan=
  • Agreement uses $c_{i,t}^{\circ}$ computed from 32-example reference batches; $\Delta L_{\mathrm{Reweighted-Learned}}$ uses equally weighted eight-example reference banks at reference rate $3\times 10^{-6}$
  • Distillation methods use the Qwen3-8B teacher
  • Avg@8 measures average response accuracy, and Pass@8 measures the fraction of questions answered correctly at least once
  • It is distinct from the six-benchmark mathematical-reasoning averages in Table 1; individual metrics remain necessary to interpret the transfer profile