[Paper Review] ViT-AdaLA: Adapting Vision Transformers with Linear Attention
ViT-AdaLA adapts pretrained softmax-based vision transformers to linear attention through three-stage alignment (attention, feature, supervised fine-tuning), achieving near-softmax accuracy with linear attention on classification and segmentation tasks.
Vision Transformers (ViTs) based vision foundation models (VFMs) have achieved remarkable performance across diverse vision tasks, but suffer from quadratic complexity that limits scalability to long sequences. Existing linear attention approaches for ViTs are typically trained from scratch, requiring substantial computational resources, while linearization-based methods developed for large language model decoders do not transfer well to ViTs. To address these challenges, we propose ViT-AdaLA, a novel framework for effectively adapting and transferring prior knowledge from VFMs to linear attention ViTs. ViT-AdaLA consists of three stages: attention alignment, feature alignment, and supervised fine-tuning. In the attention alignment stage, we align vanilla linear attention with the original softmax-based attention in each block to approximate the behavior of softmax attention. However, residual approximation errors inevitably accumulate across layers. We mitigate this by fine-tuning the linearized ViT to align its final-layer features with a frozen softmax VFM teacher. Finally, the adapted prior knowledge is transferred to downstream tasks through supervised fine-tuning. Extensive experiments on classification and segmentation tasks demonstrate the effectiveness and generality of ViT-AdaLA over various state-of-the-art linear attention counterpart.
Motivation & Objective
- Motivate the need for scalable linear attention in ViTs without training from scratch.
- Propose a three-stage framework to transfer knowledge from pretrained VFMs to linear-attention ViTs.
- Demonstrate that attention and feature alignment enable high accuracy and efficiency on downstream tasks.
Proposed method
- Stage 1 (Attention Alignment): align vanilla linear attention with softmax attention by tuning Q, K, V projections to minimize MSE between their outputs across layers.
- Stage 2 (Feature Alignment): replace softmax with aligned linear attention and fine-tune the whole linearized ViT to match the frozen softmax teacher’s final-layer features (feature alignment loss).
- Stage 3 (Supervised Fine-tuning): attach task-specific heads and fine-tune on downstream datasets to transfer adapted priors.
- The approach uses vanilla linear attention with kernel-based reformulation (phi = ELU(x)+1) and optimizes attention output alignment and final feature alignment to mitigate error accumulation.
- The framework is architecture-agnostic and compatible with other linear attention methods.
Experimental results
Research questions
- RQ1Can a three-stage alignment (attention, feature, fine-tuning) effectively transfer priors from a softmax ViT to a linear-attention ViT?
- RQ2Does aligning final-layer features help mitigate layer-wise residual errors in linearized ViTs for dense vision tasks?
- RQ3How does ViT-AdaLA perform on classification and segmentation compared to state-of-the-art linear attention baselines?
- RQ4Is the approach scalable to high-resolution inputs while preserving efficiency?
- RQ5Is the method robust across different VFMs and downstream tasks?
Key findings
- ViT-AdaLA achieves top-1 accuracy close to the softmax backbone while maintaining linear-attention efficiency.
- Stage 1 attention alignment provides better approximation and efficiency than Hedgehog-based methods.
- Stage 2 feature alignment accelerates convergence and preserves VFM priors, enabling strong transfer to downstream tasks.
- On ImageNet-1K, ViT-AdaLA (Ours) reaches 86.0% top-1 with the DINOv2-L backbone, outperforming several linear baselines.
- On ADE20K, ViT-AdaLA (Stage 2) achieves 55.55 mIoU, matching or exceeding many linearized baselines, and improves with higher-resolution inputs.
- The method demonstrates resolution scalability (e.g., from 512^2 to 1024^2) with memory and throughput benefits over softmax, while preserving performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.