File size: 5,357 Bytes
ef51942
 
92eed00
 
ef51942
 
92eed00
 
 
 
 
ef51942
c9fa1d7
 
ef51942
 
92eed00
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c9fa1d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92eed00
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9043635
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
---
library_name: braindecode
license: mit
pipeline_tag: feature-extraction
tags:
- braindecode
- DIVER-1
- ieeg
- seeg
- eeg
- foundation-model
- pytorch_model_hub_mixin
datasets:
- nm000358
---

# DIVER-1, 0.1 s Tiny (iEEG)

The released encoder of [Han et al. (2025)](https://arxiv.org/abs/2512.19097),
the iEEG encoder DIVER-1-0.1s Tiny (patches of 0.1 s at 500 Hz, pretrained on intracranial recordings), 12.7M parameters, converted to
[`braindecode.models.DIVER1`](https://braindecode.org/stable/generated/braindecode.models.DIVER1.html).

Source: `weights/ieeg_pretrained_weights.pt` of [DIVER-Project/DIVER-1](https://github.com/DIVER-Project/DIVER-1/tree/25638eb38ef297b582ab79ae1c96260f57c155b3),
sha256 `b812093779fb5cf1b76e18f8307df4136b67b008b6cd94c6be75fa286a87864c` (the GitHub LFS object is no longer served; the same file is in
the authors' [Google Drive folder](https://drive.google.com/drive/folders/1Wmv36jifjE0Jj6noGOFFsqRzK-4xnj1b)). Conversion casts the bfloat16
tensors to float32, renames them and drops the pretraining-only mask token and
reconstruction heads; `convert_diver1_weights.py` in this repository reproduces
it. Encoder features match the official model to 0.0e+00 in
float32 on CPU, for intracranial and scalp channels, with muP attention scaling
(`mup_attention=True`).

<!-- braindecode:training-data -->
## 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](https://nemar.org)
(`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 |
|---|---|---|---|
| [`nm000358`](https://nemar.org/dataset/nm000358) | [AJILE12: Annotated Joints in Long-term Electrocorticography (Peterson et al., 2022; 12 subjects, DANDI 000055)](https://dandiarchive.org/dandiset/000055) | pretraining | iEEG |
| `private:DIVER-self-collected-iEEG` | [DIVER self-collected long-term ECoG/sEEG from 25 drug-resistant epilepsy patients (~7 days each, 2 kHz; IRB-approved, multi-site, not released)](https://arxiv.org/abs/2512.19097) | pretraining | iEEG |

- iEEG-only corpus (DIVER I): 37 subjects, 5,310 h, 352k channel-hours; self-collected part is 25 patients, 4,028 h (~76% of hours)
- Sources: arXiv:2512.19097v3 Table 5 (Summary of DIVER-1 pretraining datasets); arXiv:2512.19097v3 Table 5; arXiv:2512.19097v3 Appendix B.2; https://github.com/DIVER-Project/DIVER-1 README (25638eb).


## Usage

Resample to 500 Hz and pass the electrode positions in `chs_info` (metres, as in
MNE). The channel kinds set the modality: SEEG, ECoG and DBS are intracranial,
EEG is scalp.

```python
import torch
from braindecode.models import DIVER1

model = DIVER1.from_pretrained(
    "braindecode/DIVER-1-0.1s-tiny", chs_info=raw.info["chs"], n_times=500, n_outputs=2
)
logits = model(torch.randn(8, len(raw.ch_names), 500))
```

`n_times` must be a multiple of 50. The saved geometry is 6
channels and 500 samples; the encoder does not depend on it, so
pass your own montage, `n_times` and `n_outputs` when loading.

## Limitations

These files hold the encoder only; the release has no classification head.
Braindecode initializes the head on load, so it needs fine-tuning, as in the
paper's protocol (`scripts/finetune_neuroprobe.sh`). The check above covers
float32 CPU encoder features, not downstream accuracy, GPU kernels or mixed
precision.

## Citation

```bibtex
@article{han2025diver,
    title={DIVER-1: Scaling intracranial EEG foundation models for transferable representations},
    author={Han, Danny Dongyeop and Gwon, Yonghyeon and Lee, Ahhyun Lucy and Lee, Taeyang and Lee, Seong Jin and Choi, Jubin and Lee, Sebin and Bang, Jihyun and Lee, Seungju and Park, David Keetae and Yoo, Shinjae and Chung, Chun Kee and Cha, Jiook},
    journal={arXiv preprint arXiv:2512.19097},
    year={2025}
}
```

## License

The weights are released by the DIVER Project 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](https://doi.org/10.5281/zenodo.17699192),
and the original model and datasets cited above.

```bibtex
@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},
}
```