Open Interpretability Models Contributors Research Posts About

Linear Transformers Are Secretly Fast Weight Programmers

Source

Citation. Imanol Schlag, Kazuki Irie and Jürgen Schmidhuber, all at the Swiss AI Lab IDSIA, USI and SUPSI. Schlag and Irie are equal contributors. "Linear Transformers Are Secretly Fast Weight Programmers". Proceedings of the 38th International Conference on Machine Learning (ICML 2021), PMLR 139. arXiv 2102.11174: v1 22 February 2021, v3 9 June 2021. Paper. The paper gives its code at github.com/ischlag/fast-weight-transformers. We did not open that repository. An ERC Advanced grant (742870, AlgoRNN) and a Swiss National Science Foundation grant (200021 192356, NEUSYM) funded part of the work. NVIDIA and IBM donated machines. The paper gives no statement about tools or help from an LLM. The venue on the PDF and the arXiv dates agree.

Status. Planned. #4782 would use it in its strand on weight-space programming and fast weights, and #5144 asks the question that it bears on most. No code, skill or protocol in this repo depends on it. The maintainer designs any campaign to fix a model, so this page reports evidence and records questions only.

Read. We read the arXiv v3 PDF on 2026-11-19. We extracted its text with pdftotext and read all of it: Sections 1 to 7, Tables 1 to 6, Listing 1 and Appendices A to F. The model that wrote this page read the text itself, with no subagent. We did not see the figures as images. So the results of Figures 2 to 5 are here only as the body text and the captions give them. Some equations came out of the extraction with their layout broken. We read them against the text around them. We did not read v1 or v2.

Summary

Claim. Self-attention without a softmax, or with a kernel in place of the softmax, is a fast weight programmer of the early 1990s. It writes a weight matrix as a sum of outer products of values and keys, and it reads that matrix with the query. A finite matrix can hold only as many associations as its key dimension without crosstalk. So the authors replace the purely additive write with a write like the delta rule, which can change a stored association. They also propose a new kernel feature map, DPFP.

Method.

Findings, as the source reports them.

Setting Result
Setting 1, d_key = 64, sum update (Figure 2, from the text) Linear attention "begins to accumulate errors with 60 or more associations". DPFP-1, 2 and 3 fail as they come near 128, 256 and 384. FAVOR+ fails to reach a loss of 0 in any run. Softmax does best, but "struggles to fully converge with more than 500 keys"
Setting 2, length 40, 20 keys (Figure 3, from the text) The delta update "outperforms all other variants". The sum update fails. Appendix D.2 says the same for 20 to 200 keys
WMT14 BLEU, valid and test, d_dot = 64 (Table 1) Standard 26.6 and 27.7. Linear 25.5 and 26.8. Performer 24.2 and 24.4
WMT14 BLEU, d_dot = 256 Performer 24.9 and 25.3. DPFP 26.2 and 26.9
WMT14 BLEU, d_dot = 512 Performer 26.7 and 27.7. DPFP 26.2 and 27.1
WikiText-103 small, valid and test perplexity (Table 2) Transformer 33.0 and 34.1. Linear, sum 37.1 and 38.3. Linear, delta 34.1 and 35.5. Performer, sum 39.0 and 39.6. Performer, delta 36.1 and 37.2
WikiText-103 medium (Table 2) Transformer 27.9 and 29.6. Linear, sum 31.1 and 33.0. Linear, delta 29.7 and 31.5. Performer, sum 32.2 and 33.8. Performer, delta 30.0 and 31.8
Delta network, medium, ablation of position encoding and attention normalisation (Table 3) Both on: 30.4 and 32.1. Neither: 28.1 and 31.1
Context not cut, medium, state 0.13 M (Table 4) Linear above 260 and above 260. Delta network 27.8 and 29.4. Transformer-XL 65.7 and 65.5
Transformer-XL, larger states (Table 4) 1.05 M: 29.3 and 30.1. 2.10 M: 26.4 and 27.4. 6.29 M: 24.6 and 25.5
Linear, context not cut, no attention normalisation Perplexity above 1,600
Small model, d_dot = 256, not in overcapacity (Table 5) Performer, sum 38.0 and 38.8, delta 36.0 and 37.0. DPFP, sum 37.7 and 38.8, delta 33.9 and 35.0
Speed and memory, small model Linear with the delta update 63 K words/s and 14 GB. Without it, 66 K and 13 GB. The PyTorch Transformer 33 K and 17 GB

Where the claims go beyond the evidence

The authors state several limits themselves. They say that the delta network does not match Transformer-XL with a large state, and that softmax beats every kernel in Setting 1. They report the negative results for a larger d_dot and the failure of FAVOR+ with their update.

Use in this repo