解决视觉Transformer中注意力过度集中[CLS] token的问题
EDIT: Enhancing Vision Transformers by Mitigating Attention Sink through an Encoder-Decoder Architecture
- 用编码器-解码器结构分离图像块与[CLS] token处理
- 在ImageNet上比DeiT3提升1.2%准确率,迁移任务也更优
- 适合关注模型可解释性和注意力机制改进的研究者
本文提出EDIT(Encoder-Decoder Image Transformer),一种新架构以缓解视觉Transformer中的注意力坍缩现象。该现象表现为过多注意力集中在[CLS]标记上,影响图像块的有效处理。EDIT采用层对齐的编码器-解码器结构:编码器使用自注意力处理图像块,解码器则通过交叉注意力聚焦于[CLS]标记。与传统框架不同,编辑允许解码器从低层特征开始提取信息,逐层精炼表示。实验在ImageNet-1k和ImageNet-21k上验证,相比DeiT3模型实现一致性能提升,证明其在缓解注意力坍缩与增强视觉特征提取方面的有效性。
原文摘要 · Abstract (English)
In this paper, we propose EDIT (Encoder-Decoder Image Transformer), a novel architecture designed to mitigate the attention sink phenomenon observed in Vision Transformer models. Attention sink occurs when an excessive amount of attention is allocated to the [CLS] token, distorting the model's ability to effectively process image patches. To address this, we introduce a layer-aligned encoder-decoder architecture, where the encoder utilizes self-attention to process image patches, while the decoder uses cross-attention to focus on the [CLS] token. Unlike traditional encoder-decoder framework, where the decoder depends solely on high-level encoder representations, EDIT allows the decoder to extract information starting from low-level features, progressively refining the representation layer by layer. EDIT is naturally interpretable demonstrated through sequential attention maps, illustrating the refined, layer-by-layer focus on key image features. Experiments on ImageNet-1k and ImageNet-21k, along with transfer learning tasks, show that EDIT achieves consistent performance improvements over DeiT3 models. These results highlight the effectiveness of EDIT's design in addressing attention sink and improving visual feature extraction.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。