Teach Yourself Where to Look: On-Policy Attention Self-Distillation for Reasoning

Safaeid Hossain Arib, Rabeya Akter, Ismam Nur Swapnil, Md. Faiyaz Abdullah Sayeedi, Tasnim Mohiuddin, Md Mofijul Islam

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.

Figure 1: Comparison of OPSD and OPASD. (a) OPSD provides token-level supervision through teacher-student next-token distribution alignment. (b) OPASD provides both token- and attention- level supervision through joint next-token and projected attention distribution alignment.

Methods

The authors introduce On-Policy Attention Self-Distillation (OPASD) to bridge this gap using a technique called Student-Support Projection:

  1. 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.
  2. 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.
Detailed pipeline of OPASD, showing on-policy sampling, student-support projection, and joint distillation.

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.
Figure 4: Training dynamics and epistemic-token shifts on Qwen3-4B. OPASD maintains stable training and validation performance with concise responses and limited epistemic-token shifts, whereas OPSD exhibits declining accuracy, response-length inflation, and substantially greater use of uncertainty and reconsideration markers.

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

BibTeX
@misc{arib2026teach,
  author = {Safaeid Hossain Arib and Rabeya Akter and Ismam Nur Swapnil and Md. Faiyaz Abdullah Sayeedi and Tasnim Mohiuddin and Md Mofijul Islam},
  title = {{Teach Yourself Where to Look: On-Policy Attention Self-Distillation for Reasoning}},
  year = {2026},
  eprint = {2609.33200},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.33200},
}
Figure