Manuscript Offprint

arXiv:2610.21195

Condition-Contrastive Extrapolation for On-Policy Distillation of Language Models

Wenxuan Luo, Chenxi Li, Haoyue Liu, Yongxin Guo, Xiaoying Tang

Abstract

On-policy distillation (OPD) improves a student language model by training on its own generated trajectories with supervision from a stronger teacher. However, when conditioned on student-generated prefixes, the teacher can favor invalid continuations that violate the question's premises, causing OPD to encourage erroneous reasoning steps. As a remedy, we introduce Condition-Contrastive Extrapolated On-Policy Distillation (CCE-OPD), which makes teacher supervision sensitive to question conditions. CCE-OPD incorporates (1) a fixed-prefix comparison in which the same frozen teacher evaluates the complete question and a counterpart with a selected condition masked, and (2) a bounded log-probability contrast that reweights the teacher distribution into an auxiliary distillation target. On 200 diagnostic reasoning states, condition contrast reduces the rate of preferring invalid continuations from 27.0% to 16.0%. Extensive experiments across six mathematical benchmarks show that CCE-OPD improves avg@8 over OPD by an average of 1.60 and 1.95 percentage points when distilling Qwen3-8B into 0.6B and 1.7B students, respectively. It also achieves the strongest results on four transfer benchmarks.

1 Introduction

Knowledge distillation (Hinton et al., 2015) transfers the predictive behavior of a larger teacher to a smaller student, offering a practical route to reducing the cost of deploying capable language models. For autoregressive generation, supervision can take the form of teacher-produced responses or token distributions that convey preferences among alternative continuations. Training on teacher-generated trajectories, however, exposes the student to prefixes that can differ from those it produces at inference time (Agarwal et al., 2024). This mismatch is particularly relevant to multi-step reasoning, where each generated step determines the context for subsequent decisions.

On-policy distillation (OPD) addresses this mismatch by collecting trajectories from the student and querying the teacher at the resulting prefixes (Agarwal et al., 2024). The teacher thus provides feedback at states the student actually visits, including those arising from its own mistakes. Sampled reverse-KL objectives turn teacher–student log-probability differences into dense token-level learning signals (Li et al., 2026). Recent approaches refine this supervision through reliable regions of teacher–student agreement (Xing et al., 2026) and additional distributional matching at high-entropy positions (Jin et al., 2026). These developments make OPD a useful framework for transferring reasoning capabilities while accounting for the student’s evolving generation behavior.

However, these approaches improve how teacher feedback is applied on student-generated trajectories, but they do not by themselves ensure that a preferred continuation satisfies the question’s conditions. We refer to continuations whose reasoning conflicts with the question’s stated conditions as condition-violating continuations (CVC). Our diagnostics show that, conditioned on a student-generated prefix, the teacher can favor CVC that follow an erroneous reasoning direction. For example, suppose a question specifies x>0x > 0 and x2=9x^{2} = 9. After a student prefix such as “Taking the negative root, $x = \text{”, continuing with “-3” follows the prefix’s reasoning direction but violates the question’s positivity constraint. We find that OPD can assign a positive local advantage to a sampled token that

∗^{*}Equal contribution.

†^{\dagger}Corresponding author.

Figure

Figure 1: Overview of CCE-OPD. The same frozen teacher evaluates a shared student prefix under the complete question and a version with a selected condition masked. The clipped condition contrast reweights the full-teacher distribution to form the auxiliary target qEq_{E}. The student is trained with the resulting auxiliary KL loss together with the original OPD objective.

begins a CVC, producing a learning signal that favors that continuation. To refine this supervision, we seek to distinguish continuations supported by the question’s conditions from those that merely follow the student’s reasoning direction. We therefore keep the student prefix fixed and compare the teacher’s predictions with and without a selected condition. The resulting contrast provides an additional signal for reweighting the distillation target toward valid continuations.

We propose Condition-Contrastive Extrapolated On-Policy Distillation (CCE-OPD) to refine teacher supervision on student trajectories (Figure 1). At the same student prefix, a frozen teacher scores the complete question and a version with a selected condition masked. Their clipped condition contrast reweights the teacher distribution into an auxiliary target that complements sampled-token OPD.

Our contributions are threefold:

• Diagnosing supervision errors. We identify teacher preferences for CVC on student trajectories and use fixed-prefix comparisons to examine how question conditions affect those preferences.

• Refining continuation preferences. We introduce CCE-OPD, which uses clipped condition contrast to reweight an auxiliary distillation target.

• Evaluating effectiveness and design choices. Across two student scales, CCE-OPD achieves the best or tied-best avg@8 on six mathematical benchmarks. Input-construction, extrapolation-strength, and entropy-gate ablations assess its design choices, and four transfer tasks evaluate generalization beyond mathematics.

References (45)