PyTorch
Safetensors
braindecode
ieeg
seeg
mapa
mapa-pretrained / README.md
bruAristimunha's picture
Card: list the training data (datasets:, base_model:) and add a Training data section
6602087 verified
|
Raw History Blame Contribute Delete
3.87 kB
---
license: apache-2.0
library_name: braindecode
tags:
- braindecode
- pytorch
- safetensors
- ieeg
- seeg
- mapa
datasets:
- nm000253
---
# mapa-pretrained
Weights of the MAPA encoder `mapa_vits384` (d_model 384, 12 blocks, 21,335,424
parameters), for
[`braindecode.models.MAPA`](https://braindecode.org/stable/generated/braindecode.models.MAPA.html),
converted from the authors' release. The classification head is not pretrained (seeded random init); fine-tune or linear-probe before use.
```python
from braindecode.models import MAPA
model = MAPA.from_pretrained("braindecode/mapa-pretrained", n_outputs=2, chs_info=raw.info["chs"], regions=regions)
```
Channel names are read as clinical contact labels (`"LA7"` is contact 7 of
array `LA`); `regions` are DKT names from `braindecode.models.mapa.MAPA_DKT_REGIONS`.
The montage in `config.json` (4 channels, no regions) is only a default. Input is
expected at 2048 Hz, or as the session-normalized spectrogram with
`normalization="session"`, `sfreq=32`.
## Source and conversion
- Source: [bentang18/MAPA](https://huggingface.co/bentang18/MAPA) at revision
`988efbf31a7d1f38533b848c993a719d6f900b1f`, file `mapa_vits384.pt`
(sha256 `2d236089a2f1a3cc2827e3f150c4a2ba14c51bbfaf0ce0888f84b92a6eb25a7a`),
Apache-2.0. The authors' `NOTICE` is copied in this repository.
- `convert_mapa_checkpoint.py` (in this repository) renames the feed-forward
`encoder.blocks.{i}.mlp.fc1`/`fc2` to `mlp.0`/`mlp.3` (braindecode's
`FeedForwardBlock`), keeps every other key, and writes `config.json`,
`model.safetensors` and `pytorch_model.bin` with `save_pretrained`.
- The converted model's outputs equal braindecode's loading of the original
file (max-abs difference 0.0).
- Requires a braindecode version newer than 1.8.1.
- The ablation checkpoints (`no_region`, `no_relpos`, `no_priors`) are not
re-hosted; they remain at the source repository.
<!-- 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 |
|---|---|---|---|
| [`nm000253`](https://nemar.org/dataset/nm000253) | [Brain Treebank: large-scale intracranial recordings from naturalistic language stimuli (Wang et al., NeurIPS 2024 D&B; 10 subjects, 26 movie sessions, ~43.5 h sEEG)](https://braintreebank.dev/) | pretraining | iEEG |
- masked autoencoding; 13 of 26 sessions from 7 subjects, 27.87 h; subjects 7 and 10 (and subject 5) excluded from pretraining; Neuroprobe Lite test sessions held out
- Sources: arXiv:2609.13507 p.2; arXiv:2609.13507 Appendix A, Table 3; https://huggingface.co/bentang18/MAPA README, Training data.
## Citation
```bibtex
@misc{tang2026pretraining,
title = {Pretraining for Sample-Efficient Neural Interfaces},
author = {Ben Tang and Zachary Spalding and Gregory B. Cogan},
year = {2026},
eprint = {2609.13507},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2609.13507},
}
@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
Apache-2.0, as the original MAPA release. The checkpoint was pretrained on the
Brain Treebank dataset (CC BY 4.0, https://braintreebank.dev/); see `NOTICE`.