File size: 3,574 Bytes
dea9139 c21b8c5 dea9139 c21b8c5 dea9139 c21b8c5 dea9139 c21b8c5 dea9139 c21b8c5 dea9139 c21b8c5 dea9139 | 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 | ---
license: apache-2.0
library_name: braindecode
base_model: MannasAI/pratibha-2
tags:
- braindecode
- pytorch
- safetensors
- eeg
- pratibha-2
- manas-2
- masked-autoencoder
- foundation-model
datasets:
- TUH
- I-CARE
---
# PRATIBHA-2 (pretrained encoder)
Weights of PRATIBHA-2, formerly MANAS-2 (Kulkarni et al., 2026), a dense-attention EEG
foundation model pretrained with Raw-Band Hybrid masked autoencoding and Constrained
Reconstruction, for
[`braindecode.models.Pratibha2`](https://braindecode.org/stable/generated/braindecode.models.Pratibha2.html).
They are the encoder of [MannasAI/pratibha-2](https://huggingface.co/MannasAI/pratibha-2)
(revision `863edc9`), converted to braindecode's parameter names (see "Changes from the
original release"). The class is added in braindecode 2.1.
```python
from braindecode.models import Pratibha2
model = Pratibha2.from_pretrained(
"braindecode/pratibha2-pretrained",
chs_info=raw.info["chs"], # any montage the position table places
n_outputs=4,
n_times=1000,
)
features = model(x, return_features=True)["features"] # (batch, 512)
```
The classification head (`final_layer`) is not part of the release: `from_pretrained`
builds one for your `n_outputs` (`n_outputs=2` in `config.json`). Fine-tune or linear-probe
before use. `config.json` stores a 19-channel 10-20 montage; pass your own `chs_info`.
## Intended input
- EEG sampled at **200 Hz**, windows of at least 200 samples (1 s patches, 0.1 s overlap).
- Channels are placed by name in the pretraining electrode table (REVE's position bank
plus PRATIBHA-2's own `AFZ` and `IZ`); aliases such as `T3`, `EEG Fp1-REF` and bipolar
`A-B` pairs are resolved by braindecode.
- Each channel is z-scored within each window inside the model, so volts and microvolts
give the same output.
## Training data
Unlabeled clinical EEG from TUH EEG, I-CARE and the authors' internal sources (private:
not released, not in `datasets:`), as described in the original model card and the paper.
## Changes from the original release
Converted from `model.safetensors` of MannasAI/pratibha-2 at revision
`863edc940d82a02744776a7820641bf1bc32310b`:
- parameter names renamed to braindecode's (`encoder.layers.N.ffn` -> `blocks.N.mlp`,
`attn.qkv_proj` -> `attn.qkv`, and so on), with no `encoder.` prefix: `Pratibha2` holds
`patch_embed`, `pos_enc`, `blocks` and `final_norm` itself;
- each fused feed-forward input projection `ffn.in_proj` split into its value rows
(`mlp.fc1`) and gate rows (`mlp.fc_gate`);
- the constant `pos_enc.freq_matrix` dropped (the model rebuilds it);
- no head: the original has none.
Revision `dea9139` of this repository kept the `encoder.` prefix and stored an untrained
head (PyTorch's default init under `torch.manual_seed(0)`); its `convert.py` did the first
three steps. The `convert.py` here renames that revision's keys: `encoder.<name>` ->
`<name>`, `final_layer.*` dropped.
No value was changed: every tensor is the one of revision `dea9139` bit for bit, and
braindecode's `Pratibha2` with these weights gives the features and tokens of the original
weights bit for bit on CPU in float32.
## License and citation
Apache-2.0, as the original release (see `LICENSE`). Weights by MannasAI; please cite:
```bibtex
@article{kulkarni2026manas2,
title = {MANAS-2: Constrained Reconstruction for EEG Foundation Models},
author = {Kulkarni, A. and Mishra, A. R. and Jain, M. and Runwal, P. and Saini, L. and Panwar, S. and Singh, S.},
journal = {arXiv preprint arXiv:2609.13717},
year = {2026}
}
```
|