All models

deltanet

Linear attention whose memory is corrected by the delta rule, from Schlag's fast weights to DeltaProduct.

Language · 640 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (629 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
DeltaNet
Parameters
4.2M
Operations
640
Framework
PyTorch
Recurrent
No
Published
ICML 2021
Cited by
60 (as of 16 October 2026)
Authors
Imanol Schlag, Kazuki Irie, Jürgen Schmidhuber
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m4185
Graph hash
263eb76cb03c8c519853f80df3b0fb597e0a3a15e15631d08e9483a5c8638314
Skeleton hash
e8be30d987c69d7430ab6c1c7c01ca95a43a36de996cbf73f00c3eeeb21ece11
Architecture hash
8657fd43480dd18c07b5fe979d3e341f83ada97f967e270c0c28515a32b5e320
Diagram SHA-256
6770c455f3bbec6090749a71fb7998e8fb6a723814ddd70a5bd623cebf85944a
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

About this model's family

DeltaNet is a linear transformer whose fast-weight memory is updated by the delta rule instead of a plain additive outer product, so it can correct a stored key-to-value mapping rather than only pile new associations on top. The idea comes from Schlag, Irie and Schmidhuber, who showed that linearised self-attention is formally equivalent to the fast weight controllers of the early 1990s. The programmer also learns to compute dynamically changing learning rates.

At each token the state matrix is nudged by the difference between its current prediction for the key and the target value, scaled by a per-token learning rate. That is where the name comes from: the update is driven by the delta between prediction and target, which gives better memory capacity. The catch was training, so Yang and colleagues reparameterised DeltaNet as a matrix-valued RNN whose recurrence is a generalized Householder transformation and used the compact WY representation for products of Householder matrices. That let them train a 1.3B-parameter DeltaNet on 100B tokens, where it beat Mamba and GLA on perplexity and zero-shot tasks.

DeltaProduct generalises this by taking several gradient steps per token, so the state-transition matrix becomes a product of generalized Householder transformations. Its experiments report better state tracking and language modelling than DeltaNet, with much better length extrapolation. The traced members span the flash-linear-attention library's DeltaNet layer and language model, its Gated DeltaProduct model, and two compact local reimplementations of delta-rule linear attention. The library's own changelog dates its DeltaNet implementation to May 2024.

Key idea. Linear attention with a delta-rule memory update, made trainable at scale by a chunkwise-parallel Householder (WY) reparameterisation.

  • deltanet
  • delta net
  • delta rule
  • delta-rule linear attention
  • fast weight programmer
  • linear transformer
  • linear rnn
  • deltaproduct
  • gated deltaproduct
  • householder products
  • flash-linear-attention
  • fla
  • language model
  • schlag
  • yang

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{schlag2021lineartransformerssecretlyfast,
      title={Linear Transformers Are Secretly Fast Weight Programmers}, 
      author={Imanol Schlag and Kazuki Irie and Jürgen Schmidhuber},
      year={2021},
      eprint={2102.11174},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2102.11174}, 
}