Can Natural Image Autoencoders Compactly Tokenize fMRI Volumes for Long-Range Dynamics Modeling?
Authors: Peter Yongho Kim, Juhyeon Park, Jungwoo Park, Jubin Choi, Jungwoo Seo, Jiook Cha, Taesup Moon
Organizations: ECE, Seoul National University · IPAI, Seoul National University · BCS, Seoul National University · Psychology, Seoul National University · ASRI / INMC / AIIS, Seoul National University
Modeling long-range spatiotemporal dynamics in functional Magnetic Resonance Imaging (fMRI) remains a key challenge due to the high dimensionality of the four-dimensional signals. Prior voxel-based models, although demonstrating excellent performance and interpretation capabilities, are constrained by prohibitive memory demands and thus can only capture limited temporal windows. To address this, we propose TABLeT (Two-dimensionally Autoencoded Brain Latent Transformer), a novel approach that tokenizes fMRI volumes using a pre-trained 2D natural image autoencoder. Each 3D fMRI volume is compressed into a compact set of continuous tokens, enabling long-sequence modeling with a simple Transformer encoder with limited VRAM. Across large-scale benchmarks including the UK-Biobank (UKB), Human Connectome Project (HCP), and ADHD-200 datasets, TABLeT outperforms existing models in multiple tasks, while demonstrating substantial gains in computational and memory efficiency over the state-of-the-art voxel-based method given the same input. Furthermore, we develop a self-supervised masked token modeling approach to pre-train TABLeT, which improves the model's performance for various downstream tasks. Our findings suggest a promising approach for scalable and interpretable spatiotemporal modeling of brain activity. Our code is available at https://github.com/beotborry/TABLeT.
Figures & tables
Figure 1: We show that a 2D natural image autoencoder can be transferred well to 4D fMRI data (left). Building on this, we propose to tokenize a single 3D volume of fMRI only into 27 tokens, enabling longer spatiotemporal modeling with a simple Transformer architecture (right).
Figure 2: In TABLeT, each frame of the fMRI timeseries is tokenized by a 2D autoencoder, and the tokens are processed by a Transformer.
Method UKB ADHD-200 Sex Age Diagnosis ACC AUC F1 MSE MAE ρ ACC AUC F1 XGBoost 84.1 0.916 0.830 0.698 0.686 0.553 62.3 0.650 0.555 BrainNetCNN 91.7 0.969 0.912 0.597 0.618 0.647 59.2 0.640 0.545 BNT 92.4 0.980 0.919 0.540 0.588 0.685 63.6 0.677 0.624 meanMLP 87.7 0.949 0.919 0.672 0.662 0.586 56.8 0.617 0.532 Brain-JEPA 1 1 1 Since the ADHD-200 dataset contains fMRI data with varying repetition time (TR) values and fewer than 160 frames, the default frame number used in Brain-JEPA, we were unable to conduct experiments. 86.8 0.943 0.862 0.688 0.669 0.574 – – – TFF ( T=20 ) 98.3 0.998 0.982 0.440 0.525 0.760 63.3 0.700 0.608 SwiFT ( T=20 ) 97.4 0.998 0.972 0.366 0.480 0.800 63.3 0.693 0.623 SwiFT ( T=50 ) 98.1 0.999 0.980 0.364 0.477 0.802 63.9 0.701 0.627 TABLeT ( T=256 ) 97.7 0.998 0.976 0.340 0.466 0.814 65.8 0.729 0.630
Table 1: Performance comparison to baselines on classification and regression tasks. The best results are bolded and the second best results are underlined . Standard deviations are provided in Sec. D .
Figure 3: Visualization of reconstructions from 3D and 2D DCAE.
Figure 4: Information preservation of 3D and 2D DCAE.
Figure 5: Comparison of (a) memory and (b) training time, between TABLeT and SwiFT.
Axis
UKB
Sex
Age
ACC
AUC
F1
MSE
MAE
ρ
Sagittal
97.3±0.9
0.996±0.001
0.971±0.009
0.369±0.015
0.486±0.010
0.796±0.008
Coronal
97.1±0.4
0.996±0.002
0.969±0.004
0.435±0.012
0.525±0.008
0.756±0.009
Axial
97.3±0.4
0.997±0.000
0.971±0.004
0.410±0.020
0.509±0.014
0.771±0.013
All
97.7±0.2
0.998±0.000
0.976±0.002
0.340±0.011
0.466±0.010
0.814±0.009
Table 4: Effect of the choice of slicing axis and aggregation of the three axes on classification and regression tasks. The best results are bolded and the second best results are underlined .
Figure 6: Performance of TABLeT on HCP-Intelligence and ADHD-200 with varying T .
Figure 7: IG map.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 8: Validation Loss Curve for Training of 3D DCAE.
Model
HBN-Movie
ACC
AUC
F1
SwiFT (T=50)
71.7±4.29
0.810±0.040
0.717±0.040
TABLeT (T=50)
74.7±2.38
0.826±0.033
0.750±0.024
TABLeT (T=250)
82.1±1.82
0.976±0.014
0.847±0.015
Appendix
Table A6 : Results on HBN-Movie.
Model
# Token
Dim.
HCP
ADHD-200
Intelligence
Diagnosis
MSE
MAE
ρ
ACC
AUC
F1
TABLeT
27
3072
0.835±0.053
0.741±0.028
0.392±0.062
65.8±3.50
0.729±0.029
0.630±0.038
TABLeT Alt.1
9
9216
0.814±0.044
0.733±0.026
0.416±0.061
65.7±2.74
0.710±0.031
0.632±0.043
TABLeT Alt.2
3
27648
0.840±0.093
0.736±0.044
0.401±0.035
65.1±3.59
0.690±0.032
0.636±0.042
Appendix
Table A7 : Results on HCP and ADHD-200 with varying axis aggregation schemes.
Category
UKB
HCP
ADHD -200
Number of subjects
8,178
1,061
533
Sex
Male, n (%)
4,295 (52.5%)
488 (46.0%)
207 (38.8%)
Female, n (%)
3,883 (47.5%)
573 (54.0%)
325 (61.0%)
N/A, n (%)
–
–
1 (0.2%)
Age (years)
54.98±7.53
28.79±3.70
11.94±3.40
Appendix
Table A11 : Demographic information of the datasets used in our study
The success of large-scale deep learning models in neuroscience is fundamentally constrained by severe data heterogeneity. Native fMRI data aggregated from diverse sources exhibit substantial variation in both spatial and temporal resolutions. Consequently, most existing frameworks rely on lengthy, rigid preprocessing pipelines that enforce uniformity across datasets. This practice introduces two critical limitations: (1) potential degradation of subject-specific anatomical information; (2) significant computational overhead, often requiring hours of processing per subject. Here, we propose FlexiBrain, a resolution-agnostic voxel-level encoding framework for native fMRI based on Mamba-JEPA. FlexiBrain defines patch sizes in real-world physical units and employs a dynamic patch resizing, thereby bypassing destructive spatial standardization while enabling direct ingestion of data in native space. We instantiate the framework using an efficient Mamba-JEPA backbone to model high-dimensional 4D fMRI signals. Across five diverse downstream neuroscience tasks, FlexiBrain consistently outperforms recent state-of-the-art methods, achieving gains of up to 12 percentage points without external data augmentation. Importantly, FlexiBrain functions as a seamless plug-in module, substantially reducing preprocessing costs and accelerating the development of robust voxel-level fMRI foundation models. Code is available at https://github.com/OneMore1/FlexiBrain.
Mo Wang, Wenhao Ye, Junfeng Xia +3
Southern University of Science and Technology · University of Warwick
We study the problem of training self-supervised foundation models for functional MRI. Our main contributions are: (1) we introduce a new model family (CortexMAE) trained using the masked autoencoder framework on 2.1K hours of open fMRI data, and (2) we release the first open evaluation suite (Brainmarks) for fMRI foundation models. Our core innovation is simple: we adapt the Vision Transformer to fMRI by first converting each 3D fMRI volume to a 2D map using a cortical flat map projection. We directly compare flat maps to both parcellation and volume-based representations. While each has its advantages, flat maps generally perform best. We perform the first systematic scaling analysis for fMRI and observe strict power law scaling, albeit with limits. Finally, we use Brainmarks to do controlled benchmark comparisons. On subject-level trait prediction, we report a challenging null result: no single model achieves clear state-of-the-art performance. Moreover, all models struggle to outperform a simple functional connectivity baseline. On cognitive state decoding, we observe more robust performance, and in this setting our CortexMAE family outperforms prior models by a large margin. Code, models, and datasets are available at https://github.com/MedARC-AI/CortexMAE and https://github.com/MedARC-AI/Brainmarks.
Foundation models pre-trained on large-scale fMRI datasets have shown strong downstream performance, but at substantial data and computation cost. To investigate how much fMRI-specific pre-training is actually needed for such performance, we introduce FReD, which derives fMRI representations from a frozen Deep Compression AutoEncoder (DCAE) pre-trained exclusively on natural images and pairs them with a task specific readout. For trait prediction, FReD summarizes frame-wise representations by their temporal mean and log-standard deviation and applies linear probing, with late fusion across two normalization schemes. For state prediction, it represents each frame as a single token and models temporal dependencies with a shallow Transformer. Across four resting-state datasets spanning six trait-prediction targets, linear probes on frozen DCAE features generally outperform those on fMRI foundation model representations and remain competitive with fully fine-tuned fMRI foundation models. On three task-fMRI state-prediction tasks, a temporal readout on DCAE features performs comparably to the strongest foundation models evaluated. A Gaussian injection analysis further shows that localized signal changes are recovered more accurately from the frozen DCAE features than from the evaluated foundation-model representations. Together, these results show that strong performance on current fMRI benchmarks is possible without fMRI-specific representation pre-training, making frozen natural-image features as a useful baseline for assessing its added value.
Juhyeon Park, Yeonwoo Kim, Peter Yongho Kim +5
IPAI, Seoul National University · Microsoft Research · ECE, Seoul National University +1