[Paper Review] ZeroS: Zero-Sum Linear Attention for Efficient Transformers
ZeroS introduces zero-sum linear attention that removes the zero-order term from softmax, enabling negative weights and contrastive token interactions while maintaining O(N) complexity; it matches or surpasses softmax attention across benchmarks.
Linear attention methods offer Transformers $O(N)$ complexity but typically underperform standard softmax attention. We identify two fundamental limitations affecting these approaches: the restriction to convex combinations that only permits additive information blending, and uniform accumulated weight bias that dilutes attention in long contexts. We propose Zero-Sum Linear Attention (ZeroS), which addresses these limitations by removing the constant zero-order term $1/t$ and reweighting the remaining zero-sum softmax residuals. This modification creates mathematically stable weights, enabling both positive and negative values and allowing a single attention layer to perform contrastive operations. While maintaining $O(N)$ complexity, ZeroS theoretically expands the set of representable functions compared to convex combinations. Empirically, it matches or exceeds standard softmax attention across various sequence modeling benchmarks.
Motivation & Objective
- Identify fundamental limitations of linear attention approaches related to convexity and uniform weight bias.
- Develop a linear-time attention mechanism that supports negative weights and contrastive updates.
- Demonstrate that ZeroS can match or exceed softmax attention across diverse sequence modeling tasks.
- Provide theoretical guarantees on stability and expressivity of the zero-sum attention formulation.
Proposed method
- Propose ZeroS by removing the zero-order term (1/t) from softmax and reweighting the residuals to obtain zero-sum weights.
- Introduce radial–angular decoupling by separating magnitude and direction and applying learned gates to first-order and higher-order softmax residuals, then reintroducing signed cos(theta) terms.
- Formulate reweighted zero-sum softmax with two gates controlling first-order and higher-order components, enabling linear-time computation via prefix sums.
- Integrate Rotary Position Embedding (RoPE) to incorporate angular information and preserve zero-sum properties in the attention weights.
- Maintain O(N d^2) time and O(d^2) memory through separable logits and prefix-sum based computations, enabling efficient training and inference.
Experimental results
Research questions
- RQ1Can removing the zero-order term from softmax yield numerically stable, expressive zero-sum weights that allow negative values?
- RQ2Does ZeroS achieve linear-time attention while matching or exceeding the performance of standard softmax attention on diverse tasks?
- RQ3How does radial–angular decoupling and gating affect the expressivity and stability of linear attention?
- RQ4Can ZeroS be effectively integrated with RoPE to preserve angular interactions in attention?
- RQ5What empirical gains does ZeroS provide on benchmarks like MAD, WikiText, image classification, and time-series forecasting?
Key findings
- ZeroS matches or exceeds standard softmax attention on multiple benchmarks while preserving linear time complexity.
- Removing the zero-order term enables negative weights and contrastive token interactions without sacrificing stability.
- Radial–angular decoupling with gating enhances expressive capacity beyond convex combinations, enabling higher-order token interactions.
- ZeroS demonstrates competitive or superior performance on MAD, WikiText-103, ImageNet-1k style tasks, and time-series datasets compared to other linear approaches.
- Ablation studies show reintroducing the zero-order term can hurt some in-context tasks, and gating/normalization contribute to stability and performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.