STEEGFormer-largeV2 / README.md
bruAristimunha's picture
Add ST-EEGFormer largeV2 (ported from ST-EEGFormer-largeV2)
1cf1854 verified
|
Raw
History Blame Contribute Delete
1.71 kB
---
library_name: braindecode
tags:
- braindecode
- STEEGFormer
- eeg
- foundation-model
license: mit
---
# STEEGFormer (largeV2)
ViT-MAE EEG foundation model — braindecode port of **ST-EEGFormer** (largeV2 variant).
## Provenance
- **Weights ported from:** [LiuyinYang1101/STEEGFormer](https://github.com/LiuyinYang1101/STEEGFormer),
release [`ST-EEGFormer-largeV2`](https://github.com/LiuyinYang1101/STEEGFormer/releases/tag/ST-EEGFormer-largeV2)
(asset `large_weights_only_210.pth`).
- **Upstream license:** MIT. The braindecode wrapper code is BSD-3-Clause.
- The pre-trained encoder is loaded faithfully (numerical equivalence verified:
pre-encoder bit-exact, post-encoder relative error ~4e-6). The MAE decoder is
dropped and the classification head is re-initialised.
## Architecture
| | embed_dim | depth | num_heads | patch_size | channel vocab |
|---|---|---|---|---|---|
| largeV2 | 1024 | 24 | 16 | 16 | 256 |
This variant uses a **256-slot** channel vocabulary (further pre-trained on HBN for the EEG 2025 Foundation Challenge). Name-based mapping via `chs_info` works for standard electrodes; pass `chan_pos_idx` explicitly for the HBN montage / non-standard channels.
## Usage
```python
from braindecode.models import STEEGFormer
model = STEEGFormer.from_pretrained(
"braindecode/STEEGFormer-largeV2",
n_outputs=4, n_chans=22, n_times=1000, chs_info=chs_info,
)
# Encoder features: out = model(x, return_features=True); out["features"]
```
## Citation
Yang, L., Sun, Q., Li, A. & Van Hulle, M. M. (2026). *Are EEG foundation models
worth it? Comparative evaluation with traditional decoders in diverse BCI tasks.*
ICLR 2026. https://openreview.net/forum?id=5Xwm8e6vbh