pratibha-2 / README.md
mannasAI-labs's picture
Update README.md
863edc9 verified
|
Raw History Blame Contribute Delete
5.7 kB
---
library_name: transformers
pipeline_tag: feature-extraction
license: apache-2.0
language:
- en
tags:
- eeg
- neuroscience
- foundation-model
- masked-autoencoder
- representation-learning
- pytorch
- custom_code
---
# PRATIBHA-2, formerly known as "MANAS-2"
PRATIBHA-2 (also called MANAS-2) is a transformer-based foundation model for EEG representation learning, developed by [MannasAI](https://huggingface.co/MannasAI). It combines **Raw-Band Hybrid (RBH)** masked autoencoding with **Constrained Reconstruction (ConRec)** to learn temporal and spectral features from EEG.
## Model Details
PRATIBHA-2 has **92.8M parameters**, 22 transformer layers, and 512-dimensional embeddings. It processes EEG sampled at **200 Hz** using one-second patches with a 0.1-second overlap and spatiotemporal positional encoding. Channel count and signal length can vary.
During pretraining, RBH uses waveform and spectral reconstruction, while ConRec regularizes local RMS-energy continuity in reconstructed waveforms. Pretraining uses unlabeled clinical EEG from internal sources, TUH EEG, and I-CARE. This release contains the encoder for feature extraction and fine-tuning.
**Paper:** [MANAS-2: Constrained Reconstruction for EEG Foundation Models](https://arxiv.org/abs/2609.13717)
## Uses
Install the dependencies:
```bash
pip install "torch>=2.2" "transformers>=4.57,<5" "safetensors>=0.4"
```
Extract embeddings using the included electrode-position lookup:
```python
import torch
from transformers import AutoModel
model = AutoModel.from_pretrained(
"MannasAI/MANAS-2", trust_remote_code=True,
).eval()
# Example: 10 seconds of EEG at 200 Hz.
electrode_names = ["Fz", "Cz", "Pz"]
eeg = torch.randn(1, 3, 2000) # [batch, channels, samples]
eeg = (eeg - eeg.mean(-1, keepdim=True)) / (
eeg.std(-1, keepdim=True, correction=1) + 1e-6
)
positions = model.get_channel_positions(electrode_names)
positions = positions.unsqueeze(0).expand(eeg.size(0), -1, -1)
with torch.inference_mode():
features = model(eeg, positions) # [1, 11, 3, 512]
embedding = features.mean(dim=(1, 2)) # [1, 512]
```
For real EEG, filter and resample to 200 Hz, then normalize each channel within each window as above. Electrode names must match the signal's channel order; the lookup returns coordinates in centimeters. The model expects preprocessed inputs and returns **[batch, patches, channels, 512]** features.
## Metrics
PRATIBHA-2 has been evaluated using [NeuralBench](https://github.com/facebookresearch/neuroai/tree/main/neuralbench-repo). It outperforms all open source FMs currently included in the benchmark (as of 15/11/26), with an average rank across 34 tasks (NeuralBench's "core" tasks set) of 3.94.
**Average Ranks** (lower is better)
| Foundation model | Average rank ↓ |
|---|---:|
| **Pratibha-2** | **3.94** |
| LaBraM | 4.94 |
| REVE | 5.00 |
| LUNA | 6.47 |
| CBraMod | 6.76 |
| BENDR | 10.71 |
| BIOT | 12.32 |
**Per-task performance**
| Category | Task | Metric | Pratibha-2 |
|---|---|---|---:|
| Cognitive | Image | Top-5 accuracy (%) | 86.12 ± 1.64 |
| Cognitive | Sentence | Top-5 accuracy (%) | 12.69 ± 0.60 |
| Cognitive | Typing | Balanced accuracy (%) | 4.66 ± 0.27 |
| Cognitive | Word | Top-5 accuracy (%) | 16.59 ± 0.83 |
| BCI | c-VEP | Balanced accuracy (%) | 87.06 ± 0.73 |
| BCI | Mental imagery | Balanced accuracy (%) | 27.54 ± 1.27 |
| BCI | Motor execution | Balanced accuracy (%) | 55.12 ± 2.40 |
| BCI | Motor imagery | Balanced accuracy (%) | 66.81 ± 0.20 |
| BCI | P300 | Balanced accuracy (%) | 66.00 ± 0.38 |
| BCI | SSVEP | Balanced accuracy (%) | 92.96 ± 0.71 |
| Evoked Responses | Audiovisual | Balanced accuracy (%) | 43.69 ± 6.19 |
| Evoked Responses | ERN | Balanced accuracy (%) | 78.14 ± 3.26 |
| Evoked Responses | LRP | Balanced accuracy (%) | 78.69 ± 1.13 |
| Evoked Responses | MMN | Balanced accuracy (%) | 58.05 ± 0.55 |
| Evoked Responses | N170 | Balanced accuracy (%) | 71.35 ± 2.82 |
| Evoked Responses | N2pc | Balanced accuracy (%) | 63.96 ± 0.67 |
| Evoked Responses | N400 | Balanced accuracy (%) | 64.83 ± 1.52 |
| Clinical | Clinical event | Macro F1 | 0.562 ± 0.024 |
| Clinical | Dementia | Balanced accuracy (%) | 42.34 ± 6.03 |
| Clinical | Depression | Balanced accuracy (%) | 88.37 ± 1.18 |
| Clinical | Parkinson’s | Balanced accuracy (%) | 69.96 ± 0.49 |
| Clinical | Pathology | Balanced accuracy (%) | 79.43 ± 0.79 |
| Clinical | Schizophrenia | Balanced accuracy (%) | 67.27 ± 4.51 |
| Clinical | Seizure | Balanced accuracy (%) | 70.89 ± 0.39 |
| Internal State | **Emotion** | **Balanced accuracy (%)** | **30.21 ± 0.18** |
| Internal State | Mental arithmetic | Balanced accuracy (%) | 73.54 ± 2.63 |
| Internal State | Workload | Balanced accuracy (%) | 70.09 ± 1.80 |
| Sleep | Sleep arousal | Balanced accuracy (%) | 58.02 ± 0.72 |
| Sleep | Sleep stage | Balanced accuracy (%) | 74.23 ± 0.12 |
| Phenotyping | Age | Pearson R | 0.706 ± 0.012 |
| Phenotyping | Psychopathology | Pearson R | 0.089 ± 0.015 |
| Phenotyping | Sex | Balanced accuracy (%) | 91.91 ± 0.38 |
| Misc | Artifact | Macro F1 | 0.550 ± 0.006 |
| Misc | Reaction time | Pearson R | 0.562 ± 0.004 |
## License
Model weights and code are released under [Apache-2.0](LICENSE).
## Citation
```bibtex
@misc{kulkarni2026PRATIBHA2,
title={MANAS-2: Constrained Reconstruction for EEG Foundation Models},
author={Arvasu Kulkarni and Aditya Ray Mishra and Mahir Jain and Parshva Runwal and Lakshya Saini and Siddharth Panwar and Sandeep Singh},
year={2026},
eprint={2609.13717},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2609.13717}
}
```