CaMBRAIN: Real-time, Continuous EEG Inference with Causal State Space Models
Abstract
Electroencephalography (EEG) signals are a critical, non-invasive method to monitor electrical brain activity. They play a major role in neuromuscular and biomechanical settings, as they are used in clinical settings to monitor sleep, seizure activity, muscular response, etc. However, the length of EEGs is limitless - they can span anywhere from a couple seconds to multiple hours. This serves as a major hurdle for existing deep learning methods due to two major factors: (1) existing EEG models are predominantly built upon the attention mechanism, incurring quadratic scaling as the sequence length increases, and (2) raw EEG signals must be processed in a sliding-window fashion due to current models' requirements of fixed-length input, preventing global understanding across the entire signal as a whole. To this extent, we propose CaMBRAIN, a Causal, Mamba-based EEG model for real-time, streaming inference of brain EEG signals. We argue that bidirectional approaches to processing EEG signals are counterintuitive and needlessly expensive due to the causal, unidirectional nature of EEG. Thus, we propose a unidirectional, causal, state space model (SSM) for EEG understanding. However, training such a model is not straightforward, as crucial EEG events can be extremely brief - occurring within fractions of a second - yet may be separated by long intervals spanning minutes. While current EEG methods use self-supervised objectives to optimize for signal reconstruction, these objectives are not well suited for streaming state space models, they fail to explicitly train the hidden state to retain the salient long-range context needed for streaming inference. Therefore, we introduce a multi-stage self-supervised training pipeline specifically tailored to encourage long-range memory retention and strong performance on EEG signals, while preserving the linear-time complexity of state space models. CaMBRAIN achieves state-of-the-art (SOTA) results on multiple EEG benchmarks with 6–158 less sustained compute than EEG foundation model baselines, enabling long-range, continuous inference over variable-length EEG signals.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.