On-Policy Attention Linearization
Arian Raje, Anupam Nayak, Anthony Fei, Akaash Parthasarathy, Mohamed Abdelfattah, Gauri Joshi
Abstract
Hybrid transformer architectures that replace most softmax attention layers with linear attention offer transformer-level quality at a fraction of the memory cost. Rather than pretraining such models, a growing body of work distills them from already trained full-attention transformers. However, these distilled models often collapse on long-context retrieval and reasoning tasks, particularly when operating in thinking mode, where the efficiency gains of hybrid architectures matter most. Since linear attention layers must compress context into a fixed-size state, their errors compound over long sequences. As off-policy distillation never teaches the student model to recover from this drift, tasks that necessitate longer sequence lengths become especially challenging. We introduce On-Policy Attention Linearization (OPAL) in which the hybrid attention student samples its own long-context trajectories and receives dense supervision from the frozen full-attention teacher. Applying OPAL to Qwen3-4B and MiMo-7B-RL-0530, we recover -- of full-attention performance on commonsense reasoning, on needle-in-a-haystack (NIAH) retrieval, and -- on mathematical reasoning with only 3B training tokens. We achieve these results without supervised fine-tuning (SFT) or reinforcement learning with verifiable rewards (RLVR). Compared with the strongest prior linearization method, which recovers of its teacher's retrieval performance and absolute average mathematical reasoning accuracy, OPAL fully recovers retrieval and achieves -- on math reasoning.
Create a lesson
Metadata
- Comments
- 29 pages, 12 figures
Related papers
Linear Attention Has Superlinear Capacity
Shared title terminologycs.LGHao Guo, Sudhaunshu Hardikar, Simon Dennis et al.
Scaling Properties of Same-Family On-Policy Distillation
Shared title terminologycs.LGYuntai Bao, Qinfeng Li, Guoqing Jiang et al.
Trapped by Their Own Rollouts: Understanding Aggregation--Rollout Feedback in Federated On-Policy Distillation
Shared title terminologycs.LGJinqian Chen, Jihua Zhu, Chang Liu
Block Sparse Attention with Log-Linear Complexity
Shared title terminologycs.LGBohao Tang, Zhen Qin, Yuqi Pan et al.
Attention-Based Adaptive Policies for Simultaneous Speech-to-Text Translation
Shared title terminologycs.LGFilip Tăşădan, Ema Tomanová, Ondrej Lopuch et al.
MOPD-Router: Rethinking Teacher Routing in Multi-Teacher On-Policy Distillation
Shared title terminologycs.LGTianze Xu, Yanzhao Zheng, Zhentao Zhang et al.