TL;DR
On-Policy Self-Distillation (OPSD) improves LLM reasoning by using a solution-aware "teacher" version of a model to guide a "student" version. However, standard OPSD only teaches the model what token to predict next, ignoring where to look in the context. This paper introduces On-Policy Attention Self-Distillation (OPASD), which successfully distills internal attention maps to significantly boost math reasoning accuracy while drastically reducing model rambling and training costs.
What Problem Does This Paper Address?
When training language models to perform complex, multi-step reasoning (like solving competition-level math problems), providing dense feedback is critical. On-Policy Self-Distillation (OPSD) handles this by using a single model in two roles: a "student" that attempts to solve a problem from scratch, and a privileged "teacher" that evaluates the student's exact reasoning path but with a major advantage—the teacher has access to the verified ground-truth solution.
While OPSD provides excellent token-by-token guidance, it traditionally only aligns the next-token probability distributions. It completely ignores the teacher's internal attention maps, which contain rich information about how to weigh past context and prior reasoning steps.
Why not just copy the teacher's attention maps? Because the teacher is looking at the ground-truth solution, its attention distribution includes tokens that the student cannot see. This creates a support mismatch—you cannot directly force a student to align its attention with tokens that do not exist in its context window.
Methods
The authors introduce On-Policy Attention Self-Distillation (OPASD) to bridge this gap using a technique called Student-Support Projection:
- Attention Truncation & Renormalization: At each reasoning step, the teacher's attention map is filtered to remove any attention mass allocated to the privileged solution tokens. The remaining attention mass (allocated to the problem statement and the student's own generated prefix) is then renormalized. This preserves the teacher's relative attention weights while perfectly matching the student's visible context.
- Joint Distillation Objective: The model is trained on a combined loss function. It minimizes both the standard token-level divergence and an attention-level divergence (using the generalized Jensen-Shannon Divergence) applied to the head-averaged attention of the final transformer layer.
Datasets
- Training: The mathematical reasoning subset of the OpenThoughts dataset, sampling up to 30,000 problem-solution pairs.
- Evaluation: Four highly challenging, competition-level mathematics benchmarks: AIME 2024, AIME 2025, AIME 2026, and HMMT 2025.
Key Insights and Ideas
- Attention as a Rambling Regularizer: A notorious failure mode of standard token-only OPSD is "response-length inflation." As training progresses, the model starts generating massive, repetitive chains of thought filled with "epistemic tokens" (e.g., "wait", "hmm", "maybe"), effectively over-thinking without getting smarter. OPASD's attention supervision acts as a powerful regularizer, keeping the model's focus sharp and its responses concise.
- Relative Weighting is Enough: The success of the student-support projection reveals that the absolute attention mass placed on a solution isn't what matters. Instead, preserving the relative importance ratios between the problem tokens and the prior reasoning steps provides a highly effective teaching signal.
Key Results
The authors evaluated OPASD across three model scales from the Qwen3 family (1.7B, 4B, and 8B parameters), yielding substantial improvements across the board:
- Accuracy Boost: OPASD consistently outperformed token-only OPSD, raising average accuracy scores by 4.98 percentage points on the 1.7B model, 8.40 points on the 4B model, and 5.97 points on the 8B model.
- Pareto Efficiency: Because OPASD prevents response-length inflation, it reduced the total number of generated rollout tokens during training by a staggering 73.9%. This resulted in a 1.53× wall-clock training speedup and an 11.9% reduction in peak GPU memory usage.
Limitations and Future Work
- Domain Specificity: The method was exclusively validated on competition-level mathematical reasoning. Its performance on other multi-step reasoning tasks, such as code generation or general symbolic logic, remains untested.
- Static Teacher: The privileged teacher model remains frozen at the initial checkpoint throughout training. The authors note that exploring dynamic or iterative teacher-update strategies could be a promising direction for future research.
Summary updated