SAMBA
Mamba-based EEG representation models
1 min read
SAMBA is a family of feature-extraction models for EEG (electroencephalogram) data, built on the Differential Mamba architecture and coordinate-aware spatial embeddings. The models handle variable input window lengths and electrode configurations at a fixed 128 Hz sampling rate. They are built for researchers and developers working on brain signal analysis, linear probing, or task-specific encoder fine-tuning.
Key features
- Two model variants: SAMBA-2s (2-second window) and SAMBA-100s (100-second window)
- Compact footprint: each model has 1.06 million parameters
- Support for various electrode layouts and variable input lengths
- Trained on diverse datasets, including Emotiv, HBN, Muse, DICE, and TUAB
What you can do
- Extract vector embeddings from raw EEG signals for downstream analysis
- Use pooled features for linear probing or fine-tuning the encoder
- Integrate the models into Python neurophysiological data processing pipelines
Example
from pathlib import Path
import torch
from huggingface_hub import snapshot_download
from samba_eeg import SambaModel
variant = "SAMBA-2s" # или "SAMBA-100s"
folder = snapshot_download(
"Jay1208/SAMBA",
allow_patterns=[f"{variant}/*"],
)
model = SambaModel.from_pretrained(Path(folder) / variant).cuda().eval()Read more
DetailsRequires a CUDA-compatible system.
Data sampling rate: 128 Hz.
Signal shape: [batch, channels, samples].
Paper: arXiv:2511.18571.










Comments