CBraMod (criss-cross brain model)
EEG foundation model whose criss-cross transformer attends across channels and across time in parallel.
Neuroscience signals · 928 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Neuroscience signals
- Parameters
- 4.9M
- Operations
- 928
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICLR 2025
- Cited by
- 5 (as of 29 October 2026)
- Authors
- Jiquan Wang, Sha Zhao, Zhiling Luo and others
- Source
- GitHub: wjq-learning/CBraMod
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m15054
- Graph hash
- f077d62402e153343785c5d5efeb6045464cb85b15824c3946111bbd9ca75dd6
- Skeleton hash
- 26f14139c5a3b1251b21ab2c3e56bdb36a58d62a3b5d5acea23ced00c25b8734
- Architecture hash
- 96035a3ab24737a9b8c40fba443d4695ecbe2d7dc1c6c2901c2bba67be401383
- Diagram SHA-256
- a88d1499390814a9cd817a9fabaaf22a41d9667f428bb390e3fcc21669f42497
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
CBraMod is a foundation model for decoding EEG, the non-invasive recording of the brain's electrical activity. The paper argues that most earlier EEG foundation models relate all patches of a recording together, ignoring that dependencies across electrodes (spatial) and across time (temporal) are different in kind. Its backbone, a criss-cross transformer, instead models the two separately through two parallel attention mechanisms.
A recording is cut into patches, and each patch is embedded by a patch encoder with a time-domain branch and a frequency-domain branch. Inside each transformer block, spatial attention relates patches within the same time interval and temporal attention relates patches within the same channel. Positions come from asymmetric conditional positional encoding (ACPE), in which a convolution layer generates the positional encodings dynamically.
Pre-training is masked reconstruction: patches are randomly masked at a 50% ratio and a reconstruction head predicts the masked patches. The data is the Temple University Hospital EEG corpus (TUEG), from which 1,109,545 samples were retained after cleaning. The backbone of CBraMod is a 12-layer criss-cross transformer. It has 200 hidden dimensions, 800 feed-forward dimensions and 8 attention heads, 4 spatial and 4 temporal. Each patch covers 1 second of signal, or 200 data points. The paper evaluates CBraMod on up to 10 downstream BCI tasks using 12 public datasets.
Key idea. CBraMod models spatial and temporal dependencies between EEG patches in parallel with a criss-cross transformer, pre-trained by patch-based masked EEG reconstruction.
- CBraMod
- Criss-Cross Brain Foundation Model
- EEG foundation model
- EEG decoding
- criss-cross transformer
- electroencephalography
- brain-computer interface
- BCI
- masked EEG reconstruction
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{wang2025cbramodcrisscrossbrainfoundation,
title={CBraMod: A Criss-Cross Brain Foundation Model for EEG Decoding},
author={Jiquan Wang and Sha Zhao and Zhiling Luo and Yangxuan Zhou and Haiteng Jiang and Shijian Li and Tao Li and Gang Pan},
year={2025},
eprint={2412.07236},
archivePrefix={arXiv},
primaryClass={eess.SP},
url={https://arxiv.org/abs/2412.07236},
}