Table of Contents
Fetching ...

Scaling Next-Brain-Token Prediction for MEG

Richard Csaky

TL;DR

This work introduces BrainTokMix, a causal spatiotemporal tokenizer for MEG, and FlatGPT, a decoder-only Transformer trained to predict next brain tokens. Trained on CamCAN and OMEGA and evaluated on the fully held-out MOUS dataset, the approach enables minute-scale open-loop MEG rollouts by using a sliding KV cache and a long-context token stream. The authors propose rigorous evaluation with on-manifold stability and conditional specificity via prompt-swap controls, demonstrating that generated MEG signals remain close to the real-data distribution and respond to conditioning prompts across rest, auditory, and visual tasks. The results show strong reconstruction fidelity, cross-dataset generalization, and meaningful long-horizon dynamics, suggesting a viable generative priors framework for MEG with potential applications in simulation, augmentation, and multimodal brain-stimulus modeling.

Abstract

We present a large autoregressive model for source-space MEG that scales next-token prediction to long context across datasets and scanners: handling a corpus of over 500 hours and thousands of sessions across the three largest MEG datasets. A modified SEANet-style vector-quantizer reduces multichannel MEG into a flattened token stream on which we train a Qwen2.5-VL backbone from scratch to predict the next brain token and to recursively generate minutes of MEG from up to a minute of context. To evaluate long-horizon generation, we introduce task-matched tests: (i) on-manifold stability via generated-only drift compared to the time-resolved distribution of real sliding windows, and (ii) conditional specificity via correct context versus prompt-swap controls using a neurophysiologically grounded metric set. We train on CamCAN and Omega and run all analyses on held-out MOUS, establishing cross-dataset generalization. Across metrics, generations remain relatively stable over long rollouts and are closer to the correct continuation than swapped controls. Code available at: https://github.com/ricsinaruto/brain-gen.

Scaling Next-Brain-Token Prediction for MEG

TL;DR

This work introduces BrainTokMix, a causal spatiotemporal tokenizer for MEG, and FlatGPT, a decoder-only Transformer trained to predict next brain tokens. Trained on CamCAN and OMEGA and evaluated on the fully held-out MOUS dataset, the approach enables minute-scale open-loop MEG rollouts by using a sliding KV cache and a long-context token stream. The authors propose rigorous evaluation with on-manifold stability and conditional specificity via prompt-swap controls, demonstrating that generated MEG signals remain close to the real-data distribution and respond to conditioning prompts across rest, auditory, and visual tasks. The results show strong reconstruction fidelity, cross-dataset generalization, and meaningful long-horizon dynamics, suggesting a viable generative priors framework for MEG with potential applications in simulation, augmentation, and multimodal brain-stimulus modeling.

Abstract

We present a large autoregressive model for source-space MEG that scales next-token prediction to long context across datasets and scanners: handling a corpus of over 500 hours and thousands of sessions across the three largest MEG datasets. A modified SEANet-style vector-quantizer reduces multichannel MEG into a flattened token stream on which we train a Qwen2.5-VL backbone from scratch to predict the next brain token and to recursively generate minutes of MEG from up to a minute of context. To evaluate long-horizon generation, we introduce task-matched tests: (i) on-manifold stability via generated-only drift compared to the time-resolved distribution of real sliding windows, and (ii) conditional specificity via correct context versus prompt-swap controls using a neurophysiologically grounded metric set. We train on CamCAN and Omega and run all analyses on held-out MOUS, establishing cross-dataset generalization. Across metrics, generations remain relatively stable over long rollouts and are closer to the correct continuation than swapped controls. Code available at: https://github.com/ricsinaruto/brain-gen.
Paper Structure (54 sections, 11 equations, 21 figures, 6 tables)

This paper contains 54 sections, 11 equations, 21 figures, 6 tables.

Figures (21)

  • Figure 1: On-manifold stability for resting-state rollouts (MOUS test). Gray bands show the real 5--95% and 25--75% envelopes; blue shows the generated distribution across contexts. Top 2: mean OER and IQR ratio. Bottom 4: feature stability.
  • Figure 2: Conditional specificity for resting-state rollouts (MOUS test). Prefix divergence over increasing generated duration $\tau$ for the correct pairing (blue) versus prompt-swap (red) target-swap (orange) controls and a real-real baseline (gray). Shaded regions show interquartile ranges across contexts.
  • Figure 3: BrainTokMix reconstruction preserves spatial and spectral statistics. Reconstructions closely match target covariance and PSD across held-out MOUS windows, with mild attenuation at higher frequencies (likely contributing to slightly reduced gamma-band power downstream).
  • Figure 4: Token-level prediction vs. available context on test data.
  • Figure 5: Global covariance and PSD for auditory rollouts (60 s context). Left: covariance heatmaps averaged over generated and target continuations. Right: channel PSDs (0--50 Hz).
  • ...and 16 more figures