Deep learning for EEG, without writing the training loop

The published BCI architectures, the sequence models and the transformers are blocks on a canvas. Training runs on your machine against your own GPU.

Reproducing a deep EEG architecture from its paper is a week of work before you learn anything about your own data — and the reimplementation is where the discrepancy between your numbers and the published ones usually hides.

BCILattice ships those architectures as blocks. EEGNet, ShallowConvNet, DeepConvNet, ATCNet and EEGConformer are available directly, alongside sequence models, transformers and quantised edge variants, and the training primitives are blocks on the same canvas rather than a script beside it.

Architectures available as blocks

The Hugging Face surface is available too — transformers, tokenizers, training arguments, PEFT adapters including LoRA, datasets and evaluate — for work that pairs a biosignal encoder with a pretrained model.

CategoryClasses
BCI EEG modelsEEGNet, ShallowConvNet, DeepConvNet, ATCNet, EEGConformer
Sequence modelsLSTMClassifier, BiLSTMClassifier, GRUClassifier, TCNClassifier, MambaSSM
TransformersPatchTST, BrainBERT, EEGTransformer, ViTEEG
Edge modelsMobileEEGNet, QuantizedEEGNet, TinyEEGNet
RiemannianCovariances, ERP covariances, tangent space with MDM, FgMDM, TSClassifier

The training loop as a graph

DL training primitives are blocks: optimisers, schedulers, loss functions, early stopping, checkpointing. Assembling them on the canvas produces the same thing a PyTorch training script would, with two differences — the graph is the record of what ran, and a parameter you deliberately set to zero stays zero rather than being replaced by a default.

Blocks that need code accept it. Custom Code executes Python you supply, and it is the one block in the catalogue that is plan-gated.

When the model wants an image

Vision architectures expect a 2-D input, and an EEG trial is a set of 1-D time courses. The Data Projection step in the Analysis Suite encodes a time course as a 2-D image so a ViT or a CNN pretrained on images has something shaped correctly to read.

That makes the choice of encoding an explicit, reviewable analysis step with a recorded parameter set, rather than a transform buried in a data loader.

What it runs on

  • NVIDIA CUDA

    Full support, CUDA 11.8 through 12.4, driver 520.61 or newer. RTX 3060 or better recommended for deep training.

  • AMD

    Not supported. AMD GPUs fall back to CPU automatically; ROCm support is planned.

  • Apple Silicon

    macOS builds run where published; PyTorch acceleration depends on the packaged runtime and local MPS support.

  • CPU only

    Works, and is fine for classical pipelines. For deep training an 8-core or better CPU is strongly recommended, with 16–32 GB RAM.

A deep model does not exempt you from the split

The failure mode that produces implausible EEG deep-learning accuracies is almost never the architecture. It is a random split across trials from one subject, or a search evaluated on the fold that selected it.

The same grouped splits, nested search and results validation that apply to a classical pipeline apply here, and the validation tab reads the run design regardless of which block trained the model.

Questions

Which EEG deep learning architecture should I start with?

EEGNet is the usual starting point — small, well-studied, and it trains fast enough to iterate on. Move to ShallowConvNet or DeepConvNet if the paradigm has strong spectral structure, and to a transformer only once a simpler model has given you a baseline worth beating.

Can I fine-tune a pretrained model?

Yes. The Hugging Face transformers, PEFT and training surfaces are available as blocks, including LoRA and the other adapter configurations, so a pretrained encoder can be fine-tuned inside the same pipeline.

Can I run this on a laptop without a GPU?

Classical pipelines, yes, comfortably. Deep training on CPU is possible but slow; the practical minimum is 8 GB RAM, with 16–32 GB and an NVIDIA GPU recommended for deep work.

What happens to the trained weights?

They stay in your project on disk. Publishing a model to BCINexus is a separate, explicit action, and you choose whether the weights go with the study record or stay local.

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.