Delta Rule (DeltaNet)

Definition

The delta rule is a fast-weight update for linear attention that, before writing a new key–value association into the recurrent state, first removes the value currently associated with that key — an error-correcting write rather than a blind accumulation. Where additive linear attention does (every key ever seen keeps piling onto the state), DeltaNet treats as an associative memory and moves it toward the target association by a step , correcting the memory’s current prediction error at . This is the classic Widrow–Hoff delta rule reused as an online write rule for a matrix-valued state.

Key math / How it works

Let the state be . The current read-out (prediction) at key is . The delta rule nudges the state to reduce the error :

Expanding the correction term gives the equivalent linear-recurrence form,

so each step applies a rank-1 removal that erases the component of the old state aligned with , then writes the fresh association . With a data-dependent write strength: leaves the memory untouched, overwrites the slot at completely. Read-out is the usual linear-attention query .

Lineage. The delta rule as a fast-weight programmer is due to Schlag, Irie & Schmidhuber, “Linear Transformers Are Secretly Fast Weight Programmers” — which reframes linear attention as a network that writes to and reads from a fast-weight matrix, and swaps the additive write for the delta write. Yang et al., “Parallelizing Linear Transformers with the Delta Rule over Sequence Length,” made it trainable at scale: the sequential rank-1 updates are recast into a chunkwise-parallel form (a WY-style representation of the product of transforms) so training runs as matmuls over chunks while inference stays a constant-size recurrence.

Why it matters

Additive linear attention has no mechanism to forget: distinct keys that are not orthogonal collide in the fixed-size state, and the collisions accumulate without bound as the sequence grows — the mechanistic root of linear attention’s recall gap. The delta rule fixes exactly this by overwriting a key’s slot instead of superposing onto it, giving a genuinely error-correcting associative memory at the same compute and constant state. This is the primitive underneath the 2024–26 delta-rule wave — Gated DeltaNet and Kimi Delta Attention — which add data-dependent decay on top of the delta write.

Taught in

See also