[论文解读] ViT-AdaLA: Adapting Vision Transformers with Linear Attention
ViT-AdaLA 通过三阶段对齐(注意力、特征、监督微调)将以 softmax 为基础的视觉变换器的先验知识迁移到线性注意力,在分类和分割任务上实现接近 softmax 的准确性且保持线性注意力的高效。
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.
研究动机与目标
- 推动对 ViTs 中可扩展线性注意力的需求,而无需从头训练。
- 提出一个三阶段框架,将来自预训练 VFMs 的知识转移到线性注意力 ViTs。
- 证明注意力对齐和特征对齐能在下游任务中实现高准确性与高效性。
提出的方法
- 阶段 1(注意力对齐):通过在各层调整 Q、K、V 投影,使 vanilla 线性注意力与 softmax 注意力输出之间的均方误差最小化,从而实现对齐。
- 阶段 2(特征对齐):用对齐的线性注意力替换 softmax,并对整个线性化 ViT 进行微调,使其与冻结的 softmax 教师的最终层特征相匹配(特征对齐损失)。
- 阶段 3(有监督的微调):附加任务特定头部,在下游数据集上微调以转移经过适配的先验。
- 该方法使用带核重塑的 vanilla 线性注意力(phi = ELU(x)+1),并优化注意力输出对齐与最终特征对齐以减小误差累积。
- 该框架与架构无关,且可与其他线性注意力方法兼容。
实验结果
研究问题
- RQ1三阶段对齐(注意力、特征、微调)是否能有效将 softmax ViT 的先验迁移到线性注意力 ViT?
- RQ2对齐最终层特征是否能缓解线性化 ViT 在密集视觉任务中的层间残差误差?
- RQ3相对于当前最先进的线性注意力基线,ViT-AdaLA 在分类与分割任务中的表现如何?
- RQ4该方法在保持效率的同时,是否对高分辨率输入具有可扩展性?
- RQ5该方法在不同的 VFMs 与下游任务中是否具备鲁棒性?
主要发现
- ViT-AdaLA 在保持线性注意力高效性的同时,达到接近软最大骨干网络的 top-1 准确率。
- 阶段 1 的注意力对齐提供了比基于 Hedgehog 的方法更好的近似性与效率。
- 阶段 2 的特征对齐加速收敛并保留 VFM 先验,使下游任务的迁移性能更强。
- 在 ImageNet-1K 上,ViT-AdaLA(本研究方法)以 DINOv2-L 骨干达到 86.0% 的 top-1,超过若干线性基线。
- 在 ADE20K 上,ViT-AdaLA(阶段 2)达到 55.55 mIoU,与多线性化基线相当或更优,并且分辨率更高时性能提升。
- 该方法在分辨率可扩展性方面(如从 512^2 提升至 1024^2)在内存与吞吐量方面优于 softmax,同时保持性能。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。