EEG-DINO Medium β Self-Distillation EEG Foundation Model
EEG-DINO-Medium encoder (~33M parameters) pretrained with DINO-v2 hierarchical self-distillation (Wang et al., MICCAI 2025).
This is the eegdino-medium-pretrained checkpoint for braindecode.models.EEGDINO,
curated and re-uploaded as part of the
OpenEEG-Bench effort.
Which half of the DINO checkpoint
The released model_EEG_DINO_{S,M}.pt files hold both halves of the self-distillation
graph: the student (module.student.*) and its EMA teacher (module.teacher.*). This
repository hosts the student encoder. The paper releases the student as the foundation
model ("The student model obtained from the pre-training stage will be used as the
foundation model to be adapted to downstream tasks", Wang et al., MICCAI 2025), and the
authors' run_finetuning.py loads only the module.student. keys. The encoder outputs
of this checkpoint match the original code's student forward (max abs difference
0.0 for Small and 1.8e-6 for Medium, float32, CPU). An earlier upload of this repository
held the teacher instead. The teacher differs from the student in every tensor: the
median relative L2 difference per tensor is 0.13 % (Small) and 0.20 % (Medium), with a
maximum below 1 %. Their patch-token outputs differ by 8 % (Small) and 13 % (Medium),
measured as relative L2 on random input. convert_eegdino_checkpoints.py at the repository root reproduces the
conversion (--source student, the default). The classification head (final_layer.*)
is newly initialised; fine-tune it on your task.
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:.
datasets: id |
Dataset | Stage | Modality |
|---|---|---|---|
TUEG |
Temple University Hospital EEG Corpus (TUH EEG) | pretraining | EEG |
- same pretraining corpus and recipe as EEG-DINO-Small (paper reports one pretraining dataset for all sizes)
TUEG(the TUH EEG Corpus) contains the recordings of its sub-corpora TUAB, TUEV, TUSZ, TUAR, TUSL and TUEP; an evaluation on one of those is not held out from these weights unless the authors removed it.- Sources: Wang et al. MICCAI 2025 (papers.miccai.org/miccai-2025/paper/3347_paper.pdf) p.5, Sec. 3.1; MICCAI 2025 paper 3347 p.5; https://huggingface.co/eegdino/EEG-DINO README; https://huggingface.co/braindecode/eegdino-medium-pretrained/blob/main/convert_eegdino_checkpoints.py.
Quick start
pip install braindecode[hub]
from braindecode.models import EEGDINO
model = EEGDINO.from_pretrained(
"braindecode/eegdino-medium-pretrained",
n_outputs=2, # set to your downstream task
n_chans=19,
sfreq=200,
)
from_pretrained reads both the architecture configuration (config.json)
and the weights (model.safetensors or pytorch_model.bin) and returns a
ready-to-fine-tune nn.Module.
Model details
| Architecture | braindecode.models.EEGDINO |
| Expected channels | 19 |
| Expected sampling frequency | 200 Hz |
| Library | braindecode β₯ 1.5 |
| Loaded via | huggingface_hub.PyTorchModelHubMixin (free with braindecode[hub]) |
For the full architecture description, parameter table, and references, see the rendered docstring at https://braindecode.org/stable/generated/braindecode.models.EEGDINO.html or in the interactive Model Explorer Space.
Training data
Temple University Hospital EEG Corpus (TUEG), 19 common 10-20 channels resampled to 200 Hz (>9000 hours), following CBraMod's preprocessing. Pretrained by hierarchical self-distillation.
Intended use
Larger EEG-DINO encoder for feature extraction or fine-tuning; the architecture is restored from config.json on load. The classification head is re-initialized on load.
Limitations
- Channel layout matters. Performance degrades when the input montage
differs from the pretraining montage. Use the
Interpolated*variant (where available) or resample channels with MNE before fine-tuning. - Sampling rate matters. Resample your data to 200 Hz before inference; the positional / patch embeddings assume this rate.
- Inherited license restrictions. Downstream weights derived from this checkpoint inherit the license of the original training corpus (some braindecode pretraining corpora are CC-BY-NC). Verify the upstream dataset licence before commercial use.
Citation
If you use this checkpoint, please cite both the original architecture paper and braindecode.
@inproceedings{wang2025eegdino,
title = {{EEG-DINO}: Learning {EEG} Foundation Models via Hierarchical
Self-Distillation},
author = {Wang, Xujia and Liu, Xuhui and Liu, Xi and Si, Qian and Xu,
Zhaoliang and Li, Yang and Zhen, Xiantong},
booktitle = {Medical Image Computing and Computer Assisted Intervention (MICCAI)},
year = {2025},
}
@article{aristimunha2025braindecode,
title = {Braindecode: a deep learning library for raw electrophysiological data},
author = {Aristimunha, Bruno and others},
journal = {Zenodo},
year = {2025},
doi = {10.5281/zenodo.17699192},
}
License
BSD-3-Clause for the model code (matching braindecode). The pretraining data may impose additional restrictions β see Limitations.
- Downloads last month
- 1,158