OpView V2
OpView is a set of five EEG encoders. Each encoder reads the signal through its own fixed, parameter-free operator, which puts one kind of structure into explicit coordinates, and each was pretrained independently with its own self-supervised objective. The encoders are used frozen, as feature extractors: a fixed count sketch turns each encoder's token states into one feature vector per window and view.
This folder holds the released model: the five views of checkpoint set 30k (Waveform masked reconstruction, Dynamics future-change prediction, Frequency, Relation and Projective autoencoders).
| View | What the operator makes explicit | Encoder input | Pretraining objective |
|---|---|---|---|
| Waveform | the time course of each channel | the window divided by its visible RMS, 1-s patches of 125-ms micro tokens | 25 % of 250-ms channel atoms hidden; whitened spectral error on the hidden samples |
| Dynamics | how the signal changes, causally | the level and 8 causal lag differences (1 to 128 samples), 62.5-ms tokens | predict the future change x[t+h] − x[t] at h = 62.5, 125 and 250 ms |
| Frequency | spectral power of each channel | standardised log power in 1-Hz groups up to 75 Hz of 1, 2 and 4-s atoms (no phase) | autoencoder of the log power |
| Relation | coupling between channels | log-shape and log-scale of reference-free anchor cross-spectra, 6 bands per atom | autoencoder of the cross-spectral chart |
| Projective | the scalp topography over time | degree 1–3 spherical-harmonic projector and log RMS of 62.5-ms tokens | autoencoder of the projector tokens |
Waveform, Dynamics, Relation and Projective also carry two small training-only terms (band-power retention and
a slot auxiliary), whose heads are in the checkpoints but are not part of the features. The code is described
view by view in opview/models/README.md and opview/operators/README.md of the code repository.
Intended use
A research feature extractor for EEG decoding: frozen features for linear probes or other light readouts, comparisons between views, and fine-tuning experiments (the Dynamics encoder has been fine-tuned end to end through the same readout).
Out of scope: OpView is not a medical device. It was not built, validated or approved for diagnosis, monitoring, treatment or any other clinical decision, and must not be used for one.
How to use
Install the opview package from the code in the supplementary material of the paper (pip install -e . in its code folder; it includes this loader, opview/hub.py) and pip install huggingface_hub safetensors.
from opview.hub import from_pretrained
model = from_pretrained("Anony-0x3f/opview-v2-30k") # a folder written by scripts/export_hf.py, or a repo id
features = model.features("dynamics", x_uv, channel_names, sample_rate=256) # float32 [B, k]
encoder = model.encoders["dynamics"] # the frozen torch module
x_uv is a NumPy array [B, C, T] (or [C, T]) in microvolts. What the code requires:
- Sampling rate: 256 Hz.
featuresresamples other rates with the polyphase resampler the pretraining data went through (opview.data.preprocess.resample_recording); resampling whole recordings before cutting windows avoids edge effects. - Channels: names of the 10-20/10-05 system as MNE's
standard_1005montage knows them (case-insensitive;EEGprefixes and-REF,-M1, ... suffixes are dropped). Each name becomes its template direction times 0.085 m. Bipolar derivations have no single position: passxyz([C, 3], metres on the 0.085 m sphere) instead ofchannel_names. - Window length: Waveform and Frequency need T a multiple of 256 samples, Dynamics a multiple of 16 above 128, Projective a multiple of 16; Relation needs a 1, 2 or 4-s support whose half-overlapping atoms tile the window. A 4-s window (1024 samples) suits every view.
- Montage: Relation needs at least 3 channels. It reads min(3, C − 1) anchors at 1 s, min(9, C − 1) at 2 s
and min(14, C − 1) at 4 s, and needs the statistics table of each (support, anchors) it reads. This release
holds (1, 2), (1, 3), (2, 2), (2, 4), (2, 7), (2, 9), (4, 2), (4, 4), (4, 7), (4, 11), (4, 13), (4, 14) (support in seconds, anchors;
relation/config.json); a montage that needs another table raisesKeyError, andscripts/fit_relation_tables.pyof the code repository fits one from the pretraining stores. Projective needs at least 4 channels in distinct directions. - Preprocessing:
featuresdoes not filter or re-reference. The pretraining recordings were band-passed 0.1–75 Hz with 50 and 60 Hz notches (opview.data.preprocess.preprocess_recording); bad channels were repaired by spherical-spline interpolation and some sources were average-referenced. In the evaluation, BCI IV-2a, BNCI2015001 and Nakanishi2015 were average-referenced and rescaled to their recorded amplitude for Waveform, Dynamics and Frequency.
features is the trained (T) arm of scripts/extract_features.py with the readout settings stored in this
folder's config.json (readout, the sketch section of the evaluation config). The random-initialisation and
operator arms, the evaluation datasets and the Compass probe are in the code repository.
Architecture and size
Every trunk has width 192 and 8 attention heads. Parameter counts are those of the checkpoints, training-only heads included.
| View | Objective | Parameters | Feature width | Weights |
|---|---|---|---|---|
| Waveform | masked waveform (25% of 250-ms channel atoms hidden, hidden-only loss) | 4,428,519 | 32,768 | 17.7 MB |
| Dynamics | future-change prediction | 4,359,792 | 32,768 | 17.5 MB |
| Frequency | autoencoder (mask 0%) | 3,739,789 | 8,192 | 15.0 MB |
| Relation | autoencoder (mask 0%) | 5,015,494 | 24,576 | 20.1 MB |
| Projective | autoencoder (mask 0%) | 4,287,126 | 8,192 | 17.2 MB |
Total: 21,830,720 parameters. Tensors are stored as safetensors. Files:
| File | Size |
|---|---|
LICENSE | 1.1 kB |
dynamics/calibration.npz | 20.7 kB |
dynamics/config.json | 29.5 kB |
dynamics/model.safetensors | 17.5 MB |
frequency/calibration.npz | 33.0 kB |
frequency/config.json | 1.6 kB |
frequency/model.safetensors | 15.0 MB |
projective/calibration.npz | 19.7 kB |
projective/config.json | 1.2 kB |
projective/model.safetensors | 17.2 MB |
relation/calibration.npz | 98.3 kB |
relation/config.json | 15.7 kB |
relation/model.safetensors | 20.1 MB |
waveform/calibration.npz | 28.0 kB |
waveform/config.json | 0.9 kB |
waveform/model.safetensors | 17.7 MB |
Pretraining data
61 public EEG sources (55 continuous recording stores and 6 signal banks; the list, where each is read from and
each view's share are in opview/data/corpora/pretraining.json and docs/data.md). Waveform, Dynamics and
Frequency read all 61 (2,320.7 training hours), Relation 60 (2,311.7 h; one source has no electrode positions) and
Projective 59 (1,519.0 h). Only the pretraining subjects of each source were used (70/15/15 subject splits per
study). No source of the 13 evaluation datasets of EEG-FM-Compass is in the corpus.
The licences and terms of use of the sources are not documented in the code repository; each source keeps its own. Check them before using these weights where the terms of a source matter.
Training procedure
Each view was trained alone for 30,000 updates of 32 windows (seed 0). Every update mixes sources in
single-source micro-batches whose losses are weighted by their signal time. AdamW with learning rate 4e-4 and
weight decay 0.05, linear warm-up over 1,500 updates and a cosine schedule to zero, gradient clipping at 1.0,
bf16 autocast on a GPU. The exact configuration of each view is resolved_config in <view>/config.json.
Evaluation
In the paper the encoders are evaluated frozen with a closed-form ridge readout, leave one subject out, on nine datasets of EEG-FM-Compass (131 held-out subjects, three seeds), against two controls read the same way: the same architecture at random initialisation and the operator alone. Differences in points of balanced accuracy, pooled over the held-out subjects, with the paired Wilcoxon p in parentheses; "aligned" standardises each subject's features over that subject's unlabelled trials:
| Pretrained − random init., aligned | Pretrained − operator, aligned | Pretrained − random init. | Pretrained − operator | |
|---|---|---|---|---|
| Model of five views | +1.3 (1e-4) | +2.2 (7e-6) | +1.0 (0.018) | +2.6 (4e-5) |
| Dynamics | +7.8 (2e-15) | +9.2 (1e-11) | +5.0 (6e-7) | +10.2 (3e-11) |
| Waveform | +4.5 (9e-5) | +7.8 (1e-4) | +1.6 (0.14) | +7.1 (3e-5) |
| Projective | +4.4 (4e-9) | +0.6 (0.28) | +2.9 (1e-5) | +0.6 (0.14) |
| Frequency | −0.8 (0.41) | −1.1 (0.20) | −0.6 (0.54) | −2.3 (3e-4) |
| Relation | −0.4 (0.13) | +0.4 (0.21) | −0.4 (0.61) | +0.6 (0.79) |
The rows are those of checkpoint set 30k (Frequency, Relation and Projective as autoencoders); the masked
variants, the results per dataset, the comparison with released encoders and the within-subject protocol are in
the paper. Full fine-tuning of the Dynamics encoder with the benchmark's recipe (three seeds) gives pretrained
minus random initialisation between −1.8 and +0.9 points on the nine datasets, none significant at p < 0.05
without alignment.
Limitations and bias
- Pretraining helps unevenly. Under a linear readout the Dynamics, Waveform and Projective encoders gain over the same architecture at random initialisation; the Frequency and Relation encoders do not, and they do not gain over their operators (table above).
- The features are wide (32,768 columns for Waveform and Dynamics, 24,576 for Relation, 8,192 for Frequency and Projective).
- Montage coverage: positions come from template directions of the 10-20/10-05 names, not measured positions. Relation and Projective need several channels; bipolar and few-channel montages are read partly or not at all.
- The pretraining corpus is public research EEG, mostly from laboratory paradigms (motor imagery, ERP, SSVEP, resting state, sleep, emotion, among others). The age, sex, health and recording hardware of its participants are not summarised in the code repository; groups and systems that research datasets rarely include may be under-represented, and performance on them is unknown.
- Benchmark results are cross-subject averages over a few small datasets and do not predict performance for any individual.
Licence
MIT (LICENSE). The pretraining data keep their own licences (see above).
Citation
@misc{opview2026,
title = {Learning EEG Structure in Its Native Coordinates: Operator-Preconditioned Multi-View Pretraining},
author = {Anonymous authors},
note = {Under double-blind review},
year = {2026}
}
Exported from checkpoint set 30k with code commit ab6b2610539c3f70cf99d3d4f6d3f907ce22fd2b.