EEG representation · Core ML
CBraMod · Embeddings
Five seconds of EEG, as a vector.
The pretrained CBraMod backbone as a native Core ML embedder. A 14-channel, five-second window in; a 14,000-dimensional embedding out.
- Input
- [1, 14, 1000] at 200 Hz
- Output
- [1, 14000]
- Precision
- fp32
- Parity
- Worst rel-L2 1.3 × 10⁻⁵
- License
- BSD-3-Clause
- Updated
- 19 Aug 2026
Overview
CBraMod is a foundation model for EEG that attends across channels and across time separately: criss-cross attention. This package is its pretrained backbone with the classification head removed, converted to Core ML.
A five-second, 14-channel window becomes a 14,000-dimensional embedding for any downstream decoder you train, on the device that records it.
Fig. 01 · Shapes
Fourteen channels, five patches, two hundred dimensions
Each one-second patch becomes a 200-dimensional token. Attention runs across channels and across time separately, then the tokens are flattened.
[1, 14, 1000]
14 channels × 5 s at 200 Hz
14 × 5 tokens
Criss-cross attention: across channels · across time
[1, 14000]
14 × 5 × 200 = 14,000
Validation
| Check | Result |
|---|---|
| Embedding parity vs PyTorch, real EEG | Worst relative L2 1.3 × 10⁻⁵ |
| Motor-imagery decoding on Core ML embeddings | Identical to PyTorch |
Numerical parity is necessary, not sufficient, so the package was also checked at the task level: a motor-imagery decoder trained on its embeddings reaches the same decisions as one trained on PyTorch embeddings.
Input contract
- Package
CBraModEmbedder.mlpackage- Input
eeg, float32 [1, 14, 1000]- Preprocessing
- Average reference and global z-score at 256 Hz, then resample to 200 Hz
- Output
embedding, float32 [1, 14000]
Know the boundaries
- Fixed input shape: 14 channels and 1,000 samples. Channel count and preprocessing must match.
- Embeddings are features. They are not calibrated intent probabilities, and a trained head is required for any decision.
- Not clinically validated.
About this page
Summarized from the public model card and its published files. Repository updated 19 Aug 2026; reviewed 26 Sep 2026. The Hugging Face card is the source of truth for licenses and current details.
Upstream: CBraMod / braindecode