Abstract
The "Bayesian Brain" hypothesis suggests that biological systems perform probabilistic inference to navigate noisy environments. While the Kalman filter is the engineering standard for such tasks, its requirement for complex matrix inversions makes it biologically implausible. This paper introduces the "Neural Kalman Filter," which replaces global algebraic operations with a gradient-descent approximation. By leveraging predictive coding and Hebbian plasticity, the proposed model achieves near-optimal state estimation using only local computations.
Introduction
How does the brain track the state of a changing world? Whether following a moving prey or predicting the trajectory of a limb, the nervous system must integrate noisy sensory data with internal models of physics. In control theory, the Kalman filter provides an optimal solution for this problem. However, the standard implementation requires calculating a "Kalman Gain" matrix through global matrix inversions—operations that are difficult to reconcile with the local, synaptic nature of neural computation.
This work addresses this "implementation gap" by treating state estimation as an optimization problem rather than an analytical one. We demonstrate that a network of neurons can approximate a Kalman filter using local prediction errors and biologically plausible learning rules.
Methods
The core innovation lies in moving from the analytical solution of the Kalman filter to a gradient-based approach.
Gradient Descent Approximation
Starting from a Maximum-a-Posteriori (MAP) estimation objective based on Bayes' Rule, we derive a loss function for the state estimate. By taking the gradient of this loss, the update rule simplifies into a sum of variance-weighted prediction errors. This formulation aligns with the "Predictive Coding" framework, where hierarchical layers of neurons represent estimates and errors, iteratively refining the internal model.
Hebbian Learning of Dynamics
Beyond state estimation, the model must learn the underlying dynamics—the matrices $A$, $B$, and $C$ that define how the world evolves and how it is sensed. We derive update rules for these matrices that correspond to third-factor Hebbian plasticity. In this regime, synaptic weights are updated based on the product of a local prediction error and neural activity, a mechanism well-supported by neurophysiological evidence.
Experimental Setup
We evaluated the Neural Kalman Filter on a synthetic kinematic tracking task. The system was tasked with tracking the position, velocity, and acceleration of a body undergoing acceleration and subsequent decay, subject to white Gaussian noise.
The "brain" receives noisy sensory measurements through a random observation matrix ($C$), forcing the network to infer the hidden states from indirect and noisy signals.
Results
The neural implementation demonstrated remarkable performance parity with the exact analytical Kalman filter.
Convergence and Efficiency
A primary concern with gradient-based methods is the speed of convergence. However, because the underlying optimization problem is convex, the neural filter converges to the analytical solution in as few as five gradient steps. This suggests that biological systems can achieve near-optimal tracking in real-time.
Adaptive Learning
When initialized with random dynamics matrices, the network successfully learned the underlying physics online. Interestingly, the learned synaptic weights did not always match the "true" physical constants, yet they produced functionally optimal tracking. This suggests that biological representations may be functionally correct without being human-interpretable.
Discussion
While the Neural Kalman Filter bridges a significant gap, several challenges remain. The model currently struggles to learn the sensory mapping (the $C$ matrix) from scratch without a fixed "source of truth," potentially leading to "hallucinated" realities. Furthermore, the model assumes weight symmetry and uses continuous rate-coded values, whereas biological neurons are spiking and non-negative. Future work will explore extensions to non-linear systems via Extended Kalman Filtering and more biologically detailed spiking architectures.
Summary updated