NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Copy the Same, Distill the Difference: Initializing Linear Vision Transformers

Huaiyuan Qin, Muli Yang, Gabriel James Goenawan, Shiqi Huang, Min Kass Chong, Wahyu Wiratama, Peng Hu, Chen Gong, Wu Liu, Xi Peng, Chun Jian Ho, Hongyuan ZhuarXiv 2026

TL;DR

Linear Vision Transformers (ViTs) offer efficient $O(N)$ complexity but typically struggle to match the performance of standard $O(N^2)$ Softmax ViTs. This paper reveals a simple, effective recipe for bridging this gap: copy the operator-agnostic MLP weights and distill the operator-specific attention behavior. By following this "copy the same, distill the difference" approach, linear ViTs can finally match or even surpass their Softmax counterparts across various tasks.

What Problem Does This Paper Address?

Standard Vision Transformers rely on Softmax attention, which scales quadratically with the number of tokens. This makes them a computational bottleneck for high-resolution images or long-context tasks. Linear ViTs were designed to solve this by replacing Softmax with linear-complexity operators.

However, linear ViTs have a major adoption problem: they usually require expensive pre-training from scratch and still underperform the original Softmax models. While researchers have successfully reused weights between different Softmax ViTs (a technique called Attention Transfer), this paper discovers that these methods fail miserably when crossing the "Softmax-to-linear boundary." The authors set out to understand why direct weight copying fails and how to properly initialize linear ViTs using the wealth of existing pre-trained Softmax foundation weights.

Methods

The authors conduct a systematic, component-level study of weight transfer. They break down the ViT architecture into two main parts: the Attention blocks (responsible for token routing) and the MLP blocks (responsible for learned representations).

They test three primary initialization strategies:

  1. Random: Training from scratch.
  2. Copy: Directly loading pre-trained Softmax weights into the linear student.
  3. Distill: Using a frozen Softmax ViT as a "teacher" to guide the linear student during training.

Crucially, for distillation, they find that matching attention outputs (the vectors produced after the attention operation) using a Mean Squared Error (MSE) loss is far more effective than matching "attention maps." This is because many linear attention variants don't even materialize a traditional attention map, making map-matching impossible or ill-defined.

The proposed transfer principle: Copy operator-agnostic MLPs and distill operator-specific attention.

Datasets

The study is comprehensive, validating findings across:

  • Large-scale Pre-training/Validation: ImageNet-1K.
  • Transfer Learning Benchmarks: CIFAR-10, CIFAR-100, STL-10, Food-101, Flowers-102, and Oxford-IIIT Pets.
  • Downstream Dense Prediction: COCO (Object Detection and Instance Segmentation) and ADE20K (Semantic Segmentation).
  • Linear Variants: ELU, ReLU, InLine, MHLA, and TTT.

Key Insights and Ideas

  • Attention weights are operator-specific: The projection weights ($Q, K, V$) in a Softmax ViT are mathematically tied to the Softmax function. When you plug those same weights into a linear kernel, the functional mapping breaks. As shown in the paper, direct copying of attention weights is often worse than random initialization.
  • MLPs are operator-agnostic: MLP blocks act as "key-value memories" for representations. Because their architecture doesn't change between Softmax and Linear ViTs, their weights retain their meaning. Copying MLPs alone provides the bulk of the transfer benefit.
  • The "Copy + Distill" Complementarity: The authors propose a simple decomposition: $Output = \text{Computation Mismatch} + \text{Input Mismatch}$. Copying MLPs fixes the computation mismatch for the representation, while distilling attention outputs fixes the input mismatch caused by the new routing behavior.
  • Generality: This principle holds true regardless of the specific linear attention variant used (e.g., ReLU vs. TTT) or the model size (Tiny, Small, or Base).
Directly copying attention weights (red lines) consistently fails to beat random initialization (gray lines) across datasets.

Key Results

The results demonstrate that the proposed recipe allows linear ViTs to close the performance gap:

  • ImageNet-1K: A ReLU-based Linear ViT (Base size) initialized with the "Copy MLP + Distill Attention" recipe achieved 82.0% Top-1 accuracy, actually surpassing the 81.8% of the original Softmax teacher.
  • Transfer Tasks: On datasets like CIFAR-100 and Pets, the combination of copied MLPs and distilled attention consistently brought linear models to the "Softmax recovery target" (the performance of the original teacher).
  • Dense Prediction: On COCO object detection, the recipe improved the box AP of a ReLU-based backbone from 34.0 (random) to 42.4, matching the Softmax baseline of 42.9.
Ablation study showing that while copying MLPs (red bars) provides a huge boost, adding attention distillation (blue bars) is necessary to reach or exceed the Softmax target (dashed line).

Limitations and Future Work

While the results are robust, the authors acknowledge a few limitations:

  • Empirical Scope: The primary source of pre-trained weights was the DeiT family. While they tested other sources (MAE, DINO, etc.) for robustness, the full recipe was most extensively validated on DeiT.
  • Not Training-Free: Unlike some weight-conversion methods, this recipe still requires a supervised fine-tuning phase with a distillation loss.
  • Theoretical Gap: The study is heavily empirical. A formal mathematical theory explaining why MLPs are so much more "agnostic" than attention projections remains an open challenge for future research.

Summary updated

BibTeX
@misc{qin2026copy,
  author = {Huaiyuan Qin and Muli Yang and Gabriel James Goenawan and Shiqi Huang and Min Kass Chong and Wahyu Wiratama and Peng Hu and Chen Gong and Wu Liu and Xi Peng and Chun Jian Ho and Hongyuan Zhu},
  title = {{Copy the Same, Distill the Difference: Initializing Linear Vision Transformers}},
  year = {2026},
  eprint = {2609.35745},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.35745},
}
Figure