[Paper Review] Rethinking Attention with Performers
Performer introduces FAVOR+ to approximate softmax attention with linear space/time, enabling large-scale Transformer-like models without sparsity priors, with provable accuracy and compatibility with standard Transformers.
We introduce Performers, Transformer architectures which can estimate regular (softmax) full-rank-attention Transformers with provable accuracy, but using only linear (as opposed to quadratic) space and time complexity, without relying on any priors such as sparsity or low-rankness. To approximate softmax attention-kernels, Performers use a novel Fast Attention Via positive Orthogonal Random features approach (FAVOR+), which may be of independent interest for scalable kernel methods. FAVOR+ can be also used to efficiently model kernelizable attention mechanisms beyond softmax. This representational power is crucial to accurately compare softmax with other kernels for the first time on large-scale tasks, beyond the reach of regular Transformers, and investigate optimal attention-kernels. Performers are linear architectures fully compatible with regular Transformers and with strong theoretical guarantees: unbiased or nearly-unbiased estimation of the attention matrix, uniform convergence and low estimation variance. We tested Performers on a rich set of tasks stretching from pixel-prediction through text models to protein sequence modeling. We demonstrate competitive results with other examined efficient sparse and dense attention methods, showcasing effectiveness of the novel attention-learning paradigm leveraged by Performers.
Motivation & Objective
- Motivate the need for scalable attention mechanisms without relying on sparsity or low-rank priors.
- Introduce Performers as Transformer variants that approximate softmax full-rank attention with linear complexity.
- Develop and formalize the FAVOR+ mechanism for unbiased kernel-based attention estimation.
- Provide theoretical guarantees (unbiasedness, uniform convergence, low variance) for the attention approximation.
- Demonstrate empirical effectiveness across vision, language, and biology-style sequence modeling tasks.
Proposed method
- Define attention as a kernelized form and approximate it via positive orthogonal random features (PRFs) and orthogonal random features (ORFs).
- Specify FAVOR+ which uses positive random features to approximate the softmax kernel and enables a linear-space/time attention computation.
- Prove unbiased or nearly-unbiased estimation of the attention matrix with uniform convergence and reduced variance.
- Show that regularized softmax kernels approximate softmax well, enabling practical training.
- Provide pseudocode and discuss implementation details for integration with standard Transformers.
Experimental results
Research questions
- RQ1Can softmax attention be accurately approximated with linear space/time complexity without priors like sparsity or low-rankness?
- RQ2How effective are positive orthogonal random features (FAVOR+) at approximating softmax attention across diverse tasks?
- RQ3Do theoretical guarantees (unbiasedness, uniform convergence, low variance) hold for the Performer approximation?
- RQ4How does FAVOR+ perform empirically compared to other efficient attention methods on long sequences and protein/data modeling tasks?
- RQ5Can FAVOR+ be applied beyond Transformers to other kernelizable attention mechanisms?
Key findings
- Performers achieve competitive results with efficient attention methods while maintaining linear complexity.
- FAVOR+ provides unbiased or nearly-unbiased estimation of the regular softmax attention with uniform convergence and lower estimation variance.
- Orthogonal and positive random features reduce mean-squared error and enable accurate attention approximation at practical feature counts.
- Empirical results show favorable speed/memory trade-offs and compatibility with pretrained Transformer weights via fine-tuning.
- The approach scales to long sequences (e.g., large L) and protein-style sequence modeling, matching or approaching Transformer performance under linear resources.
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.