Softmax Linear Attention: Reclaiming Global Competition
Mingwei Xu, Xuan Lin, Xinnan Guo, Wanqing Xu, Wanyun Cui
TL;DR
Softmax Linear Attention (SLA) addresses the expressivity gap between linear and full attention by introducing inter-head competition. It preserves linear time complexity $O(L)$ while reintroducing global selectivity through head-wise softmax gates, leveraging the multi-head structure as coarse semantic slots. The authors prove that SLA restores magnitude sensitivity and asymptotic winner-take-all dynamics, and demonstrate consistent improvements over state-of-the-art linear baselines (RetNet, GLA, GDN) across retrieval, language modeling, and zero-shot reasoning in long-context settings. Empirically, SLA yields sharper focus and robustness with only modest parameter and compute overhead, offering a practical path to scalable, precise long-context modeling.
Abstract
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.
