MEG-GPT-2: A Generative Foundation Model for MEG with Structured Neural Representations

SungJun Cho, Chetan Gohil, Oiwi Parker Jones, Mark WoolrichFMSD @ ICML 2026

TL;DR

MEG-GPT-2 is a new generative foundation model designed specifically for Magnetoencephalography (MEG) data. By applying a decoder-only transformer architecture to source-level brain signals, the researchers demonstrate that the model doesn't just "predict the next token"—it actually internalizes fundamental neuroscientific properties like brain anatomy, spectral dynamics, and functional connectivity.

What Problem Does This Paper Address?

While "foundation models" (like GPT-4) have revolutionized text and images, their application to brain activity—specifically neural time series—is still in its infancy. Most existing work focuses on EEG because the data is easier to collect. However, MEG offers much higher spatial resolution and a better signal-to-noise ratio, making it a "cleaner" window into the brain.

Furthermore, most AI models for brain data are evaluated solely on "downstream tasks" (e.g., Can it tell if this person is looking at a cat?). This doesn't prove the model actually understands the underlying biology. This paper shifts the focus toward neuroscientific validity: checking if the model’s internal representations and generated data match the known physical and statistical properties of the human brain.

Methods

The authors introduce MEG-GPT-2, a decoder-only transformer. Key technical highlights include:

  • Source-Level Modeling: Instead of training on raw sensor data (which is noisy and physically distant from the neurons), they use "source-reconstructed" data. This maps signals back to 52 specific anatomical brain regions (parcels).
  • Factorized Channel-Time Attention: To handle the complexity of 52 channels over time, the model uses a two-step attention mechanism. It first calculates dependencies across different brain regions (spatial) and then propagates that information through time (temporal).
  • Causal Tokenization: Continuous brain signals are converted into discrete "tokens" using a learnable, causal tokenizer. This allows the model to be trained with a standard autoregressive objective: predicting the next brain-state token based on previous ones.
  • Hierarchical Temporal Modeling: The model uses techniques like patching and sparse banded attention to progressively expand its "receptive field," allowing early layers to focus on fast, local dynamics and deeper layers to look at longer-term patterns.

Datasets

The model was trained on the Cam-CAN (Cambridge Centre for Ageing and Neuroscience) dataset.

  • Scale: Resting-state, eyes-closed MEG recordings from 612 healthy participants (ages 18–88).
  • Preprocessing: The data was downsampled to 250 Hz and parcellated into 52 regions based on the Glasser52 atlas.
  • Comparison: The paper compares results against the original MEG-GPT (an earlier iteration).

Key Insights and Ideas

  • Emergent Anatomy: One of the most striking findings is that the model's "channel embeddings" (its internal representation of different brain regions) naturally clustered according to actual human anatomy. Without being told which regions were neighbors, the model "learned" the spatial layout of the brain simply by observing how signals correlate.
  • Spectral Fidelity: When asked to "dream" or generate synthetic brain data, MEG-GPT-2 produced signals that almost perfectly matched the Power Spectral Density (PSD) of real human brains, including the characteristic "alpha peak" (the ~10Hz rhythm dominant during rest).
  • The "Phase" Problem: While the model successfully captured amplitude-based connectivity (how the "volume" of different regions rises and falls together), it struggled to capture phase-sensitive dependencies. This suggests that current transformer architectures might need longer context windows or different inductive biases to understand the precise timing/oscillatory "handshakes" between brain regions.

Key Results

  • Performance: MEG-GPT-2 achieved lower training and validation loss and higher top-1 accuracy (34.3%) compared to the original MEG-GPT, despite having a similar parameter count (~7.3M).
  • Spatial Mapping: Post-hoc analysis showed clear block-diagonal patterns in the cosine similarity of channel embeddings, indicating the model successfully grouped anatomically related cortical subdivisions.
  • Generative Quality: Synthetic signals exhibited realistic temporal variability and non-stationary dynamics (like intermittent "bursts" of activity) that mirror real resting-state MEG.

Limitations and Future Work

The primary limitation identified is the context length. The model used a window of 100 tokens, which represents only about 0.4 seconds of brain activity. This is likely why the model struggled to capture higher-order, long-range functional connectivity and complex phase relationships.

The authors suggest that future work will involve:

  1. Scaling up: Increasing both the model capacity (parameters) and the context length.
  2. Downstream Benchmarking: Testing how these "neuroscientifically valid" representations perform on specific clinical or cognitive decoding tasks.
  3. Refining Connectivity: Investigating why phase-sensitive relationships are harder for the model to learn and how to better architect for them.

Summary updated

BibTeX
@inproceedings{cho2026meg,
  author = {SungJun Cho and Chetan Gohil and Oiwi Parker Jones and Mark Woolrich},
  title = {{MEG-GPT-2: A Generative Foundation Model for MEG with Structured Neural Representations}},
  booktitle = {FMSD @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=yrVRaS2Ocu},
}
Figure