[Paper Review] Kalman Linear Attention: Parallel Bayesian Filtering For Efficient Language Modelling and State Tracking
Introduces Kalman Linear Attention (KLA), a Bayesian filtering-based, parallelizable sequence mixer that delivers uncertainty-aware, nonlinear updates with linear-time complexity for language modelling. It matches or surpasses modern SSM/GLA approaches while providing explicit belief-state uncertainty.
State-space language models such as Mamba and gated linear attention (GLA) offer efficient alternatives to transformers due to their linear complexity and parallel training, but often lack the expressivity and robust state-tracking needed for complex reasoning. We address these limitations by reframing sequence modelling through a probabilistic lens, using Bayesian filters as a core primitive. While classical filters such as Kalman filters provide principled state estimation and uncertainty tracking, they are typically viewed as inherently sequential. We show that reparameterising the Kalman filter in information form enables its updates to be computed via an associative scan, allowing efficient parallel training. Building on this insight, we introduce the Kalman Linear Attention (KLA) layer, a neural sequence-modelling primitive that performs time-parallel probabilistic inference while maintaining explicit belief-state uncertainty. KLA offers strictly more expressive nonlinear updates and gating than GLA variants while retaining their computational advantages. On language modelling tasks, KLA matches or outperforms modern SSMs and GLAs across representative discrete token-manipulation and state-tracking benchmarks.
Motivation & Objective
- Reframe sequence modelling as Bayesian filtering to enable principled uncertainty trading and improved state-tracking.
- Develop a parallel, information-form Kalman filter that can be integrated as a drop-in neural sequence mixer.
- Show that KLA provides nonlinear updates and gating beyond GLA while maintaining linear-time scanning.
- Demonstrate competitive performance on language modelling tasks and long-context/state-tracking benchmarks.
Proposed method
- Reparameterise the diagonal linear–Gaussian filter in information form to show the precision recursion forms a Möbius map that composes associatively.
- Introduce precision-ratio gates and nonlinear uncertainty-driven gating that extend beyond linear SSM/GLA updates.
- Define the Kalman Linear Attention (KLA) layer as a drop-in mixer with explicit belief-state uncertainty and a query-based readout.
- Model token evidence as noisy observations in a linear–Gaussian state-space model with an OU-based prior for latent dynamics.
- Enable parallel inference via Möbius and affine scans to achieve O(T) work and O(log T) depth.
- Train using either cross-entropy on posterior-mean logits or negative log marginal likelihood against token outputs.

Experimental results
Research questions
- RQ1Can Kalman-like updates be parallelised through information-form representations to retain O(log T) depth?
- RQ2Does KLA provide more expressive nonlinear updates and explicit uncertainty while matching or exceeding performance of SSMs and GLA on language tasks?
- RQ3Does KLA improve long-context retrieval and state-tracking tasks compared with existing linear attention and SSM variants?
- RQ4What architectural choices in KLA most contribute to scaling, accuracy, and uncertainty propagation?
- RQ5Is KLA a viable drop-in replacement for modern language-model mixers without sacrificing efficiency?
Key findings
- KLA updates can be computed via parallel prefix scans, achieving scalable O(T) work and O(log T) depth.
- KLA provides nonlinear, uncertainty-aware gating that extends beyond deterministic SSM/GLA updates while preserving linear-time scan structure.
- KLA serves as a drop-in sequence mixer that yields explicit belief-state uncertainty alongside outputs.
- OU-based prior with exact discretisation supports stable learning and accurate latent dynamics modeling.
- KLA attains strong scaling with sequence length and competitive performance on synthetic LM tasks, long-context associative recall, and state-tracking benchmarks.
- Fractional-linear precision tracking enables history-dependent gating and enhanced state-tracking over linear SSM/GLA baselines.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.