Augmentation applies transformations to existing trials that should not change their label, such as a little noise, a small shift in time, or a different gain. The model sees more variety and overfits less. It is most useful for deep models trained on a few hundred trials, which describes most EEG studies.
There is one rule above all: augment after the split, and only the training set. An augmented copy of a test trial in the training data is leakage, and it inflates the score.
Nine augmentations, chainable
These are the Augmentation step in BCILattice's Analysis Suite. They chain into a pipeline with a fixed random seed, every parameter carries its real range and unit, and the step reports what the synthesis did to the data. An augmentation that grows the trial count while flattening the spectrum is a warning sign, not a success.
| Augmentation | What it does |
|---|---|
| GaussianNoise | Adds white noise scaled to reach a target SNR. |
| TimeShift | Random circular shift along the time axis. |
| FrequencyShift | Translates the spectrum by a random offset via the analytic signal. |
| ChannelDropout | Zeroes random channels, so a decoder cannot depend on one electrode. |
| TimeReverse | Flips the time axis. |
| AmplitudeScale | Random per-epoch gain, modelling session-to-session impedance differences. |
| SlidingWindow | Produces overlapping windows from each epoch. |
| MixUp | Convex combination of two epochs of the same class. |
| SMOTE | Interpolates between same-class nearest neighbours to rebalance minority classes. |
Generative synthesis
For larger gains, generative models synthesise new trials. BCILattice has GAN Trainer and Diffusion Generator blocks on the ML canvas, and both check that generated trials are not copies of real ones, because a generator that memorises its training set adds leakage, not data.
Pick transforms that respect the physiology
Frequency shift and motor imagery
Shifting the spectrum moves mu and beta. Keep shifts small or skip this for band-defined effects.
Time reverse and ERPs
A reversed P300 is not a P300. Avoid it for evoked paradigms.
Sliding windows and splits
Overlapping windows from one trial must stay on the same side of the split.
SMOTE
Rebalances classes but interpolates in feature space, which can create implausible trials. Use it on features rather than raw epochs.
Questions
Does data augmentation help EEG classification?
Often, for deep models on small datasets, especially noise, time shifts, amplitude scaling and channel dropout. The gain should be measured on a properly held-out test set that was never augmented.
Should I augment before or after splitting the data?
After. Split first, then augment only the training data. Augmenting before the split puts near-copies of test trials into training and inflates accuracy.
Can GANs generate realistic EEG?
They can generate trials that improve training, but generated trials must be checked for memorisation (copies of real trials) and judged by whether they help on held-out data, not by how real they look.
Read the reference
Related
Deep Learning for BCI and EEG
The published BCI architectures, the sequence models and the transformers are blocks on a canvas. Training runs on your machine against your own GPU.
EEGNet: The Compact CNN for EEG Explained
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.
Cross-Validation for EEG: LOSO, Grouped and Nested
The split decides what your accuracy means. A random split over trials from one session answers a different, easier question than the one most BCI papers claim to answer.
EEG Machine Learning
A node canvas of 119 blocks covers the pipeline from design matrix to evaluation — and the evaluation half is built to make an inflated score hard to produce by accident.