Efficient attention variants
What it is
Ways to dodge the quadratic attention matrix: sparse patterns, low-rank projections, kernels, clustering, or memory.
When to use it
Very long contexts where exact attention is affordable nowhere: Longformer, BigBird, Reformer, Performer, Linformer, FlashAttention as the implementation-level answer.
Caveats
Each variant buys speed with an approximation (sparsity, low rank, kernels or locality) that can miss long-range interactions full attention would catch. The gains mostly appear at very long sequence lengths; at ordinary lengths, well-optimized full attention is often just as fast.
Key ideas
- Sparse/local patterns assume nearby tokens matter most
- Linear attention trades expressiveness for O(n) scaling
Related architectures
Original paper
Longformer: The Long-Document Transformer (2020, arXiv)