Kalman Delta Networks: Uncertainty-aware Associative Memory
Summary (Overview)
- The paper introduces Kalman Delta Networks (KDNs), a new family of linear-attention models that reformulate recurrent associative memory as a linear–Gaussian state-space model, for which the Kalman filter is the optimal recursive estimator.
- KDNs explicitly track uncertainty (covariance) alongside the memory state, enabling each write to be weighted by accumulated evidence and observation reliability—a capability missing from existing delta-rule models (DeltaNet, Gated DeltaNet, KDA).
- Two scan-compatible approximations are derived: Diagonal KDN (one uncertainty value per key channel, auxiliary state per head) via online mean-field variational inference, and Isotropic KDN (single uncertainty scalar per head).
- An information-scaling factor () is introduced to mitigate excessive overwrite caused by the diagonal approximation's underprotection of stored key directions.
- Controlled pretraining experiments at 750M and 1.3B parameters show consistent improvements in perplexity and mean downstream accuracy over state-of-the-art linear-attention baselines, including Mamba-3 and DeltaNet variants.
Introduction and Theoretical Foundation
Background: Linear Attention and Fixed-Size Memory
Self-attention allows every query to retrieve values associated with all preceding keys but requires a cache that grows linearly with sequence length and quadratic query–key interactions. Linear attention addresses this by compressing token history into a fixed-size recurrent state :
Each token writes a key–value association to the state, and each query reads from it. However, additive updates can only write—old associations cannot be explicitly removed and may interfere with new ones.
Delta-Rule Models and Their Limitations
Delta-rule models address this by writing only the residual—the part of the value not explained by the current memory:
where is a scalar write strength. Key limitations of existing delta-rule models:
- DeltaNet: Uses scalar gate predicted from the current token; no decay of stale associations.
- Gated DeltaNet: Adds scalar decay applied uniformly to all key channels.
- KDA (Key-Value Delta Attention): Uses diagonal transition for channel-wise decay but still controls write strength with a scalar gate predicted from the current token.
Critical limitation: The write strength in all delta-rule models is predicted from the current token embedding rather than derived from explicit confidence in stored associations. These models cannot distinguish a well-supported association from an uncertain one.
Theoretical Reformulation: Linear-Gaussian State-Space Model
The paper casts recurrent associative memory as a linear–Gaussian state-space model where the latent memory evolves as:
with observation model:
where:
- is the transition (persistence/decay of associations)
- is the process noise covariance (how much the memory drifts)
- is the observation noise (reliability of the current token's value)
- is the key, is the value
Under linear–Gaussian assumptions, the Kalman filter is the optimal recursive estimator. The posterior mean update takes the form:
where is the Kalman gain:
This is a residual write—the filter adds only the part of the observed value that the predicted memory failed to explain—but with the crucial difference that the write strength is derived from the predictive covariance , which tracks accumulated evidence.
Connection to Existing Models
Delta-rule models are identified as fixed-gain special cases of the Kalman filter. For normalized keys, the exact Kalman gain collapses to the scalar write strength used by delta-rule models. The models differ only in how the memory is predicted before the write:
| Model | Transition | Gain Source |
|---|---|---|
| DeltaNet | (identity) | Token-predicted scalar |
| Gated DeltaNet | (scalar decay) | Token-predicted scalar |
| KDA | Token-predicted scalar | |
| KDN | Learned diagonal | Covariance-derived (Kalman gain) |
Methodology
Exact Kalman Filter for Associative Memory
The exact Kalman update tracks both the mean and covariance of the latent memory. The filter proceeds in two steps:
Prediction step (before observing token ):
Update step (conditioning on observation ): Using Gaussian conditioning on each value coordinate jointly with the scalar observation :
Problem: The exact recursion is not scan-compatible because:
- follows a Riccati recursion (non-linear)
- The gain depends on accumulated posterior uncertainty
- Tracking requires a dense state per head
Diagonal KDN: Online Mean-Field Variational Inference
The first approximation restricts the tracked covariance to the diagonal family. After each token, the posterior is projected onto the diagonal Gaussian family via online mean-field variational inference:
This yields a per-channel uncertainty vector with auxiliary state per head.
Information scaling: To mitigate excessive overwrite under the diagonal approximation (which can underprotect stored key directions), an information scale is applied only to the post-write precision increment:
where denotes element-wise operations. In experiments, is used as the fixed information scale.
Isotropic KDN: Single Scalar Uncertainty
The second approximation restricts the covariance to the isotropic family:
Unlike the diagonal family, the isotropic family is not closed under a channel-wise transition, so Isotropic KDN projects both the predicted covariance and the measurement posterior back to this family. This retains the scalar-gated form used by DeltaNet/Gated DeltaNet/KDA:
but now depends on the transition, process uncertainty, and evidence accumulated from previous tokens through . This requires only auxiliary state per head.
Training and Evaluation Setup
- Scales: 750M and 1.3B parameters
- Data: Controlled pretraining with matching data, backbone, optimization recipe, and evaluation protocol
- Capacity matching: Recurrent-only models use the same backbone with feed-forward widths adjusted to match non-embedding parameter counts within 0.03%; Mamba-3 baselines match KDN total recurrent-state size
- Sequence length: 4K tokens, global batch of 0.5M tokens
- Evaluation: Perplexity, downstream tasks, and RULER in-context retrieval benchmarks
Empirical Validation / Results
Language Modeling Perplexity
KDN variants consistently improve perplexity over state-of-the-art linear-attention models at both 750M and 1.3B scales, including DeltaNet, Gated DeltaNet, KDA, and Mamba-3 baselines.
In-Context Retrieval (RULER)
Table 2 presents in-context retrieval accuracy (%) on RULER single- and multi-key needle-in-a-haystack tasks (25-word context increments with deterministic random windows):
| Model | Single-Key | Multi-Key |
|---|---|---|
| Best delta-rule baseline | (second best) | (second best) |
| Diagonal KDN | Best | Best |
| Isotropic KDN | Best/second | Best/second |
KDN variants achieve the best or second-best performance per column across all retrieval tasks, demonstrating that uncertainty-aware writes improve the ability to store and retrieve associations in long contexts.
Ablations: Information Scale
Table 4 ablates the information scale using fixed values and a learned scale initialized at . Results show that:
- performs well across settings
- The learned scale initialized at provides competitive or better performance
- Too small leads to excessive overwrite; too large makes the model underwrite new information
Theoretical and Practical Implications
Theoretical Contributions
-
Unified view of delta-rule and state-space models: The paper bridges delta-rule recurrent mixers (DeltaNet, Gated DeltaNet, KDA) and state-space models (Mamba lineage) by showing delta-rule updates are fixed-gain special cases of Kalman filtering over a latent key–value map. Unlike Mamba's control-driven additive input, these models correct a predicted key–value map with a key-conditioned residual.
-
Uncertainty as the missing state variable: The key insight is that delta-rule models omit covariance tracking, which is essential for principled write-strength determination. KDNs derive the innovation gain jointly from uncertainty and the transition, rather than from a token-predicted scalar.
-
Scan-compatible uncertainty tracking: The paper demonstrates that uncertainty-aware filtering can be made compatible with GPU-parallel linear-attention scans through diagonal (mean-field) and isotropic approximations, with and auxiliary state per head respectively.
Practical Implications
- Constant-memory decoding with uncertainty awareness: KDNs maintain the efficient constant-memory decoding and scan-parallel training of linear attention while adding explicit confidence tracking.
- Improved retrieval and modeling: The empirical gains on RULER tasks and perplexity suggest that uncertainty-aware writes better balance the trade-off between preserving old associations and incorporating new evidence.
- Information scaling as a practical calibration tool: The parameter provides a simple, interpretable knob for controlling the overwrite behavior of diagonal approximations.
Relationship to Prior Work
- Kalman Linear Attention (KLA) also tracks uncertainty with a scan-parallel information-form filter but factorizes its belief over feature/state-expansion coordinates under time-invariant OU dynamics. KDNs instead maintain exact posterior covariance in key space (dense, shared across value channels) with isotropic/diagonal scan-compatible approximations.
Conclusion
This work bridges delta-rule recurrent mixers and state-space models by reformulating recurrent key–value memory as a linear–Gaussian dynamical system over a latent, non-stationary key–value map. The delta-rule residual write is given a principled interpretation as the Kalman innovation—the part of the observed value not explained by the predicted memory.
Key Takeaways
- Delta-rule models are fixed-gain Kalman filters that omit covariance tracking; uncertainty is their missing state variable.
- Scan-compatible Isotropic and Diagonal KDNs make uncertainty-aware filtering practical for linear attention.
- Information scaling limits future overwrite of stored associations under the diagonal approximation.
- KDN variants consistently outperform state-of-the-art linear-attention baselines in perplexity and downstream accuracy.
Future Directions
- Richer transitions: Extending diagonal decay with damped rotations (as in Mamba-3) to allow stored associations to rotate as well as decay.
- Scan-efficient richer covariance: Making the covariance update for richer transition models scan-efficient remains open.
- The authors note that KDNs are "steps toward, rather than full realizations of, Kalman Associative Memory"—full covariance tracking with scan-compatible approximations remains an open challenge.
Related papers
- Taylor-Calibrate: Principled Initialization for Hybrid Linear Attention Distillation
Taylor-Calibrate initializes Gated DeltaNet hybrid layers from teacher attention statistics, cutting distillation tokens 4.9x-9.2x while matching transformer quality.
- Knowledge Distillation During Mid-Training Favors Reasoning over Factual Recall
Knowledge distillation during mid-training boosts reasoning but slows factual recall; entropy-based token routing (SWITCH DISTILLATION) preserves both.
- Good Pretraining, Bad SFT: Checkpoint Quality Across the Training Stack
Pretraining loss and benchmark scores fail to predict post-SFT performance, as a checkpoint with worse pretraining metrics yields better final models after supervised fine-tuning.