File size: 2,853 Bytes
822de6d
c61906f
 
822de6d
c61906f
 
 
 
 
 
 
 
 
 
822de6d
c61906f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
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
---

# MANAS-2

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

MANAS-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.

## License

Model weights and code are released under [Apache-2.0](LICENSE).

## Citation

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