CodeBrain: Towards Decoupled Interpretability and Multi-Scale Architecture for EEG Foundation Model

Jingying Ma, Feng Wu, Qika Lin, Yucheng Xing, Chenyu Liu +2 more
6/10/2025
cs.LG

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Electroencephalography (EEG) provides real-time insights into brain activity and supports diverse applications in neuroscience. While EEG foundation models (EFMs) have emerged to address the scalability issues of task-specific models, current approaches still yield clinically uninterpretable and weakly discriminative representations, inefficiently capture global dependencies, and neglect important local neural events. We present CodeBrain, a two-stage EFM designed to fill this gap. In the first stage, we introduce the TFDual-Tokenizer, which decouples heterogeneous temporal and frequency EEG signals into discrete tokens, quadratically expanding the representation space to enhance discriminative power and offering domain-specific interpretability by suggesting potential links to neural events and spectral rhythms. In the second stage, we propose the multi-scale EEGSSM architecture, which combines structured global convolution with sliding window attention to efficiently capture both sparse long-range and local dependencies, reflecting the brain's small-world topology. Pretrained on the largest public EEG corpus, CodeBrain achieves strong generalization across 8 downstream tasks and 10 datasets under distribution shifts, supported by comprehensive ablations, scaling-law analyses, and interpretability evaluations. Both code and pretraining weights will be released in the future version.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{ma2025codebrain,
  title  = {CodeBrain: Towards Decoupled Interpretability and Multi-Scale Architecture for EEG Foundation Model},
  author = {Jingying Ma and Feng Wu and Qika Lin and Yucheng Xing and Chenyu Liu and Ziyu Jia and Mengling Feng},
  year   = {2025},
  eprint = {2506.09110},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.09110v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.09110.svg)](https://codeofpaper.com/paper/2506.09110)

Discussion