Linear Transformers Are Secretly Fast Weight Programmers
Imanol Schlag, Kazuki Irie, Jürgen Schmidhuber
Abstract
We show the formal equivalence of linearised self-attention mechanisms and fast weight controllers from the early '90s, where a slow"neural net learns by gradient descent to program the fast weights"of another net through sequences of elementary programming instructions which are additive outer products of self-invented activation patterns (today called keys and values). Such Fast Weight Programmers (FWPs) learn to manipulate the contents of a finite memory and dynamically interact with it. We infer a memory capacity limitation of recent linearised softmax attention variants, and replace the purely additive outer products by a delta rule-like programming instruction, such that the FWP can more easily learn to correct the current mapping from keys to values. The FWP also learns to compute dynamically changing learning rates. We also propose a new kernel function to linearise attention which balances simplicity and effectiveness. We conduct experiments on synthetic retrieval problems as well as standard machine translation and language modelling tasks which demonstrate the benefits of our methods.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
177 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Hyena Hierarchy: Towards Larger Convolutional Language Models cites Compressive Transformers for Long-Range Sequence Modelling
- xLSTM: Extended Long Short-Term Memory cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- xLSTM: Extended Long Short-Term Memory cites Long Range Arena : A Benchmark for Efficient Transformers
- xLSTM: Extended Long Short-Term Memory cites Hyena Hierarchy: Towards Larger Convolutional Language Models
- xLSTM: Extended Long Short-Term Memory cites Hopfield Networks is All You Need
- Random Feature Attention cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Random Feature Attention cites Long Range Arena : A Benchmark for Efficient Transformers
- Random Feature Attention cites Compressive Transformers for Long-Range Sequence Modelling
- Choose a Transformer: Fourier or Galerkin cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Choose a Transformer: Fourier or Galerkin cites Random Feature Attention
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality cites Hyena Hierarchy: Towards Larger Convolutional Language Models
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality cites xLSTM: Extended Long Short-Term Memory
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality cites Random Feature Attention
- Transformers Learn In-Context by Gradient Descent cites Hopfield Networks is All You Need
Cited by top-tier papers177
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space DualityTri Dao, Albert GuICML 2024 · 1,407 citations
- Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento et al.ICML 2023 · 729 citations
- xLSTM: Extended Long Short-Term MemoryMaximilian Beck, Korbinian Pöppel, Markus Spanring, Andreas Auer et al.NeurIPS 2024 · 703 citations
- Choose a Transformer: Fourier or GalerkinShuhao CaoNeurIPS 2021 · 516 citations
- Hyena Hierarchy: Towards Larger Convolutional Language ModelsMichael Poli, Stefano Massaroli, Eric Nguyen, Daniel Y. Fu et al.ICML 2023 · 481 citations
Builds on9
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
- Long Range Arena : A Benchmark for Efficient TransformersYi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen et al.ICLR 2021 · 881 citations
- Compressive Transformers for Long-Range Sequence ModellingJack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier et al.ICLR 2020 · 833 citations
- Hopfield Networks is All You NeedHubert Ramsauer, Bernhard Schäfl, Johannes Lehner, Philipp Seidl et al.ICLR 2021 · 620 citations
- Random Feature AttentionHao Peng, Nikolaos Pappas, Dani Yogatama, Roy Schwartz et al.ICLR 2021 · 425 citations
Related papers
- Going Beyond Linear Transformers with Recurrent Fast Weight ProgrammersKazuki Irie, Imanol Schlag, Róbert Csordás, Jürgen SchmidhuberNeurIPS 2021 · 101 citations
- Blending Complementary Memory Systems in Hybrid Quadratic-Linear TransformersKazuki Irie, Morris Yau, Samuel J. GershmanNeurIPS 2025 · 13 citations
- A Modern Self-Referential Weight Matrix That Learns to Modify ItselfKazuki Irie, Imanol Schlag, Róbert Csordás, Jürgen SchmidhuberICML 2022 · 42 citations
- Images as Weight Matrices: Sequential Image Generation Through Synaptic Learning RulesKazuki Irie, Jürgen SchmidhuberICLR 2023 · 1 citation
- Rethinking Attention with PerformersKrzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song et al.ICLR 2021 · 122 citations
