arXiv:2501.15061cs.CVcs.AI2025-01ICLR被引 95

提出极性感知线性注意力,提升视觉Transformer的表达能力与效率

PolaFormer: Polarity-aware Linear Attention for Vision Transformers

论文配图:PolaFormer: Polarity-aware Linear Attention for Vision Transformers
图 1 · 摘自论文原文
  • 通过显式建模查询与键的同号和异号交互,增强关系信息捕捉
  • 在多个视觉任务上实现最高4.6%性能提升,同时保持线性计算复杂度
  • 适合追求高效高精度视觉模型的研究者与工程师

线性注意力作为软注意力的替代方案,利用核化特征映射将复杂度从二次降低到线性。然而,特征映射的非负约束及近似中的松弛指数函数导致相比原始点积显著的信息损失,使注意力图区分度下降、熵值升高。为弥补查询-键对中负值带来的缺失交互,我们提出极性感知线性注意力机制,显式建模同号与异号交互,确保关系信息完整覆盖。此外,理论分析证明存在一类具有正一阶和二阶导数的逐元素函数可降低注意力分布熵值。为简化实现并区分各维度贡献,采用可学习幂函数进行重缩放,有效分离强弱注意力信号。大量实验表明,所提PolaFormer在多种视觉任务中性能提升达4.6%,兼具更强表达力与更高效率。

原文摘要 · Abstract (English)

Linear attention has emerged as a promising alternative to softmax-based attention, leveraging kernelized feature maps to reduce complexity from quadratic to linear in sequence length. However, the non-negative constraint on feature maps and the relaxed exponential function used in approximation lead to significant information loss compared to the original query-key dot products, resulting in less discriminative attention maps with higher entropy. To address the missing interactions driven by negative values in query-key pairs, we propose a polarity-aware linear attention mechanism that explicitly models both same-signed and opposite-signed query-key interactions, ensuring comprehensive coverage of relational information. Furthermore, to restore the spiky properties of attention maps, we provide a theoretical analysis proving the existence of a class of element-wise functions (with positive first and second derivatives) that can reduce entropy in the attention distribution. For simplicity, and recognizing the distinct contributions of each dimension, we employ a learnable power function for rescaling, allowing strong and weak attention signals to be effectively separated. Extensive experiments demonstrate that the proposed PolaFormer improves performance on various vision tasks, enhancing both expressiveness and efficiency by up to 4.6%.

视觉Transformer线性注意力极性感知高效模型

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