CodeBrain: Bridging Decoupled Tokenizer and Multi-Scale Architecture for EEG Foundation Model
Jingying Ma, Feng Wu, Qika Lin, Yucheng Xing, Chenyu Liu, Ziyu Jia, Mengling Feng
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 capturing global dependencies and neglecting 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 representation-level 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 eight downstream tasks and ten datasets under distribution shifts, supported by comprehensive ablations, scaling-law analyzes, and interpretability evaluations. The code and the pretrained weights are available at https://github.com/jingyingma01/CodeBrain .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 8aa29d3d-e80e-49ee-ae1d-3150de32bb17Cited by top-tier papers6
- Uni-NTFM: A Unified Foundation Model for EEG Signal Representation LearningZhisheng Chen, Yingwei Zhang, Qizhen Lan, Tianyu Liu et al.ICLR 2026 · 16 citations
- ECHO: Toward Contextual Seq2Seq Paradigms in Large EEG ModelsChenyu Liu, Yuqiu Deng, Tianyu Liu, Jinan Zhou et al.ICLR 2026 · 12 citations
- DPsurv: Dual-Prototype Evidential Fusion for Uncertainty-Aware and Interpretable Whole Slide Image Survival PredictionYucheng Xing, ling huang, Jingying Ma, Ruping Hong et al.ICML 2026 · 8 citations
- LERD: Latent Event-Relational Dynamics for Neurodegenerative ClassificationYicheng Feng, Hairong Chen, Chenyu Liu, Samir Bhatt et al.ICML 2026 · 1 citation
- PATCHCODE: Discrete Latent Predictive Learning for EEG Foundation ModelKIEREN YU, Ziyang Liu, Chang Huang, Kaishun WUICML 2026
Builds on30
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- Emerging Properties in Self-Supervised Vision TransformersMathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou et al.ICCV 2021 · 8,921 citations
- Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 citations
- HiPPO: Recurrent Memory with Optimal Polynomial ProjectionsAlbert Gu, Tri Dao, Stefano Ermon, Atri Rudra et al.NeurIPS 2020 · 1,100 citations
Related papers
- CSBrain: A Cross-scale Spatiotemporal Brain Foundation Model for EEG DecodingYuchen Zhou, Jiamin Wu, Zichen Ren, Zhouheng Yao et al.NeurIPS 2025 · 71 citations
- CBraMod: A Criss-Cross Brain Foundation Model for EEG DecodingJiquan Wang, Sha Zhao, Zhiling Luo, Yangxuan Zhou et al.ICLR 2025
- NeuroLM: A Universal Multi-task Foundation Model for Bridging the Gap between Language and EEG SignalsWeibang Jiang, Yansen Wang, Bao-Liang Lu, Dongsheng LiICLR 2025
- BrainOmni: A Brain Foundation Model for Unified EEG and MEG SignalsQinfan Xiao, Ziyun Cui, Chi Zhang, Siqi Chen et al.NeurIPS 2025 · 38 citations
- Large Brain Model for Learning Generic Representations with Tremendous EEG Data in BCIWei-Bang Jiang, Li-Ming Zhao, Bao-Liang LuICLR 2024 · 298 citations
