Abstract
People with brain or spinal cord-related paralysis often rely on others for basic tasks, limiting their independence. Brain-machine interfaces (BMIs) offer a potential solution by decoding brain activity into movement commands for external devices. While deep-learning decoders have achieved state-of-the-art results, their "black-box" nature raises safety concerns in real-world control scenarios. This study introduces a BMI decoder based on KalmanNet, which augments the traditional Kalman filter (KF) with recurrent neural networks to compute a dynamic Kalman gain. Tested on finger movement tasks in non-human primates, KalmanNet achieved performance comparable to or better than pure deep-learning models (LSTM, tcFNN) in both offline and online modes. Our analysis reveals that KalmanNet learns a specific "trust" strategy—relying on neural inputs for movement initiation and the dynamical model for stopping. While KalmanNet shows limited generalization to unseen noise compared to LSTMs, it successfully bridges the gap between high-performance deep learning and explainable control theory.
Introduction
Brain-machine interfaces (BMIs) aim to restore autonomy to individuals with paralysis by translating neural signals into motor commands. Currently, the field is divided between two approaches: traditional, explainable models like the Kalman Filter (KF), which are safe but often lack accuracy, and modern deep-learning models like LSTMs, which offer high performance but lack transparency. This "black-box" nature is a significant hurdle for clinical adoption, where understanding why a decoder makes a specific command is crucial for safety.
This paper explores KalmanNet (KNet), a hybrid architecture that maintains the interpretable structure of a Kalman Filter while using a Recurrent Neural Network (RNN) to learn the optimal Kalman Gain. This allows the system to dynamically adjust its "trust" between the brain's signals and an internal physical model of movement.
Methods
The researchers evaluated KalmanNet against three benchmarks: a standard linear KF, a temporal convolutional network (tcFNN), and a high-performing LSTM. The study involved two monkeys performing a 2-degree-of-freedom finger task, moving their index and middle-ring-small (MRS) fingers to targets. Neural data consisted of Spiking Band Power (SBP) binned at 50ms intervals.
As shown in the architecture comparison, while the standard KF uses rigid linear math to calculate gain, KalmanNet uses an RNN to extract features from observations and state history to compute a time-varying gain. This preserves the "inductive bias" of the KF—the assumption that movements follow physical laws—while allowing for non-linear flexibility.
Results
Offline and Online Performance
In offline tests across 13 days, KalmanNet achieved velocity correlations (~0.65) that matched the state-of-the-art LSTM and significantly outperformed the standard KF (~0.55). More importantly, in real-time online trials, KalmanNet achieved a 97% success rate, surpassing the LSTM (90%) and the KF.
Beyond success rates, KalmanNet demonstrated superior "path efficiency" and smoother control. Unlike the tcFNN or standard KF, which often produced oscillatory movements, KalmanNet's trajectories were direct and controlled.
The "Trust" Strategy
By inspecting the learned Kalman Gain, the authors discovered KNet's underlying strategy: it trusts neural inputs to initiate fast movements but shifts its trust toward the internal dynamical model to come to a smooth, controlled stop. To validate this, the researchers built a Heteroscedastic KF (HKF)—a purely mathematical model that manually mimicked this velocity-dependent trust. The HKF performed nearly as well as the deep-learning version, proving that KNet's success stems from an understandable control strategy rather than "black-box" magic.
Discussion and Limitations
Despite its success, KalmanNet faces two primary trade-offs:
- Generalization: Like other deep-learning decoders, KNet struggled when the physical context changed (e.g., wrist flexion), showing a 34-50% increase in error. The simple KF generalized best to these shifts.
- Noise Sensitivity: Because KNet is constrained by the KF structure, it is less robust to massive, out-of-distribution sensor noise than a pure LSTM.
Conclusion
KalmanNet demonstrates that it is possible to achieve state-of-the-art BMI performance without sacrificing explainability. By using deep learning to tune—rather than replace—traditional control structures, researchers can design high-performing systems that remain transparent and safer for real-world clinical applications.
Summary updated