EEGNet: a compact CNN built around how EEG works

EEGNet (Lawhern et al., 2018) is a small convolutional network whose layers mirror classical EEG processing: frequency filters, then spatial filters, then a summary over time. It has a few thousand parameters and trains on the data you actually have.

Updated

Generic image CNNs have millions of parameters, and a typical EEG study has a few hundred trials. EEGNet closes that gap with structure. Its first layer learns temporal filters (like a filter bank), its second learns spatial filters for each of them with a depthwise convolution (like CSP per band), and a separable convolution then summarises over time. That is why it has so few parameters.

It was shown to work across paradigms (P300, error-related negativity, movement-related cortical potentials and sensorimotor rhythms), and it has become the default first deep model for EEG decoding.

The architecture in three blocks

Variants are named EEGNet-F1,D, for example EEGNet-8,2. Batch normalisation, ELU activations, average pooling and dropout keep it regularised.

BlockLayerClassical analogue
1Temporal convolution (F1 filters)A learned bank of bandpass filters
1Depthwise spatial convolution (D per filter)Spatial filters per band, like FBCSP
2Separable convolution (F2 filters)Combining band-space features over time
HeadDense softmax layerThe classifier

EEGNet among the other EEG architectures

All five are blocks in BCILattice, along with edge variants (MobileEEGNet, QuantizedEEGNet, TinyEEGNet) for deployment on small devices.

ModelCharacter
EEGNetCompact, fast, robust on small data. Start here.
ShallowConvNetMimics FBCSP: temporal and spatial convolutions, squaring and log. Strong for oscillatory paradigms.
DeepConvNetDeeper generic CNN with more capacity, which needs more data.
ATCNetAttention and temporal convolutional blocks. Strong reported motor imagery results.
EEGConformerConvolution plus transformer self-attention for long-range temporal structure.

Training EEGNet without writing a training loop

In BCILattice, put an EEGNet block on the canvas, wire epoched data into a trainer, and add a Validation Scheme. Optimisers, schedulers, losses and early stopping are blocks too. Model Collection trains EEGNet, ShallowConvNet and a classical baseline on the same data load and gives each its own results row, which is the fair comparison. Training runs on your own NVIDIA GPU or on CPU.

Questions

What is EEGNet?

EEGNet is a compact convolutional neural network for EEG-based brain-computer interfaces, introduced by Lawhern and colleagues in 2018. It uses temporal, depthwise spatial and separable convolutions to learn frequency and spatial filters with very few parameters.

Why is EEGNet good for small EEG datasets?

Its architecture builds in the structure of EEG processing (temporal filters then spatial filters), so it needs only a few thousand parameters and overfits much less than generic CNNs.

EEGNet or CSP?

On small datasets, CSP or Riemannian pipelines often match EEGNet. With more trials or cross-subject data, EEGNet tends to pull ahead. Train both under the same grouped evaluation and compare.

Does EEGNet need a GPU?

It trains on CPU because it is small, but an NVIDIA GPU makes iteration much faster, especially with cross-validation.

Read the reference

Related

Run a study end to end, on your own machine

The free plan covers two studies, the full analysis suite, and 118 of the 119 ML blocks.