Linear Attention
A simplified variant of standard Transformer attention that replaces the softmax exponential kernel with a linear kernel. Its forward computation can be expressed in closed form as matrix multiplications, enabling rigorous asymptotic analysis with classical statistical learning tools. It is commonly used to study in-context learning mechanisms.
Core Facts
The computational complexity of the self-attention mechanism grows approximately quadratically with sequence length, with the attention matrix computation being proportional to n² for a sequence of length n.
The computational complexity of the standard Self-Attention mechanism has a quadratic relationship with sequence length (O(n²)).
The recursive state-compression structure of linear attention brings constant memory usage and linear time, but all historical information must be squeezed into a fixed-size memory, and interference easily occurs when new information conflicts with old information.
Timeline (last 90 days)
Linear attention models perform noticeably worse than Softmax attention on associative recall tasks in language modeling.
Linear attention models contain substantial underutilized retrieval capacity internally, and targeted training adjustments can elicit considerable recall ability without modifying the model structure.
The cost of the two training interventions is a slight decline in general language modeling performance.
Without changing the architecture, token budget, or optimization steps, the two training interventions narrow the long-distance associative recall gap to the level of the Softmax baseline.
Standard language model training cannot reliably teach linear models to copy information from context, whereas Softmax models under equivalent conditions acquire this ability naturally.
Even with only a single layer, linear attention can learn to retrieve thousands of associations across long distances at sufficient scale.
In synthetic settings, the various linear attention architectures tested exhibit similar empirical scaling laws regarding the effect of state size on the number of memorizable items that can be recalled.
The associative recall capability of linear attention is inherently constrained by state capacity, because the past must be compressed into a finite state, whereas Softmax attention retains the full KV cache and can precisely look back at any historical position.
Self-attention has quadratic complexity, so researchers have proposed a variety of alternatives, including state space models (such as Mamba and S4), long convolutions (such as Hyena), linear attention, and gated recurrent units, among others.
The KV cache size of global attention layers is proportional to context length, whereas the cache size of bounded-state layers (such as SSMs or linear attention) is relatively fixed.
31 more timeline events
All Facts (20)
The computational complexity of the self-attention mechanism grows approximately quadratically with sequence length, with the attention matrix computation being proportional to n² for a sequence of length n.
90%VerifiedThe computational complexity of the standard Self-Attention mechanism has a quadratic relationship with sequence length (O(n²)).
90%VerifiedThe recursive state-compression structure of linear attention brings constant memory usage and linear time, but all historical information must be squeezed into a fixed-size memory, and interference easily occurs when new information conflicts with old information.
75%VerifiedIn linear attention, kernel functions are used to decompose softmax attention into an associable form, reducing inference computational complexity from quadratic in sequence length to linear.
75%VerifiedLinear Attention rewrites the attention computation using associative kernel functions or state recurrence, compressing historical information into a fixed-size state matrix, so that each step only needs to update this state, reducing computational complexity from O(n²) to O(n), with constant-level memory usage.
75%VerifiedSolutions for streaming processing include causal attention masking, chunked attention, and look-ahead buffering
75%VerifiedSelf-attention weights are normalized through the Softmax function, and the sum of the weights is always 1.
75%VerifiedState space models (SSMs) such as Mamba abandon the attention mechanism and use recurrent structures to achieve linear time complexity sequence modeling.
65%UnverifiedGated Linear Attention (GLA) reduces computational complexity from O(N²) to O(N) through a linearized attention mechanism.
60%UnverifiedQwen3 27B combines three linear attention layers with one full attention layer in a recurrent structure at a ratio of 3:1.
60%UnverifiedWithout changing the architecture, token budget, or optimization steps, the two training interventions narrow the long-distance associative recall gap to the level of the Softmax baseline.
50%UnverifiedStandard language model training cannot reliably teach linear models to copy information from context, whereas Softmax models under equivalent conditions acquire this ability naturally.
50%UnverifiedThe cost of the two training interventions is a slight decline in general language modeling performance.
50%UnverifiedLinear attention models perform noticeably worse than Softmax attention on associative recall tasks in language modeling.
50%UnverifiedLinear attention models contain substantial underutilized retrieval capacity internally, and targeted training adjustments can elicit considerable recall ability without modifying the model structure.
50%UnverifiedThe associative recall capability of linear attention is inherently constrained by state capacity, because the past must be compressed into a finite state, whereas Softmax attention retains the full KV cache and can precisely look back at any historical position.
50%UnverifiedIn synthetic settings, the various linear attention architectures tested exhibit similar empirical scaling laws regarding the effect of state size on the number of memorizable items that can be recalled.
50%UnverifiedEven with only a single layer, linear attention can learn to retrieve thousands of associations across long distances at sufficient scale.
50%UnverifiedSelf-attention has quadratic complexity, so researchers have proposed a variety of alternatives, including state space models (such as Mamba and S4), long convolutions (such as Hyena), linear attention, and gated recurrent units, among others.
50%UnverifiedThe KV cache size of global attention layers is proportional to context length, whereas the cache size of bounded-state layers (such as SSMs or linear attention) is relatively fixed.
50%