EEG Encoder 41ch-120Hz (raw)
foundation for brain signal analysis
2 min readupdated
A new 114-million-parameter model reads raw electroencephalograms directly by splitting the signal into short chunks. It was trained on 5,996 hours of data from public datasets without HuBERT-style labels (self-supervised learning method for language and audio models based on masking). The model produces vector representations (embeddings) for each fragment, which can be used for classification or regression. It outperforms many larger counterparts on benchmarks and will be useful for researchers in brain-computer interfaces and brain signal analysis.
Key features
- High accuracy: average score of 0.717 across 8 standard tasks in frozen feature mode.
- Raw data: works with unprocessed signals as patterns without an intermediate codec.
- Architecture: 16 transformer layers with a hidden dimension of 768 and 12 attention heads.
- Electrode sensitivity: sensitive to missing montage channels unlike its codec-based counterparts.
What you can do
- EEG research: extract vector representations of brain activity for neurobiological tasks.
- Classifier fine-tuning: use AutoModelForSequenceClassification for BCI (brain-computer interface) tasks.
- State analysis: evaluate age, gender, and cognitive tasks from electroencephalogram recordings.
Example
import mne
import torch
from transformers import AutoFeatureExtractor, AutoModel
repo = "Neuralace-AI/eeg-encoder-41ch-120hz-raw"
fe = AutoFeatureExtractor.from_pretrained(repo, trust_remote_code=True)
model = AutoModel.from_pretrained(repo, trust_remote_code=True).eval()
raw = mne.io.read_raw_edf(mne.datasets.eegbci.load_data(1, [4])[0], preload=True)
inputs = fe(raw, return_tensors="pt")
with torch.no_grad():
out = model(inputs["input_values"][..., : 120 * 10], output_hidden_states=True)
feats = out.last_hidden_state
Read more
DetailsBenchmarks: average score of 0.752 with full fine-tuning and 0.730 on people not involved in pre-training.
Requirements: standard hardware for inference of 114M parameter transformers.
Limitations: not a medical device, EEG data is confidential.
License: CC BY-NC 4.0 (non-commercial use).










Comments