↑↓ move↵ open[] previous / next lesson? all shortcuts
Appearance
Theme
Type size
Reading

Focus mode hides the sidebars. Press f to toggle it anywhere.

Keyboard shortcuts
/
Search
[ ]
Previous / next lesson
t
Jump to the table of contents
r
Review queue
f
Focus mode
?
This panel
Explainer12 min

Deep learning for EEG

EEGNet and its relatives, why they are small, what data augmentation does, what foundation models promise, and the honest benchmark result that deep networks often tie the Riemannian baseline on EEG-sized data.

AssumesClassification done honestlySpineDecoding / signal processing / ML
On this page12 min
  1. Why EEGNet is shaped the way it is
  2. What the benchmarks say
  3. Where deep learning does win
  4. Practical rules

Deep learning transformed vision and language because those fields have millions of examples. A dataset has a few hundred trials per person. That single fact explains most of what you need to know: the networks that work on are tiny, they are designed to bake in what we already know about the signal, and on fair benchmarks they usually tie the best classical methods. They win clearly in two places: when data are large (sleep staging, , intracortical speech), and when the features are unknown.

Figure 1. The whole argument of this page, on one rail. Everything that makes deep learning work elsewhere is a consequence of the top of this scale, and a motor imagery dataset sits at the bottom of it.

Why EEGNet is shaped the way it is

(Lawhern et al., 2018EEGNet, a compact convolutional neural network for EEG-based brain-computer interfacesLawhern, Solon, Waytowich, et al. · J. Neural Eng. · 2018A two-thousand-parameter network that mirrors the classical pipeline, and the first deep model to try on your data.) has about two thousand parameters, which is smaller than a single layer of most image networks. Its layers mirror the classical pipeline. First a temporal convolution: a set of learned , one per feature map. Then a depthwise spatial convolution: for each learned , a learned spatial across channels, which is exactly what produces. Then a separable convolution to combine and summarize over time, and a small . It is plus band-pass plus , made learnable end to end. That is why it works with a few hundred trials and why its can be plotted and interpreted.

ShallowConvNet and DeepConvNet (Schirrmeister et al., 2017Deep learning with convolutional neural networks for EEG decoding and visualizationSchirrmeister, Springenberg, Fiederer, et al. · Hum. Brain Mapp. · 2017ShallowConvNet and DeepConvNet, the standard baselines next to EEGNet, with filter visualizations.) are the other standard baselines, similar in spirit. All three are in with the datasets and training loops built in.

What the benchmarks say

runs across dozens of public datasets with fixed, fair splits. The recurring result: within-subject, the Riemannian tangent-space and -class networks are within a few points of each other on , , and , and the network’s small advantage often disappears when hyperparameters are tuned honestly. Cross-subject, both are poor and the network sometimes does a little better because it can be trained on everyone at once. If a paper claims a large deep-learning on a small dataset, the first question is the split.

Predict before you look

A paper trains a transformer on 200 motor imagery trials and reports 94 percent, versus 72 percent for CSP + LDA. What is the most likely explanation?

Leakage or tuning on the test set. A model with hundreds of thousands of parameters trained on 200 trials cannot generalize by twenty points better than a well-set-up linear method; it can memorize. When results like this are reproduced with honest splits the gap collapses. Project F is where you find this out for yourself.

Where deep learning does win

Large data. Sleep staging has hundreds of thousands of labelled in public datasets; small CNNs reach expert-level agreement and beat feature engineering. on , similarly. Intracortical speech decoding, where a recurrent network maps hundreds of channels of neural features to phonemes, is the most dramatic recent result in the field and is only possible with deep models trained on hours of data from one person.

Unknown features. Where nobody knows what to compute, a network that learns its own can find it. The price is interpretability, which for a medical device is not optional.

Transfer. Pretrain on many people or many datasets, fine-tune on the new person with a few minutes of data. This is where “foundation models” aim: large self-supervised models trained on thousands of hours of heterogeneous , fine-tuned per task. Early results are promising for clinical tasks and modest for paradigms. Watch this space; do not assume it has arrived.

Practical rules

Use ; do not write your own training loop for a first project. Compare every network against the Riemannian baseline on the identical split, in the same script, or the comparison is not real. Augment: time shifts, channel dropout, amplitude scaling, and mixing trials all help small datasets. Report cross-session and cross-subject numbers, because networks overfit within-session more than linear models do. Plot the learned temporal and spatial ; if they do not look like band-passes over motor cortex, ask what the network learned instead (often eye movements).

Deep dive Self-supervised pretraining for EEG 3 min

Label-free objectives: predict a masked stretch of signal from its context, or tell whether two windows come from the same recording, or reconstruct a window from a corrupted version. Trained on thousands of recordings, a model learns general structure and needs few labels downstream. Reported are largest for clinical classification (abnormal versus normal ) and for sleep, smaller for , which appears to be limited by the signal rather than the model.

Deep dive Interpretability and the FDA 2 min

A device that decides whether a patient is having a seizure needs to be explainable enough that its failures can be anticipated. Regulators have cleared deep-learning seizure and sleep software, with extensive and locked models. The regulatory path for a model that keeps learning after deployment is being written now. Phase 5’s regulatory page has the vocabulary.

Recall
Why is EEGNet so small, and what classical pipeline does its architecture mirror?
EEG datasets have hundreds of trials, so a small model avoids overfitting. Its temporal convolution learns band-pass filters, its depthwise spatial convolution learns spatial filters like CSP, and a small classifier follows, mirroring band-pass, CSP, LDA.
Recall
On small EEG datasets, how do deep networks compare to Riemannian classifiers under fair benchmarks?
Within a few points, often tied; small reported advantages tend to vanish with honest splits and tuning. Deep networks win clearly where data are large (sleep, seizures, intracortical speech).
Explain it to your roommate

Explain what this page was about to your roommate in three sentences. No jargon they would not know.