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 Zhu
Abstract
Linear Vision Transformers (ViTs) are designed to replace the attention in Softmax ViTs with the linear-complexity attention operator for more efficient token routing, but they require from-scratch pre-training and typically underperform the original Softmax version. How to initialize linear ViTs both efficiently and effectively still remains unclear. In this work, we explicitly ask: given that most foundation ViTs are built on the mainstream Softmax attention, can linear ViTs benefit from their pre-trained weights? Recent works on Attention Transfer show that attention is the effective transferable component between Softmax ViTs, suggesting attention alone suffices for such reuse. However, we find the opposite for Softmax-to-linear transfer. The attention weights are operator-specific: copying them barely helps, and is sometimes even worse than random initialization. Instead, the attention's token routing behavior can be recovered through distillation with a proper loss design, letting linear ViTs reduce the gap and even match Softmax ones. In contrast, the MLP weights, which carry the learned representation, are operator-agnostic: they can be transferred by simple direct copying, which already carries most of the benefit of the pre-trained weights. Thus, copying MLPs can serve as an effective foundation for Softmax-to-linear transfer: paired with the distilled attention, linear ViTs eventually close the remaining gap and even surpass Softmax ones. These findings hold consistently across various linear ViT variants, different model sizes, and diverse datasets. We hope this study deepens the understanding of reusing pre-trained weights across attention operators: copy what stays the same and distill what differs, to recover the benefit across the Softmax-to-linear boundary.
Create a lesson
Metadata
- Categories
- cs.CV, cs.AI, cs.LG
Related papers
Focus Only on What's Important: Training-Free Focus Maps for Frozen Vision Transformers in Long-Video Object Segmentation
Shared title terminologycs.CVHarsha Karipineni, Rajesh Reddy Chintha
EviViT: Evidence-Adaptive Vision Transformers for Fine-Grained Perception
Shared title terminologycs.CVYaoxin Niu, Zhangquan Chen, Yang Zhang et al.
One Geometry, Different Outcomes: Readout-Dependent Effects of the Modality Gap in Vision-Language Models
Shared title terminologycs.CVAditya Sharma, Divya Saxena
ReSS: Residual-Restoring Sparse Attention for 3D Vision Transformers
Shared title terminologycs.CVYongsung Kim, Jaehoon Lee, Minjun Park et al.
Revisiting Risky Tackle Detection with Vision Transformers
Shared title terminologycs.CVSyed Ahsan Masud Zaidi, Lior Shamir, Scott Dietrich
AHMAD: Adaptive Hybrid Multi-task Vision Learning with Assisted Distillation for Keypoint Detection
Shared title terminologycs.CVMohammad Mahdi, Nedyalko Prisadnikov, Yuqian Fu et al.