Convolutions Meet Self-Attention for EEG Decoding
EEG-Conformer fuses local spatial-temporal convolutions with global self-attention to classify brain signals and project the results onto brain topography maps.

What it does
EEG-Conformer is a compact neural network that classifies EEG signals by stacking one-dimensional spatial and temporal convolutions with a self-attention module. The convolutions extract low-level local features; the self-attention layer models global correlations across those local temporal patterns. A fully-connected classifier head turns the combined representation into category predictions, and an included visualization strategy projects class activation maps onto brain topography.
The interesting bit
Instead of treating convolutions and transformers as competing approaches, the architecture wires them sequentially—convolutions first, attention second—so each handles the scale it is actually good at. The “Class Activation Topography” visualization is the payoff: it translates model decisions back into spatial brain maps, which is more intuitive for neuroscientists than staring at raw activation vectors.
Key highlights
- Achieves 78.66% on BCI Competition IV2a, 84.63% on IV2b, and 95.30% on SEED (per the README’s reported splits).
- Has been upstreamed into the
braindecodetoolbox, so you can import it as a standard model rather than copy-pasting the paper code. - The architecture diagram in the repo shows a clean three-stage pipeline: convolutional feature extraction, self-attention, and classification.
- Visualization specifically projects class activation mapping onto brain topography, not just generic heatmaps.
Verdict
Worth a look if you are building EEG classification pipelines and want a ready-made conv-transformer hybrid with built-in neuroscientist-friendly visualization. Skip it if you are not working with EEG or brain-computer interfaces; the architecture is domain-specific and the reported benchmarks are tied to standard BCI datasets.
Frequently asked
- What is eeyhsong/EEG-Conformer?
- EEG-Conformer fuses local spatial-temporal convolutions with global self-attention to classify brain signals and project the results onto brain topography maps.
- Is EEG-Conformer open source?
- Yes — eeyhsong/EEG-Conformer is open source, released under the GPL-3.0 license.
- What language is EEG-Conformer written in?
- eeyhsong/EEG-Conformer is primarily written in Python.
- How popular is EEG-Conformer?
- eeyhsong/EEG-Conformer has 756 stars on GitHub.
- Where can I find EEG-Conformer?
- eeyhsong/EEG-Conformer is on GitHub at https://github.com/eeyhsong/EEG-Conformer.