
deltanet
Language640 ops4.2M params
Linear attention whose memory is corrected by the delta rule, from Schlag's fast weights to DeltaProduct.
Language · 1,306 operations Checked
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.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
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.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@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},
}