NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Brain-Mamba: Encoding Brain Activity via Selective State Space Models

Ali Behrouz, Farnoosh HashemiCHIL 2024

TL;DR

This paper introduces BRAINMAMBA, a novel framework that efficiently encodes complex brain activity from various neuroimaging modalities. By combining selective state-space models with graph neural networks, BRAINMAMBA achieves state-of-the-art performance on multiple downstream tasks, offering a more scalable and powerful approach to understanding the brain.

What Problem Does This Paper Address?

Understanding the human brain is a monumental challenge, and neuroimaging techniques like fMRI and EEG provide rich, but complex, data. Analyzing this data for applications like diagnosing neurological disorders requires models that can effectively capture both the spatial (where in the brain activity is happening) and temporal (when it's happening) aspects of brain signals. Current methods often struggle with this, facing limitations such as:

  • Modality-specific limitations: Models are often designed for a single neuroimaging modality (e.g., only EEG or only fMRI) and its specific resolution (high temporal vs. high spatial).
  • Scalability issues: Many powerful models, like Transformers, rely on self-attention mechanisms that have quadratic complexity, making them impractical for the high-dimensional data from neuroimaging.
  • Ignoring dependencies: Some approaches process brain regions or time points in isolation, missing crucial interdependencies that are vital for understanding brain function and dysfunction.

The authors aim to bridge this gap by developing a universal, attention-free, and scalable framework that can learn from diverse brain activity data across different modalities and resolutions.

Methods

BRAINMAMBA is built upon two core modules:

  • Brain Network Mamba (BNMAMBA): This module focuses on encoding the spatio-temporal properties of brain networks.
  • It uses Message-Passing Neural Networks (MPNNs) to capture local dependencies between brain units (like voxels or channels).
  • A novel tokenization and ordering mechanism is introduced, leveraging the concept of functional brain systems to order brain regions. This helps in creating a more meaningful sequence for the subsequent processing.
  • A selective structured state space (S4) architecture is employed to efficiently select informative brain regions, addressing the long-range dependency challenge without quadratic complexity.
  • A bidirectional readout function is used to aggregate information from the selected regions, making the model more robust to the ordering of brain units.
  • Brain Timeseries Mamba (BTMAMBA): This module focuses on encoding the temporal properties and long-range dependencies within multivariate time-series brain activity.
  • It starts with a Multilayer Perceptron (MLP) to fuse information across different brain variates (e.g., different channels in EEG), capturing inter-variate dependencies.
  • A time-dependent S4 block is then used to selectively encode each variate, allowing the model to adapt its process based on the input data (input-dependent). This addresses the limitation of time-invariant recurrent processes in traditional SSMs.

These two modules are then combined, and a learnable gate is used to fuse their outputs. The framework also incorporates a pre-training strategy that maximizes mutual information between the outputs of the two encoders.

Datasets

The authors evaluated BRAINMAMBA on seven real-world datasets across three modalities:

  • fMRI: BVFC, ADHD, HCP
  • MEG: BVFC-MEG
  • EEG: TUH-EEG, MPI-EEG

These datasets cover various tasks, including brain classification (predicting mental states, age, image categories), brain unit anomaly detection, and graph anomaly detection. The paper also provides a detailed breakdown of these datasets in Appendix A.

Key Insights and Ideas

  • Selective State Space Models (SSMs) are powerful for brain data: The paper demonstrates that SSMs, particularly with a selective mechanism, can efficiently capture long-range dependencies in brain activity without the quadratic complexity of attention mechanisms.
  • Functional ordering of brain regions matters: By leveraging known functional systems in the brain to order brain units, BNMAMBA can create more meaningful sequences for processing, improving its ability to capture spatial dependencies.
  • Input-dependent SSMs are crucial for neuroimaging: The time-invariant nature of traditional SSMs is a bottleneck. BTMAMBA's input-dependent selective SSM allows for more adaptive and context-aware processing of temporal brain signals.
  • Combining spatial and temporal encoders is key: BRAINMAMBA's success stems from its ability to effectively integrate information from both graph-based spatial encoding (BNMAMBA) and time-series-based temporal encoding (BTMAMBA).
  • Efficiency without sacrificing performance: The attention-free design and selective SSMs lead to linear time complexity, making BRAINMAMBA scalable to large datasets while achieving superior performance.

Key Results

  • State-of-the-art performance: BRAINMAMBA consistently outperformed all baselines across multiple downstream tasks, including brain classification and anomaly detection.
  • In multi-class brain classification, BRAINMAMBA achieved an average performance improvement of 9.94% over the best baselines.
  • For anomaly detection, it achieved the best AUC-PR on all datasets, with an average improvement of 1.43% for brain unit-level AD and 1.75% for brain-level AD.
  • Scalability: The model exhibits linear scaling with respect to the number of brain units and timestamps, as shown in Figures 2 and 3, making it suitable for large-scale neuroimaging data.
  • Robustness: BRAINMAMBA with its selective mechanism was found to be more robust to noisy data compared to a time-invariant mechanism (Figure 4).
  • Efficiency: The paper highlights that BRAINMAMBA achieves superior performance not due to a larger number of parameters but due to its architectural design, often requiring less time and memory than competitors.

Limitations and Future Work

  • Limitations:
    • The current framework treats each subject the same during training.
  • The evaluation of robustness to distribution shifts is left for future work, although the authors hypothesize BRAINMAMBA might generalize better due to its selection mechanism.
  • Future Work:
    • Investigate robust training across different populations using attention mechanisms.
  • Extend BRAINMAMBA to support multiple modalities beyond fMRI, MEG, and EEG, such as historical medical records and multimodal neuroimages.
  • Explore learning functional connectivity networks in a data-driven, end-to-end manner for increased flexibility.
  • Apply BRAINMAMBA to a wider range of neurological conditions like Alzheimer's disease, Autism Spectrum Disorder (ASD), and Schizophrenia.

Summary updated

BibTeX
@inproceedings{behrouz2024brain,
  author = {Ali Behrouz and Farnoosh Hashemi},
  title = {{Brain-Mamba: Encoding Brain Activity via Selective State Space Models}},
  booktitle = {CHIL},
  year = {2024},
}
Figure