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.
