Abstract
Standard Transformers are the powerhouse of modern AI, but their self-attention mechanism scales quadratically with sequence length, making long-context processing prohibitively expensive. This paper reveals that modern "Linear Transformers"—which approximate attention to achieve linear complexity—are mathematically equivalent to "Fast Weight Programmers" (FWPs) developed in the early 1990s. By leveraging this connection, the authors introduce a "delta rule" update mechanism and a new deterministic kernel (DPFP) that significantly improve the memory capacity and performance of linear-complexity attention models.
The Memory Bottleneck in Linear Transformers
While Linear Transformers successfully reduce computational complexity from $O(L^2)$ to $O(L)$, they often suffer from limited memory capacity. They struggle to "remember" many associations over time and lack an effective way to update or overwrite old information stored in their internal state. The authors aim to bridge the gap between these highly efficient models and the superior performance of standard quadratic Transformers.
Methods: Rethinking Attention as Fast Weights
The paper introduces three primary contributions to solve the capacity issue:
1. Formal Equivalence The authors prove that the memory state of a Linear Transformer is essentially a "Fast Weight" matrix. In this view, the model "programs" its own weights on the fly to store key-value associations, rather than just maintaining a hidden state. A matrix of size $d \times d$ can only store roughly $d$ orthogonal associations before "crosstalk" (interference) ruins retrieval.
2. The Delta Rule Update Standard Linear Transformers use a simple, purely additive summation to update their memory. Inspired by classic neural network theory, the authors propose a delta rule update. Instead of just adding new information, the model first "retrieves" what it thinks is currently associated with a key and then applies an error-correction step to update the memory. This introduces a form of competitive learning, allowing the model to learn a dynamic learning rate to decide how much of the old memory to keep versus how much to replace.
3. DPFP (Deterministic Parameter-Free Projection) To increase memory capacity, the authors propose a new kernel function ($\phi$). Unlike previous methods that use random sampling (like FAVOR+), DPFP is a deterministic projection that encourages sparsity and orthogonality in the key space. By splitting the input space into non-overlapping regions, different keys are more likely to be orthogonal in the high-dimensional projection, directly increasing the "storage space" of the fast weight matrix.
Key Results
The authors evaluated their methods across synthetic retrieval problems, WMT14 English-to-German translation, and WikiText-103 language modeling.
Capacity Breakthrough
In synthetic tests designed to test absolute memory capacity, standard Linear Transformers failed once the number of associations exceeded their feature dimension. Models using the authors' DPFP kernel maintained perfect accuracy (near-zero loss) for much longer sequence lengths.
Superior Language Modeling
On the WikiText-103 dataset, the "Delta Network" (Linear Transformer + Delta Rule) significantly outperformed the baseline Linear Transformer. The delta rule consistently provided lower perplexity scores compared to the standard sum rule across different architectures, reducing perplexity dramatically in long-sequence settings.
Efficiency vs. Performance
The Delta Net achieved performance comparable to the heavy-duty Transformer-XL while using a state size that was 48x smaller (0.13M vs 6.29M units). This highlights its extreme memory efficiency for long-context processing.
Limitations and Future Work
While the Delta Rule and DPFP significantly close the performance gap, the absolute performance of these linear models still slightly trails behind the best quadratic Transformers (like Transformer-XL) when those models are given massive memory buffers.
The authors suggest that future work should explore even more sophisticated "programming instructions" for the fast weights. They also note that while the delta rule is computationally efficient, it introduces a small sequential dependency in the update step, which slightly changes how the model is parallelized during training compared to the simplest linear attention variants.
Summary updated