Download README.md from braindecode/corteg-stanford-pooled: direct link, hf CLI and curl.
- Browser
- Download file 11.5 kB
-
https://huggingface.co/braindecode/corteg-stanford-pooled/resolve/main/README.md
- Command line
-
hf download hf://braindecode/corteg-stanford-pooled/README.md
-
curl -L -o README.md https://huggingface.co/braindecode/corteg-stanford-pooled/resolve/main/README.md
library_name: braindecode
license: mit
base_model: braindecode/corteg-small-pretrained
tags:
- braindecode
- CORTEG
- ieeg
- ecog
- finger-flexion
- pytorch_model_hub_mixin
datasets:
- nm000245
- nm000172
- nm000139
- nm000135
- Kaya2018
- Won2022
- nm000129
- nm000339
- SparrKULee
- SEED-V
- Stanford-FingerFlex
CORTEG, Stanford finger flexion (pooled)
The released CORTEG model of Yang et al. (2026),
ST-EEGFormer small adapted to ECoG and trained on the finger-flexion recordings
of the 9 Stanford patients pooled (Table 1, "CORTEG (pooled)", Pearson r 0.554),
25.5M parameters, converted to
braindecode.models.CORTEG.
It decodes the flexion of the five fingers (thumb, index, middle, ring, pinky) from 1 s of ECoG.
Sources:
- the adapter,
checkpoints/corteg_stanford_pooled.ptof LiuyinYang1101/CORTEG, sha25677d63a214e0e0f2c790e90878a0ef6b525f6e24e1453fcd94e118c63ff7e8396: the spatial adapter, LoRA factors (r=4, alpha=16) on blocks 4-7, the high-gamma patch embedding, those blocks' LayerNorms and the readout, 297,236 parameters; - the frozen backbone it was trained on, the ST-EEGFormer small release
(
checkpoint-300.pth, sha25698d2848abdaea7a143d399c07f67f8782e07dd66e7c309ddb058c7158a8a8b02), here through braindecode/corteg-small-pretrained.
Conversion folds the LoRA factors into the fused qkv, proj, fc1 and fc2 weights
(scale alpha/r = 4), so the model is a plain CORTEG;
convert_corteg_checkpoint.py in this repository reproduces it. Outputs match
the authors' load_corteg on the two release files to 1.5e-06
in float32 on CPU, for montages of 8 and 46
contacts.
Training data
The data that shaped these weights. The ids are the datasets: field of this card,
which braindecode reads into model.card_data.datasets when you call
from_pretrained (MOABB class names for MOABB datasets, OpenNeuro / NEMAR
accessions, Hub ids otherwise). nm/on ids are datasets on NEMAR
(on = NEMAR's copy of the OpenNeuro dataset with the same number). Rows marked
private: are data the authors did not release; they are not in datasets:.
| Stanford-FingerFlex | Stanford ECoG Library finger-flexion recordings (9 patients; NEMAR nm000352 is a broader multi-task copy) | fine-tuning | ECoG |
- MAE self-supervised pre-training, 300 epochs (release note). MAE pre-training corpus of App. E.2 (pp. 25-26), '11 public datasets' + an in-house set, as the paper lists them: 1) EEG-MI-BCI (Cho et al., 2017) -> Cho2017; 2) HGD (Schirrmeister et al., 2017) -> Schirrmeister2017; 3) BCI-Comp-IV2a (Tangermann et al., 2012) -> BNCI2014_001 (official training session only; the official test session was the validation split, E.4 p.26); 4) BCI-Comp-IV2b (Tangermann et al., 2012) -> BNCI2014_004; 5) Large-MI-Classic and 6) Large-MI-5F (both Kaya et al., 2018) -> Kaya2018 (one dataset, two paradigm subsets); 7) P300 (Won et al., 2022: P300 speller + RSVP) -> Won2022; 8) SSVEP (Liu et al., 2020 = BETA) -> Liu2020BETA; 9) Online MI BCI Classification (Stieger et al., 2021) -> Stieger2021; 10) KUL Auditory Decoding Dataset (Bollens et al., 2023 = SparrKULee) -> SparrKULee; 11) SEED-V (Liu et al., 2022) -> SEED-V; plus in-house EEG recorded in the authors' lab (multiple paradigms, e.g. MI and SSVEP) -> private:KU-Leuven-in-house-EEG. Preprocessing: notch, 0.1-64 Hz band-pass, 128 Hz, per-channel z-score (E.3). Windows: 6 s / 0.5 s hop for continuous sets, 6 s / 2.5 s hop for the three large MI sets, 2 s / 0.125 s hop for SSVEP (E.4). Validation: BCI-Comp-IV2a official test set; 20% held out for every other set; >8M overlapping segments overall.
- Sources: Yang et al., ICLR 2026, https://openreview.net/forum?id=5Xwm8e6vbh; PDF via Wayback snapshot http://web.archive.org/web/20260609032700/https://openreview.net/pdf?id=5Xwm8e6vbh App. E.2, p.25; https://github.com/LiuyinYang1101/STEEGFormer/releases/tag/ST-EEGFormer-small (release body).
CORTEG fine-tuning stage
The inheritance chain is corteg-stanford-pooled → corteg-small-pretrained → STEEGFormer-small. In addition to the inherited MAE corpus, the released adapter was trained on the training split of all nine Stanford finger-flexion patients (first 400 s per recording; two thirds for recordings shorter than 600 s). The readout remained at its random initialization, as documented in the authors’ release manifest; the adapter learned around it. Source: CORTEG release code and manifest, checkpoints/corteg_stanford_pooled.json.
Usage
The model reads two streams of the same 1 s window, as the paper's Stanford
pipeline (data/stanford_preprocessing/ of the official repository): after a
notch at 60, 120 and 180 Hz and a common average reference, x is the signal
resampled to 128 Hz and x_hi its 70-200 Hz Hilbert envelope at 200 Hz, each
z-scored per channel with the statistics of the training windows. Electrode
positions are in metres, in chs_info or pos.
import torch
from braindecode.models import CORTEG
model = CORTEG.from_pretrained(
"braindecode/corteg-stanford-pooled", chs_info=raw.info["chs"]
).eval()
flexion = model(x, x_hi) # x: (batch, n_chans, 128), x_hi: (batch, n_chans, 200)
The output, (batch, 5), is the flexion of each finger, z-scored per finger
with the training statistics of the patient, at the time 40 ms before the
window's end. The saved geometry is 8 channels; the model
reads any montage, so pass your own chs_info (or n_chans and pos at each
call) when loading.
Limitations
The readout is at its random initialization, as released: the paper run built
it after the optimizer, so it was never trained, and the adapter learned around
it (see the release manifest, checkpoints/corteg_stanford_pooled.json).
The model was trained on the training split of the 9 Stanford patients (the
first 400 s of each recording, two thirds of one under 600 s); other patients
or tasks need fine-tuning, as in the paper's leave-one-subject-out protocol.
The check above covers float32 CPU outputs, not decoding accuracy, GPU kernels
or mixed precision; the authors report that this checkpoint reproduces the
cohort mean of 0.554 (manifest, paper.verified).
Citation
@inproceedings{yang2026corteg,
title = {{CORTEG}: Foundation Models Enable Cross-Modality Representation Transfer
from Scalp to Intracranial Brain Recordings},
author = {Yang, Liuyin and Sun, Qiang and Van Dyck, Bob and Calvo Merino, Eva and
Van Hulle, Marc M.},
booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
year = {2026}
}
License
The adapter and the ST-EEGFormer backbone are both released by Liuyin Yang
under the MIT licence (LICENSE). Braindecode's code is BSD-3-Clause.
Cite Braindecode
If you use this braindecode port in scientific work, cite the software on Zenodo, doi:10.5281/zenodo.17699192, and the original model and datasets cited above.
@software{braindecode,
author = {Aristimunha, Bruno and
Guetschel, Pierre and
Wimpff, Martin and
Gemein, Lukas and
Rommel, Cedric and
Banville, Hubert and
Sliwowski, Maciej and
Wilson, Daniel and
Brandt, Simon and
Gnassounou, Théo and
Paillard, Joseph and
{Junqueira Lopes}, Bruna and
Sedlar, Sara and
Moreau, Thomas and
Chevallier, Sylvain and
Gramfort, Alexandre and
Schirrmeister, Robin Tibor},
title = {Braindecode: toolbox for decoding raw electrophysiological brain data
with deep learning models},
url = {https://github.com/braindecode/braindecode},
doi = {10.5281/zenodo.17699192},
publisher = {Zenodo},
license = {BSD-3-Clause},
}