Repulsive and attractive teachers in self-distillation: separating correctness from behaviorOn Repulsive and Attractive Teachers: Separating Correctness from Behavior in Self-Distillation
The authors isolate self-distillation)Skipa/length step uses a contrastive objective moving toward correct solutions and away from incorrect ones to cancel behavioral shifts, and state that reasoning improves with more stable lengths.
- On-policy self-distillation uses privileged information to construct a teacher from the same model, but full solutions change behavior, entangling correctness with brevity and overconfidence. Without separating this signal from GRPO, one cannot tell whether the learning is capability or behavior.
- The student first generates a response, and the same frozen model then re-scores it conditioned on the correct and incorrect solutions. The contrastive objective moves with λ=1/2 toward the former and away from the latter; experiments use generalized JSD over sampled tokens with α=0.5, without stacking GRPO.
- Across Qwen3-4B non-thinking, Instruct-2507, and already-thinking settings, the authors say the contrastive objective improves reasoning with relatively stable length. One-sided repulsion lengthens responses until truncation collapse; the mixed model enters existing thinking but does not exceed the thinking baseline.
- The paper does not list limitations separately. The Conclusion lists balanced teachers, new positive and negative contexts, and larger models as future work. Trained models are Qwen3-4B and Instruct-2507, with tasks including DeepMath and Group Anagrams; repetitions are not reported, and main figures do not mark final accuracy.
- Evaluated models
- Qwen3-4BQwen3-4B-Instruct-2507
- Benchmarks
- DeepMathAIME24AIME25AIME26AMC23HMMT25MATH-500Group Anagrams
- Metrics
- macro accuracymean@4response lengthtruncation fractionthink-tag closure
In reasoning tasks, researchers found that in on-policy self-distillation, privileged information changes not only what the teacher model "knows" but also its behavior: attractive self-distillation suppresses exploratory reasoning and makes answers shorter and more confident, while repulsive self-distillation lengthens answers, may trigger the model to unexpectedly switch into a latent thinking mode, and eventually becomes unstable. They therefore propose contrastive self-distillation, which approaches the teacher conditioned on the correct answer while moving away from the teacher conditioned on the incorrect answer, so that the behavior shifts from the two teachers largely cancel each other out, leaving a token-level signal that more directly reflects correctness. Across non-thinking, instruct-only, and already-thinking models, this objective improves reasoning performance and keeps response length stable.
Paper analysis
What problem does this paper attempt to solve?
Privileged conditioning entangles correctness signals with behavioral shift; contrastive self-distillation tries to separate the two.
Privileged conditions change both what the teacher knows and how it behaves, and self-distillation entangles correctness signals with behavior shifts.
- Scenario: In on-policy self-distillation, the student first generates answers, then the same model rescored them token by token under privileged context. The authors consider this dense signal a replacement for RLVR methods such as GRPO that give only scalar rewards, and usable for post-training and continued adaptation of deployed models.
- Limitations: Full solutions suppress verbal uncertainty, checking, and exploration, potentially causing overconfidence; SDPO is better suited to code feedback that points out only local errors. AntiSD, Rebellious Student, and existing contrastive methods still leave correctness to GRPO, or use the signal to modulate reward training.
- Observation: Attraction pushes toward shorter, more confident answers; repulsion lengthens responses and may switch into the mixed model's existing thinking mode, eventually becoming unstable. The authors consider these behavior shifts largely unrelated to correctness.
- Approach: The authors examine contrastive self-distillation in isolation: approaching the correct-solution teacher and moving away from the incorrect-solution teacher, without adding GRPO. They say the behavior shifts shared by both sides largely cancel, leaving a token-level signal that more directly reflects correctness.
What related research exists?
Related work often ties self-distillation to GRPO, while the authors examine attraction, repulsion, and contrast separately.
Most prior methods tie self-distillation to GRPO; the authors instead compare attractive, repulsive, and contrastive signals in isolation.
On-policy distillation and self-distillation
- Distillation along student trajectories: Agarwal et al. (2024) provide token-level supervision on trajectories generated by the student itself; the introduction also cites Lu and Thinking Machines Lab (2025).
- Same model as teacher: SDPO (Hübotter et al., 2026), SDFT (Shenfeld et al., 2026), and OPSD (Zhao et al., 2026) use privileged information to construct teachers from the student itself, without needing a stronger external model.
- Mixed with reward updates: RLSD (Yang et al., 2026) reweights reward-driven updates with teacher signals; SRPO (Li et al., 2026) sends correct samples to GRPO and failed samples to SDPO.
Behavioral bias from privileged information
- Solution-conditioned teachers: Kim et al. (2026b) report that teachers conditioned on solutions suppress uncertain verbalization and exploration and may harm reasoning generalization.
- Less specific contexts: Harne et al. (2026) find that prompts or general skills mitigate this privileged-information bias but also weaken the learning signal.
Inverted teacher guidance
- AntiSD and Rebellious Student: Shen et al. (2026) and Kim et al. (2026a) invert the guidance of correct-solution teachers to encourage exploration, with correctness still provided by GRPO. AntiSD also uses an entropy-triggered gate to stabilize training. The authors' difference is to examine attraction and repulsion separately, to distinguish capability changes from behavioral changes.
Contrasting positive and negative teachers
- CEPO and RLCSD: Heakl et al. (2026) and Pan et al. (2026) contrast teachers conditioned on correct versus incorrect solutions, but use the resulting signal to modulate reward-based training. The authors state that additional verified rewards dilute the token-level teacher signal.
Baselines and benchmarks
- GRPO: Shao et al. (2024). The implementation uses group-relative advantages without dividing by the group standard deviation, and asymmetric policy-ratio clipping (Section B.2). A thinking-mode baseline is also compared.
- Tasks: Training uses the hard DeepMath subset and Group Anagrams from Reasoning Gym; math evaluation covers AIME24, AIME25, AIME26, AMC23, HMMT25, and MATH-500.
The authors position this work as: without GRPO, separating changes in reasoning capability from changes in reasoning behavior, and examining how behavioral biases shared by both teachers cancel out.
How does the paper address this problem?
The contrastive objective equally approaches the correct-solution teacher and moves away from the incorrect-solution teacher, without adding GRPO.
Contrastive self-distillation combines a teacher conditioned on the correct solution and a teacher conditioned on the incorrect solution into a token-level objective without adding GRPO, to subtract the behavior shift shared by both sides.
Self-distillation setup
- Student trajectories: Given a prompt, the student samples answers y. The same model, on privileged context the student cannot see, rescores along this already generated trajectory, without sampling new answers from the teacher. Teacher parameters are fixed during updates.
- Per-token advantages: The main text writes the reverse KL as the difference in log probabilities between teacher and student, AtSDPO(c)=log ptc(yt)−log ptS(yt). Sampled tokens the teacher prefers over the student receive positive advantage.
- Divergence in experiments: Reverse KL is used only for exposition. All experiments use the generalized JSD over sampled tokens, with mixing coefficient α=0.5 and token-mean aggregation; teacher EMA update rate is 0 (Section B.2).
Attraction and repulsion
- Attraction: Minimizes the reverse KL from the student distribution to the privileged teacher, with the same advantage sign as SDPO. Conditioned on the full solution, the teacher is more confident and concise, and exploratory tokens are downweighted.
- Repulsion: Maximizes the same divergence, with the advantage sign flipped. Tokens unlikely under the teacher, including uncertainty and self-correction, receive positive advantage. Figure 3 colors the same student segment by advantage to illustrate this sign reversal.
- Isolation: No GRPO advantage is added, and no extra stabilization mechanisms such as AntiSD's entropy gating are used. Repulsion can be conditioned on the correct or incorrect solution; the main experiments' Repulsive uses the incorrect solution, while Figure 2's diagnostics use the correct solution.
Contrastive objective
- Two teachers: Positive and negative contexts each condition a teacher. The combined term is λ times the KL toward the positive teacher minus (1−λ) times the KL toward the negative teacher, with λ between 0 and 1. It is summed over response positions and then averaged over student rollouts.
- Three points: λ=1 is Attractive, λ=0 is Repulsive, and λ=1/2 is Contrastive. The authors illustrate in Figure 1 that the contrastive direction is used to cancel the opposite behavior shifts on both sides.
- Student term cancellation: At λ=1/2 the student term cancels exactly, and the advantage only compares the positive and negative teachers' probabilities for the same token, Atctr=1/2log(pt+(yt))/(pt−(yt)). A ratio greater than 1 reinforces that token. Whether behavior preferences cancel depends on how much the two contexts share preferences, which the authors say must be determined experimentally.
- Direct use: The correct solution can be an expert solution or the model's own verified rollout. The token-level signal is applied directly, without auxiliary GRPO.
Contexts and updates
- DeepMath: The positive context is an expert solution with the thinking trace removed; the negative context is another incorrect rollout from the same on-policy group. Only incorrect answers present in both contexts are distilled; groups where only one side is available are skipped.
- Group Anagrams: Both positive and negative contexts are the model's own rollouts, with thinking traces retained. The positive example is the first correct solution in the group, and the negative example is the first incorrect rollout that is not the target answer.
- Optimization: All three self-distillation objectives use learning rate 5×10^-7, AdamW, warmup for 10 steps then constant, weight decay 0.01, and gradient clipping 1.0. Each batch has 32 prompts with 8 rollouts each, then split into 4 minibatches of 64. Entropy regularization is disabled, and there is no KL regularization to the reference policy.
- Template: Positive and negative contexts use the same template, presenting the solution as an example, then having the teacher answer itself including the thinking process. Section B.1 gives the full template.
What experiments did the paper conduct?
Repulsion lengthens and collapses; the contrastive objective improves reasoning across three initializations with more stable length.
Across three initializations, repulsion lengthens responses and collapses after truncation; the contrastive objective is described by the authors as improving both training and evaluation, with length staying within budget.
Experimental setup
- Models: Qwen3-4B is trained on DeepMath in non-thinking mode (Section 5.1) and on Group Anagrams in thinking mode (Section 5.3); Qwen3-4B-Instruct-2507 has no explicit thinking mode (Section 5.2). Group Anagrams expert solutions are generated by Qwen3-235B-A22B-FP8, not the trained model.
- Data: DeepMath uses 10,000 problems with difficulty at least 8 and seed 0, with difficulties 8 to 10. Math evaluation uses 30 problems each from AIME24/25/26, 40 from AMC23, 30 from HMMT February 2025, and the first 128 rows of MATH-500, totaling 288 problems and 1,152 responses (Table 4). Group Anagrams trains on 2,200 problems and evaluates on 400, across four difficulties (Table 1).
- Objectives: Attractive (λ=1), Repulsive (λ=0), Contrastive (λ=1/2), and GRPO, with a thinking-mode baseline for comparison. The main experiments' Repulsive is conditioned on the incorrect solution; Figure 2 and Appendix A.1 condition on the correct solution.
- Metrics: Training accuracy, six-item math macro accuracy, Group Anagrams evaluation score, response length, truncation ratio, and the closed think-label ratio of the mixed model under non-thinking initialization. Evaluation is mean@4 with 4 responses per problem.
- Sampling and judging: Training rollouts use temperature 1.0, top-p 1.0, and top-k disabled. Evaluation uses temperature 0.6, top-p 0.95, and top-k disabled. Group Anagrams training uses the task's native score, and evaluation counts a response as correct only when the native score equals 1 (Section B.3).
- Budget: Math training and evaluation responses have a cap of 28,672 tokens, and Group Anagrams training has a cap of 24,576 tokens (Table 2). Self-distillation learning rate is 5×10^-7, and GRPO is 2×10^-6. The paper does not report training random seeds or number of repetitions.
Main results
Figures 4–6's main text and captions do not give final accuracy values. The table below only records trends stated in the captions.
Swipe horizontally to read the table
Initialization and task Repulsive Attractive Contrastive Source Qwen3-4B non-thinking, DeepMath Enters thinking, still below thinking baseline, then truncates and collapses Training rises, evaluation roughly unchanged, responses shorten Training and evaluation rise, length gradually increases and stays below the 28k cap in the figure Figure 4 Qwen3-4B-Instruct-2507, DeepMath Training and evaluation rise initially, then truncate and collapse, no think labels Only training improves, responses stay short Training and evaluation rise continuously, not approaching the 28k cap Figure 5 Qwen3-4B thinking, Group Anagrams Improves until about step 12, then truncates and collapses Training and evaluation rise, responses shorten Training and evaluation rise continuously, length below the 24k cap Figure 6 - Repulsion: The authors say it mainly changes behavior. The apparent recovery on the mixed model comes from entering existing thinking, not from exceeding directly enabled thinking; length continues to grow and then truncates, collapsing both training and evaluation. In Section 5.3, they say it initially improves at roughly the same rate as GRPO and ends after about 12 steps.
- Attraction: In both math settings, training improves and evaluation roughly stays flat, with shorter responses. On Group Anagrams, both training and evaluation improve while responses shorten. The authors consider that shorter responses do not necessarily hinder learning in this setting.
- Contrastive: The authors say it improves reasoning across all three initializations, with length gradually increasing but staying within budget. Models without explicit thinking, and models with thinking already enabled, still benefit, so the authors say it cannot be attributed only to enabling thinking.
Far from the correct-solution teacher
- Mixed model: Figure 2 starts from Qwen3-4B non-thinking and repels the correct-solution teacher. The authors mark three phases: initially stable; entering thinking, responses lengthen and begin outputting think labels; after further lengthening, truncation and collapse. They say it does not exceed the thinking-mode baseline.
- Instruct model: Figure 7 trains Qwen3-4B-Instruct-2507 with the same objective. Six-item math means at steps 0, 10, and 20 are 63.8%, 63.6%, and 64.2%; over the same period, training responses grow from 3.8k to 9.3k tokens. The authors say evaluation accuracy does not exceed initialization, and training and evaluation stagnate as responses lengthen.
- Collapse: The authors report that after step 22 the truncation ratio rises and reaches 100% at step 29, with training and evaluation accuracy dropping to 0. No thinking labels appear throughout. They say that without dormant thinking to reactivate, this repulsion only lengthens responses until truncation ends training.
Credit assignment granularity
- Method: On Group Anagrams Contrastive, the contrastive advantage is averaged over consecutive windows and then assigned back to each token within the window. Windows are 1, 10, 100, 1,000 tokens, and the full response; data and objective are unchanged.
- Pooling: The authors say larger windows degrade training more noticeably. Full-response pooling shows no training score improvement within 50 steps. A window of 10 is only slightly slower than per-token, with similar accuracy and shorter responses; the paper does not give the exact accuracy for this window.
- Shuffling: At step 50, with advantages aligned to tokens, training accuracy is 85.5% and responses are 12.2k tokens; after shuffling advantages within responses, it is 62.2% and 6.1k tokens (Figure 8). The authors say the two teachers provide where credit should lie, not just sequence-level signed updates.
Positive example source and thinking context
- Three groups: All use Qwen3-4B in thinking mode, Group Anagrams, and Contrastive. One group retains its own rollout's thinking, one removes the thinking trace, and one replaces the positive example with an expert solution.
- Length: Thinking length in the first ten steps is between 6.0k and 6.2k tokens, then diverges. The trace-retaining group reaches about 12.8k; the trace-removing group about 1.2k; the expert-solution group about 0.6k (Figure 9). Thinking length is counted up to the first closed think label.
- Comparison: All three groups have a generation ratio of unclosed thinking blocks below 2%. The authors say the privileged context determines how much the model reasons, and retaining its own thinking trace gives the highest accuracy; the paper does not give accuracy values for these three groups.
Other ablations and analyses
- Figures 4–6 include GRPO curves, but the main text and captions do not give their accuracy or length numbers.
- GRPO learning rate is 2×10^-6, advantages are not divided by group standard deviation, and policy ratio clipping is 0.2 lower and 0.28 upper; all three self-distillation learning rates are 5×10^-7 (Section B.2, Table 3).
- Importance ratio clipping threshold is 2.0, distillation advantage clipping is None, and teacher EMA update rate is 0 (Table 2).
- λ is only compared at 0, 0.5, and 1; JSD's α is fixed at 0.5 (Table 2, Table 3).
What are some points that can be further explored?
The authors list balanced teachers, new contexts, and scaling to larger models as future directions.
The paper has no separate Limitations section; future directions appear only in the Conclusion.
Limitations and future directions noted by the authors
- Teacher balancing: Section 6 lists studying different teacher balancing schemes as a future direction.
- New contexts: Section 6 lists designing new positive and negative context sources as a future direction.
- Larger models: Section 6 lists scaling these methods to larger models as a future direction.
Experimental coverage
- Models: The trained models are Qwen3-4B (non-thinking and thinking) and Qwen3-4B-Instruct-2507; Group Anagrams expert solutions are generated by Qwen3-235B-A22B-FP8 (Sections 4, B.1).
- Tasks: 10,000 problems in DeepMath with difficulty at least 8, and four difficulties of Group Anagrams, with 2,200 training problems and 400 evaluation problems (Table 1, Section B.1).
- Comparisons: Attractive, Repulsive, Contrastive, GRPO, and the thinking-mode baseline; math results are macro accuracy across six benchmarks, with 4 samples per problem (Sections 4, 5, B.3).
- Appendix: Figure 8 compares advantage pooling versus shuffling; Figure 9 compares three privileged contexts; Figure 2 and Figure 7 apply repulsion to correct-solution teachers.
- Unreported items: The paper does not report training random seeds or number of repeated runs; the main text and captions of Figures 4–6 do not give final accuracies for each curve.
Summarize the main content of the paper
After isolating self-distillation, contrasting correct and incorrect-solution teachers can cancel behavioral shifts and stably improve reasoning.
After separating self-distillation from GRPO, a contrastive signal that moves toward the correct-solution teacher and away from the incorrect-solution teacher separates correctness from behavior.
- Problem: Privileged solutions make the teacher shorter and more confident; when distilled back into the student, behavioral shift and correctness signals are passed along together. One-sided repulsion pushes the model toward longer, more uncertain responses.
- Method: The student first samples, then the same frozen model re-scores conditioned on the correct and incorrect solutions separately. Contrastive weights λ=1/2 equally toward the former and away from the latter; experiments use sampling-token JSD with α=0.5, without adding GRPO.
- Three settings: Qwen3-4B starting from non-thinking or thinking, and Instruct-2507 without explicit thinking. The authors state the contrastive objective improves both training and evaluation on DeepMath or Group Anagrams, with response length gradually increasing but staying within the 28k or 24k caps shown in the figures.
- Repulsion: One-sided repulsion conditioned on either incorrect or correct solutions lengthens responses and collapses after truncation. The mixed model switches into existing thinking, but the authors state it does not exceed the baseline with thinking directly enabled. When Instruct-2507 moves away from the correct solution, the six-benchmark math means at steps 0, 10, 20 are 63.8%, 63.6%, 64.2%; at step 29 truncation reaches 100% and accuracy drops to 0.
- Credit and context: On Group Anagrams, when advantage is aligned with tokens, step 50 training accuracy is 85.5% (12.2k tokens); when shuffled, it is 62.2% (6.1k tokens). Thinking length is about 12.8k when retaining one's own thinking, and about 0.6k when switching to expert solutions with trace removed.
- Conclusion: The authors argue that since the behavioral shifts shared by the two sides roughly cancel, contrastive self-distillation can serve alone as a post-training signal on reasoning tasks, not merely as a modulator for GRPO. Future directions in Section 6 are teacher balancing, new positive and negative contexts, and larger models.