伪影与注意力汇:面向高效视觉Transformer的结构化近似
Artifacts and Attention Sinks: Structured Approximations for Efficient Vision Transformers
AI总结:
本文发现视觉Transformer中巨量token与伪影token通过注意力相互抑制并调节信息流,据此提出无需训练的快速Nyström注意力(FNA)及掩码策略,在检索、分类、分割和VQA上以更低计算开销取得有竞争力的性能。
摘要:
视觉Transformer已在广泛的应用中成为一种强大工具,但其内部工作机制仍只被部分理解。本文研究了巨量token现象——即具有极高激活范数并充当注意力汇的token——以及在推理过程中作为副产品出现的伪影token。我们的分析表明,这些token通过注意力机制相互抑制,在调节网络内部信息流方面发挥着关键作用。利用这些发现,我们提出了快速Nyström注意力(Fast Nyström Attention, FNA),这是一种无需训练的方法,通过利用巨量token和伪影token形成的结构化模式,在线性时间和空间内近似自注意力。此外,我们提出了一种掩码策略以减轻这些token带来的噪声,在几乎不增加成本的情况下获得适度的性能提升。我们在流行的预训练视觉骨干网络上评估了该方法,并在检索、分类、分割和视觉问答(VQA)任务上展示了具有竞争力的性能,同时降低了计算开销。
英文摘要:
Vision transformers have emerged as a powerful tool across a wide range of applications, yet their inner workings remain only partially understood. In this work, we examine the phenomenon of massive tokens - tokens with exceptionally high activation norms that act as attention sinks - and artifact tokens that emerge as a byproduct during inference. Our analysis reveals that these tokens mutually suppress one another through the attention mechanism, playing a critical role in regulating information flow within the network. Leveraging these insights, we introduce Fast Nyström Attention (FNA), a training-free method that approximates self-attention in linear time and space by exploiting the structured patterns formed by massive and artifact tokens. Additionally, we propose a masking strategy to mitigate noise from these tokens, yielding modest performance gains at virtually no cost. We evaluate our approach on popular pretrained vision backbones and demonstrate competitive performance on retrieval, classification, segmentation, and visual question answering (VQA), all while reducing computational overhead.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。