All models

Neuro-GPT

An EEG encoder feeding a GPT-2 decoder, pre-trained by predicting masked chunks of multichannel EEG.

Neuroscience signals · 795 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (5 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
79.5M
Operations
795
Framework
PyTorch
Recurrent
No
Published
ISBI 2024
Cited by
47 (as of 27 October 2026)
Authors
Wenhui Cui, Woojae Jeong, Philipp Thölke and others
License
GPL-3.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m18871
Graph hash
df8ecf4399b78c2f5a6f22a422bbe65cc3ecabca3939d32d5509855bf977d425
Skeleton hash
5b90ec4f435403d55db2816aa1b0b6ed01ccd96fef173ddcc860984551fdb211
Architecture hash
19a8d745477d226e2694c2817e532bb2b9f0aa218d041aae05f69e34b98704ca
Diagram SHA-256
d57c199199649d5117804357fe7162728b471141851782452f9c77528badd5db
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Neuro-GPT is a foundation model for electroencephalography (EEG) made of an EEG encoder and a GPT model. The recording is split into fixed-length chunks, and each chunk is treated as a token.

The encoder applies a temporal convolution to the time series and a spatial convolution across the electrodes, then self-attention layers within each chunk. Its output embeddings are the tokens for the GPT model, a decoder-only transformer. In pre-training, the token sequence is duplicated and in each copy one token is replaced by a learnable mask token while the tokens after it are set to zero. The GPT model predicts each masked token from the tokens before it, and the loss is the reconstruction error against the encoder's original embedding.

The paper's standard input is 32 chunks of 2 seconds each with a 10% overlap. Its encoder has two convolutional layers followed by six self-attention layers with an embedding dimension of 1,080, and its GPT-2 model has 6 transformer decoder layers. The authors prepared 20,000 EEG recordings from the TUH EEG dataset, 5656 hours in total, and trained on 19,000 of them for 135 epochs. Fine-tuned for 4-class motor imagery classification on the BCI 2a dataset, the paper found that fine-tuning only the pre-trained encoder gave the best accuracy. With only a linear head trained on the frozen encoder, the paper reports an accuracy of 0.443 with pre-training and 0.398 without.

Key idea. Neuro-GPT pairs an EEG encoder with a GPT model and pre-trains both by predicting masked chunks of EEG, so the encoder's features transfer to tasks with little data.

  • Neuro-GPT
  • NeuroGPT
  • EEG
  • EEG foundation model
  • brain-computer interface
  • motor imagery classification
  • self-supervised pre-training
  • causal masking
  • TUH EEG
  • BCI Competition IV 2a

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{cui2024neurogptfoundationmodeleeg,
      title={Neuro-GPT: Towards A Foundation Model for EEG}, 
      author={Wenhui Cui and Woojae Jeong and Philipp Thölke and Takfarinas Medani and Karim Jerbi and Anand A. Joshi and Richard M. Leahy},
      year={2024},
      eprint={2311.03764},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2311.03764}, 
}