bruAristimunha commited on
Commit
1cf1854
·
verified ·
1 Parent(s): 42b2c92

Add ST-EEGFormer largeV2 (ported from ST-EEGFormer-largeV2)

Browse files
Files changed (4) hide show
  1. README.md +49 -0
  2. config.json +20 -0
  3. model.safetensors +3 -0
  4. pytorch_model.bin +3 -0
README.md ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: braindecode
3
+ tags:
4
+ - braindecode
5
+ - STEEGFormer
6
+ - eeg
7
+ - foundation-model
8
+ license: mit
9
+ ---
10
+
11
+ # STEEGFormer (largeV2)
12
+
13
+ ViT-MAE EEG foundation model — braindecode port of **ST-EEGFormer** (largeV2 variant).
14
+
15
+ ## Provenance
16
+
17
+ - **Weights ported from:** [LiuyinYang1101/STEEGFormer](https://github.com/LiuyinYang1101/STEEGFormer),
18
+ release [`ST-EEGFormer-largeV2`](https://github.com/LiuyinYang1101/STEEGFormer/releases/tag/ST-EEGFormer-largeV2)
19
+ (asset `large_weights_only_210.pth`).
20
+ - **Upstream license:** MIT. The braindecode wrapper code is BSD-3-Clause.
21
+ - The pre-trained encoder is loaded faithfully (numerical equivalence verified:
22
+ pre-encoder bit-exact, post-encoder relative error ~4e-6). The MAE decoder is
23
+ dropped and the classification head is re-initialised.
24
+
25
+ ## Architecture
26
+
27
+ | | embed_dim | depth | num_heads | patch_size | channel vocab |
28
+ |---|---|---|---|---|---|
29
+ | largeV2 | 1024 | 24 | 16 | 16 | 256 |
30
+
31
+ 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.
32
+
33
+ ## Usage
34
+
35
+ ```python
36
+ from braindecode.models import STEEGFormer
37
+
38
+ model = STEEGFormer.from_pretrained(
39
+ "braindecode/STEEGFormer-largeV2",
40
+ n_outputs=4, n_chans=22, n_times=1000, chs_info=chs_info,
41
+ )
42
+ # Encoder features: out = model(x, return_features=True); out["features"]
43
+ ```
44
+
45
+ ## Citation
46
+
47
+ Yang, L., Sun, Q., Li, A. & Van Hulle, M. M. (2026). *Are EEG foundation models
48
+ worth it? Comparative evaluation with traditional decoders in diverse BCI tasks.*
49
+ ICLR 2026. https://openreview.net/forum?id=5Xwm8e6vbh
config.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "n_outputs": 4,
3
+ "n_chans": 22,
4
+ "chs_info": null,
5
+ "n_times": 1000,
6
+ "input_window_seconds": null,
7
+ "sfreq": null,
8
+ "patch_size": 16,
9
+ "embed_dim": 1024,
10
+ "depth": 24,
11
+ "num_heads": 16,
12
+ "mlp_ratio": 4.0,
13
+ "drop_prob": 0.0,
14
+ "drop_path": 0.0,
15
+ "activation": "torch.nn.modules.activation.GELU",
16
+ "global_pool": "avg",
17
+ "n_chans_pos": 256,
18
+ "chan_pos_idx": null,
19
+ "braindecode_version": "1.6.1dev0"
20
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0051f40a5b3ebfa6ca226d204220c04ccfeb12544b621907ba52791ddf6011ff
3
+ size 1210423512
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82409f7cee1be6ff0be5498cf040d229dfb68b6479aace3e90c095644c84a5eb
3
+ size 1210530499