EEG encoder (eegfm-encoder-100m)

A 100M-parameter EEG encoder pretrained self-supervised: JEPA-style masked latent prediction with an EMA teacher, optimised with Muon. It turns a window of scalp EEG (any channel subset of the 10-20 system; bipolar derivations are named "A-B") into one 768-dimensional feature per channel plus a pooled feature. The frozen features feed small task heads.

Files

File What
dp8s_100m_20k_f16.npz encoder, f16 weights, 171 MB
dp8s_100m_20k_i8.npz encoder, i8 weights, 86 MB

The .npz bundles are what the WebAssembly runtime reads (stored members, JSON meta). They hold only the encoder's inference path. The bundles differ in weight precision:

  • f32: full precision.
  • f16: matrices in float16.
  • i8: matrices quantised per output row with float32 scales.

The agreement with the full-precision PyTorch features is listed below.

(equivalence numbers not available yet)

Architecture

  1. Input. Input is EEG at 200 Hz in units of 100 ยตV, after a 60 Hz notch and a 0.3โ€“75 Hz band-pass. It is compressed with asinh(x / 0.1).
  2. Frame encoder. Each channel is cut into 20 ms frames (4 samples). The frames pass a 4-block 1-D ConvNeXt encoder (width 128).
  3. Tokens. Frames are mean-pooled into fixed 320 ms chunks (16 frames). A chunk gets a learned embedding of its channel name and a Fourier embedding of its duration.
  4. Transformer. All chunks of all channels go through a 12-layer pre-norm Transformer (width 768, 12 heads, QK-norm, SwiGLU), with RoPE on chunk centre time. A 19-channel, 10-s window is 608 tokens.
  5. Outputs. Each channel's feature is the mean of its chunk tokens, and the pooled feature is the mean over channels.

Training data

The encoder was pretrained on the Temple University Hospital EEG corpus (TUH EEG), without labels. We thank the Neural Engineering Data Consortium; cite: Obeid I, Picone J. The Temple University Hospital EEG Data Corpus. Frontiers in Neuroscience 10:196 (2016). This repository contains no TUH recordings and no material derived from individual TUH recordings.

Evaluation (frozen features, linear heads)

Task Dataset Test score n
adftd ADFTD, OpenNeuro ds004504 n/a ? test windows
chbmit CHB-MIT Scalp EEG (PhysioNet) n/a ? test windows
hmc HMC Sleep Staging (PhysioNet) n/a ? test windows
hms6 HMS Harmful Brain Activity (Kaggle) n/a ? test windows
hms_seizure HMS Harmful Brain Activity (Kaggle) n/a ? test windows
nmt_abnormal NMT-Events (Zenodo) n/a ? test windows
nmt_event NMT-Events (Zenodo) n/a ? test windows
nmt_event_type NMT-Events (Zenodo) n/a ? test windows
physionet_mi EEG Motor Movement/Imagery (PhysioNet) n/a ? test windows
siena Siena Scalp EEG (PhysioNet) n/a ? test windows

Intended use and limits

  • Intended use: research on EEG representation learning, feature extraction for downstream EEG tasks, and education.
  • Not a medical device. Do not use it for diagnosis, triage, treatment or any clinical decision. Scores come from retrospective benchmarks and do not show clinical validity.
  • Generalisation is unproven for montages, amplifiers, populations and conditions unlike the pretraining data. Pretraining was on adult clinical recordings from one hospital system.

Responsible-use terms

You may use, modify and redistribute these weights for research and commercial purposes, provided you do not use them, or anything built on them:

  • to re-identify individuals from EEG or to link EEG to identities;
  • for surveillance, profiling, or inferring sensitive attributes of people without their informed consent;
  • as the sole basis of a clinical decision;
  • in violation of applicable law or of the terms of the data the model was trained or evaluated on.

Redistributions must keep these terms and the attribution above.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using mkieffer/eegfm-encoder-100m 1