Reference
← All guidesGated DeltaNet
Gated DeltaNet is a linear recurrent attention mechanism. It stores sequence information in a fixed-size state matrix and updates it with the delta rule and learned gates.
Overview
How it works
At each decoding step, the token reads and updates the current state. The layer does not keep a separate KV-cache entry for every earlier token. Its recurrent memory size is independent of sequence length.
Details
The state matrix
The state associates key vectors with value vectors. Reading with a key returns an estimate of its stored value. New tokens update the same matrix, so their information can overlap rather than occupy separate records.
Details
The delta rule
Read the value predicted by the current state for a key. Subtract that prediction from the incoming value, then write a scaled correction. This reduces redundant writes but does not eliminate interference between similar keys.
Details
Decay and write gates
The decay gate scales the old state before the update. The write gate controls the strength of the correction. Both depend on the current token and are learned during training.
Details
Memory and recall
For a fixed head size, recurrent decoding uses constant state memory and constant work per token. The state has limited capacity and may lose details. Hybrid models combine recurrent layers with full-attention layers, so the whole model can still have a growing cache.
Sources