Jing Shao1, Na Zou1,5, Xia Hu1, Dongrui Liu1†
1Shanghai Artificial Intelligence Laboratory 2Shanghai Jiao Tong University 3Fudan University
4Tongji University 5University of Houston
*Equal contribution †Corresponding author
This is the official repository for BrainPEC, an audit framework for understanding what EEG foundation models learn, use, and explain from human brain signals. BrainPEC evaluates three EEG foundation models, CSBrain, CBraMod, and LaBraM, across five clinical EEG tasks using a six-family, 63-feature EEG lexicon. The pipeline combines layer-wise probing, concept erasure, and transparent classifier closure to separate linear readability from model reliance.
BrainPEC asks three questions:
- Probe: Does the model encode classical EEG features?
- Erase: Does the model use those features for downstream prediction?
- Closure: How much of the foundation model's performance can be explained by confirmed features?
The audit covers 945 model-task-feature units. In the reported run, 648 units are representation-causal and 199 are encoded-only. Confirmed features recover 79.3% of the foundation-model advantage over a same-dimension random-feature baseline on average.
Layer-wise ridge probes show where different EEG feature families become linearly readable across model depth, tasks, and architectures.
Across tasks, confirmed features form broad universal candidates rather than a small task-specific list. Frequency-domain features dominate, but time-domain, time-frequency, complexity, cross-frequency, and cross-channel families all contribute causal mass.
Install the required dependencies:
pip install -r requirements.txtPrepare datasets and fine-tuned checkpoints following the instructions in inference/README.md.
Run the full factor-atlas pipeline:
scripts/factor_atlas/run_all.shRun individual stages:
scripts/factor_atlas/run_features.sh
scripts/factor_atlas/run_probe.sh
scripts/factor_atlas/run_erasure.sh
scripts/factor_atlas/run_aggregate.shThe scripts call the released package entrypoint:
python -m brainpec.experiments.factor_atlas@article{tang2026eeg,
title={What Do EEG Foundation Models Capture from Human Brain Signals?},
author={Tang, Ling and Chen, Qian and Mei, Jilin and Xu, Houshi and Zhang, Quanshi and Shao, Jing and Zou, Na and Hu, Xia and Liu, Dongrui},
journal={arXiv preprint arXiv:2605.11410},
year={2026}
}This project is licensed under the MIT License.



