Exploring the trade-off between deep-learning and explainable models for brain-machine interfaces

Luis H. Cubillos, Guy Revach, Matthew J. Mender, Joseph T. Costello, Hisham Temmar, Aren Hite, Diksha Zutshi, Dylan M Wallace, Xiaoyong Ni, Madison Kelberman, Matthew S. Willsey, Ruud J. G. van Sloun, Nir Shlezinger, Parag G. Patil, Anne Draelos, Cynthia A. Chestek

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.

Overview of the BMI system and the architectural comparison between the standard Kalman filter and KalmanNet.

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.

Online performance comparison across decoders, showing KalmanNet's superior success rates, throughput, and path efficiency.

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:

  1. 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.
  2. 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

BibTeX
@inproceedings{cubillos2024exploring,
  author = {Luis H. Cubillos and Guy Revach and Matthew J. Mender and Joseph T. Costello and Hisham Temmar and Aren Hite and Diksha Zutshi and Dylan M Wallace and Xiaoyong Ni and Madison Kelberman and Matthew S. Willsey and Ruud J. G. van Sloun and Nir Shlezinger and Parag G. Patil and Anne Draelos and Cynthia A. Chestek},
  title = {{Exploring the trade-off between deep-learning and explainable models for brain-machine interfaces}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=MvOuyghzfg},
}
Figure