Scaling Vision Transformers for Functional MRI with Flat Maps
Connor Lane, Daniel Z. Kaplan, Tanishq Mathew Abraham, Paul S. Scotti
TL;DR
This work investigates scaling fMRI foundation models by representing brain activity as flat maps on a cortical surface and training a spatiotemporal Vision Transformer via masked autoencoding (fm-MAE) on 2.3k hours of HCP data. It demonstrates that masked reconstruction follows a strict power-law scaling with pretraining data size, indicating efficient scaling in this domain. The learned representations support both fine-grained state decoding across subjects and cross-subject, zero-shot visual decoding on NSD, with competitive results on UKBB sex classification and promising performance in several benchmarks. Overall, the study positions flat-map fMRI as a viable input modality for foundation models and highlights the importance of data diversity and broader evaluation in realizing cross-subject generalization.
Abstract
A key question for adapting modern deep learning architectures to functional MRI (fMRI) is how to represent the data for model input. To bridge the modality gap between fMRI and natural images, we transform the 4D volumetric fMRI data into videos of 2D fMRI activity flat maps. We train Vision Transformers on 2.3K hours of fMRI flat map videos from the Human Connectome Project using the spatiotemporal masked autoencoder (MAE) framework. We observe that masked fMRI modeling performance improves with dataset size according to a strict power scaling law. Downstream classification benchmarks show that our model learns rich representations supporting both fine-grained state decoding across subjects, as well as subject-specific trait decoding across changes in brain state. This work is part of an ongoing open science project to build foundation models for fMRI data. Our code and datasets are available at https://github.com/MedARC-AI/fmri-fm.
