Softmax线性注意力:重塑全局竞争机制
Softmax Linear Attention: Reclaiming Global Competition
AI总结:
针对线性注意力因移除softmax丢失全局竞争机制导致表达能力不足的问题,提出SLA框架,通过头层级softmax恢复竞争选择,在保持线性复杂度的同时提升长上下文任务性能与抗噪鲁棒性。
摘要:
尽管线性注意力将标准Transformer的二次复杂度降至线性时间,但由于移除了softmax归一化,其表达能力往往存在不足。这种缺失消除了全局竞争这一关键机制,而该机制能让模型在长上下文噪声中精准聚焦相关信息。本研究提出Softmax Linear Attention(SLA,Softmax线性注意力)框架,旨在不损失效率的前提下恢复这种竞争选择能力。SLA将softmax运算从token层级提升至注意力头层级,将注意力头作为粗粒度语义槽,应用竞争门控机制动态选择最相关的子空间,重新引入了精准检索和鲁棒长上下文理解所必需的“赢者通吃”动态特性。与此前聚焦于优化局部核函数的方法不同,SLA从更宏观的视角出发,利用更高层级的多头聚合结构。大量实验表明,在语言建模和长上下文基准测试中,SLA持续提升RetNet、GLA、GDN等当前最优线性基线模型的性能,尤其在高难度检索场景中显著增强了抗噪声鲁棒性,验证了其在保持线性复杂度的同时恢复精准聚焦能力的效果。
英文摘要:
While linear attention reduces the quadratic complexity of standard Transformers to linear time, it often lags behind in expressivity due to the removal of softmax normalization. This omission eliminates \emph{global competition}, a critical mechanism that enables models to sharply focus on relevant information amidst long-context noise. In this work, we propose \textbf{Softmax Linear Attention (SLA)}, a framework designed to restore this competitive selection without sacrificing efficiency. By lifting the softmax operation from the token level to the head level, SLA leverages attention heads as coarse semantic slots, applying a competitive gating mechanism to dynamically select the most relevant subspaces. This reintroduces the ``winner-take-all'' dynamics essential for precise retrieval and robust long-context understanding. Distinct from prior methods that focus on refining local kernel functions, SLA adopts a broader perspective by exploiting the higher-level multi-head aggregation structure. Extensive experiments demonstrate that SLA consistently enhances state-of-the-art linear baselines (RetNet, GLA, GDN) across language modeling and long-context benchmarks, particularly in challenging retrieval scenarios where it significantly boosts robustness against noise, validating its capability to restore precise focus while maintaining linear complexity.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。