arXiv:2411.07635cs.CV2024-11CVPR被引 48

解决线性注意力性能差的秩瓶颈问题,实现高效高精度视觉建模。

Breaking the Low-Rank Dilemma of Linear Attention

  • 通过分析键值缓存与输出特征的秩,发现线性注意力性能受限于低秩特性
  • 提出RALA方法,在保持线性复杂度下达到Softmax注意力同等精度
  • 基于RALA构建RAVLT模型,仅用2600万参数即达ImageNet-1k 84.4%准确率

Transformer中的Softmax注意力机制因二次计算复杂度而计算成本高昂,尤其在视觉任务中挑战显著。相比之下,线性注意力将复杂度降至线性级别,效率更高,但通常性能明显下降。实验表明,这种性能损失源于线性注意力特征图的低秩特性,限制了其对复杂空间信息的建模能力。本文从键值缓存和输出特征两个角度进行秩分析,提出秩增强型线性注意力(RALA),在保持线性复杂度的同时性能媲美Softmax注意力。基于RALA构建了秩增强型视觉线性Transformer(RAVLT)。大量实验证明,RAVLT在多种视觉任务中表现优异:无需额外标签、数据或监督训练,仅使用2600万参数和4.6G FLOPs,ImageNet-1k上达到84.4%的Top-1准确率,显著超越以往线性注意力方法,充分展现RALA的潜力。代码将开源于https://github.com/qhfan/RALA。

原文摘要 · Abstract (English)

The Softmax attention mechanism in Transformer models is notoriously computationally expensive, particularly due to its quadratic complexity, posing significant challenges in vision applications. In contrast, linear attention provides a far more efficient solution by reducing the complexity to linear levels. However, compared to Softmax attention, linear attention often experiences significant performance degradation. Our experiments indicate that this performance drop is due to the low-rank nature of linear attention's feature map, which hinders its ability to adequately model complex spatial information. In this paper, to break the low-rank dilemma of linear attention, we conduct rank analysis from two perspectives: the KV buffer and the output features. Consequently, we introduce Rank-Augmented Linear Attention (RALA), which rivals the performance of Softmax attention while maintaining linear complexity and high efficiency. Based on RALA, we construct the Rank-Augmented Vision Linear Transformer (RAVLT). Extensive experiments demonstrate that RAVLT achieves excellent performance across various vision tasks. Specifically, without using any additional labels, data, or supervision during training, RAVLT achieves an 84.4% Top-1 accuracy on ImageNet-1k with only 26M parameters and 4.6G FLOPs. This result significantly surpasses previous linear attention mechanisms, fully illustrating the potential of RALA. Code will be available at https://github.com/qhfan/RALA.

线性注意力视觉建模高效Transformer秩提升

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。