Manuscript Offprint
arXiv:2610.28411Brain2Vec: A Self-Supervised 3D Foundation Model for Structural Brain MRI
Spiros Maggioros
University of Pennsylvania
George Aidinis
University of Pennsylvania
Guray Erus
University of Pennsylvania
Alexander Getka
University of Pennsylvania
Gareth Harman
University of Pennsylvania
Aristeidis Sotiras
University of Pennsylvania
Christos Davatzikos
University of Pennsylvania
Abstract
Deep learning models have become essential tools in medical imaging, yet training them end-to-end for diverse tasks remains challenging due to limited labeled data and computational constraints. To address this, we introduce Brain2Vec, a foundation model pre-trained on 74,425 T1-weighted Magnetic Resonance Imaging (MRI) scans pooled from multiple studies. Brain2Vec can serve both as a weight initialization backbone for fine-tuning downstream tasks and as a standalone feature extractor. We evaluated Brain2Vec in three tasks: downstream predictive performance, convergence speed, and embedding quality. Using Brain2Vec's pre-trained weights as initialization and fine-tuning on labeled data for a brain age prediction task, results demonstrate improved final accuracy and faster convergence compared to random initialization. Additionally, its frozen embeddings outperform anatomically defined volumetric features on four of five downstream classification tasks and perform competitively with a state-of-the-art foundation model pre-trained on substantially more data. Lastly, we show that Brain2Vec encodes information primarily from a spatially localized and neuroanatomically meaningful set of brain regions, and that manipulating a subset of latent features produces monotonic, region-specific effects on the reconstructed anatomy. Brain2Vec code and trained models are available as an open-source package on https://github.com/CBICA/Brain2Vec. Users can apply Brain2Vec locally by installing the package, or directly through the NiChart cloud platform https://cloud.neuroimagingchart.com, where Brain2Vec features can be derived without requiring local installation or specialized infrastructure.
1 Introduction
Traditional machine learning approaches for deriving imaging biomarkers from structural Magnetic Resonance Imaging (MRI) typically rely on a predefined feature extraction step, such as segmentation or parcellation of regional anatomy, followed by supervised modeling on the resulting measurements . These pipelines have supported a wide range of neuroimaging applications, including brain age estimation and disease prediction , but they depend on predefined anatomical segmentations and task-specific model development.
Deep learning (DL) has made it possible to learn predictive representations directly from images, potentially bypassing hand-engineered feature pipelines. In practice, however, training end-to-end models for specific neuroimaging tasks poses significant challenges. MRI volumes are substantially
Preprint. Under review.
more computationally demanding than 2D natural images, with 3D volume-based training incurring considerable memory and computational costs [7, 39]. At the same time, neuroimaging datasets are typically small, labeled datasets are limited, and class distributions are often imbalanced, contrasting sharply with the large-scale labeled datasets available in computer vision, such as ImageNet [10] with over 14 million images for 2D classification. These constraints hinder the development of robust task-specific deep models and motivate the need for transferable representations learned from large, heterogeneous MRI collections.
Self-supervised pre-training offers a practical way to mitigate these limitations by learning transferable image representations from large collections of unlabeled scans [23, 21]. Rather than optimizing directly for a single downstream target, self-supervised models are trained using a generic pretext objective and can then be adapted to classification or regression tasks using substantially smaller labeled datasets. This paradigm is especially appealing in neuroimaging, where large-scale imaging repositories are increasingly available, but task-specific annotations remain expensive, heterogeneous, and often scarce.
In this work, we present Brain2Vec, a self-supervised foundation model pre-trained on 74,425 T1-weighted MRI scans pooled from multiple studies within the iSTAGING harmonized dataset [20]. The training data span a broad range of scanner hardware, acquisition protocols, and clinical populations, allowing the model to learn a high-dimensional representation of neuroanatomy from diverse real-world data. Brain2Vec produces a 768-dimensional embedding for each scan, which can be used in two complementary ways: as initialization for downstream fine-tuning, or as a frozen feature representation for supervised prediction.
Validation experiments demonstrate that Brain2Vec improves both predictive performance and convergence speed when used for encoder fine-tuning. When evaluated as a feature extractor, Brain2Vec outperformed SPARE-BA, a brain age model trained on regional volumes derived from DLMUSE [3] anatomical segmentation, across all tasks except a single AD prediction task. It also outperformed NeuroJEPA [22], a foundation model pre-trained on 1.55M scans (683, 860 T1w), on multiple classification and brain age prediction tasks. This result is particularly notable given that Brain2Vec was pre-trained on less data. This suggests that learning a strong representation of brain structure may not require pretraining at the scale of millions of scans. Unlike natural-image datasets, where visual content varies enormously across scenes, objects, and viewpoints, preprocessed structural brain MRI is a comparatively low-variance domain: scans are skull-stripped and registered to a common atlas space, so the variability a model must capture is largely confined to inter-individual anatomical differences, including aging and disease related changes, and acquisition effects. Together, these results establish Brain2Vec as an effective self-supervised backbone for structural neuroimaging analysis.
Contributions. This work makes the following contributions:
-
First, we introduce Brain2Vec, a self-supervised 3D masked autoencoder trained on 74,425 T1-weighted MRI scans drawn from multiple studies, with the goal of learning transferable representations of brain structure.
-
Second, we demonstrate that pretrained Brain2Vec weights serve as a stronger initialization for downstream task-specific applications than random initialization. We illustrate this here through brain age prediction, where we observe improvements in both convergence speed and final accuracy.
-
Third, we show that frozen Brain2Vec embeddings support competitive lightweight downstream modeling. They outperform segmentation-based volumetric features on four of five disease and risk-factor classification tasks, performing competitively with NeuroJEPA [22], while achieving strong brain age prediction performance.
-
Last, we perform an extensive analysis of Brain2Vec latent embeddings, showing that the model encodes information primarily from a spatially localized and neuroanatomically meaningful set of brain regions. We prove that manipulating a subset of latent features produces monotonic, region-specific effects on the reconstructed anatomy, which is important for the interpretability of disease or aging related effects.
Code Availability. The codebase and pre-trained weights in safetensors format for both feature extraction and downstream predictive tasks are released as open-source packages on
GitHub https://github.com/CBICA/Brain2Vec and Hugging Face https://huggingface.co/cbica/Brain2Vec. All tools are also integrated into the NiChart platform https://cloud.neuroimagingchart.com, enabling users to upload raw T1-weighted MRI scans via the cloud and obtain Brain2Vec embeddings (e.g., for custom model development) as well as a set of biomarkers for disease prediction and brain age estimation.
Self-supervised learning has proven particularly well-suited to settings where labeled data are limited but unlabeled scans are abundant. In computer vision, Vision Transformers (ViTs) showed that images can be modeled effectively as sequences of patches, while masked autoencoders (MAEs) demonstrated that reconstructing heavily masked inputs can yield scalable and transferable visual representations [13, 21].
In medical imaging, recent work has highlighted the promise of self-supervised pre-training for improving downstream predictive performance and sample efficiency across classification and segmentation tasks [23]. Several methods originally developed for computer vision have since been adapted to medical and neuroimaging datasets. Among these, masked autoencoders have demonstrated improvements in medical image classification and segmentation, including in 3D settings where labeled data are particularly costly to obtain [39, 7]. Specifically, in brain MRI analysis, domain-tailored self-supervised pre-training has been shown to enhance downstream diagnostic models, and recent work has begun exploring large-scale brain-specific foundation models for neuroimaging tasks [24, 9, 36, 22].
3 Materials and method
3.1 Datasets
The pre-training dataset comprised 74,425 T1-weighted MRI scans pooled from multiple studies within the iSTAGING consortium [20]. While the majority of scans were from cognitively unimpaired subjects, the dataset also included individuals with MCI and dementia, enabling the model to capture disease-related neuroanatomical changes. We expect that including diseased groups in pre-training plays a beneficial role in downstream tasks presented in Section 4 for disease classification. A detailed breakdown of pre-training datasets and sample characteristics is provided in Table 1. The dataset was stratified by diagnosis and partitioned into 80% training, 10% validation and 10% test set at the participant level, so that all longitudinal scans from a given participant were assigned to the same set.
For brain age prediction, we used 19,671 cognitively unimpaired baseline scans from the iSTAGING consortium, spanning 13 studies (Supplementary Table 7). To ensure a balanced age distribution across splits, scans were stratified into 10-year age bins and partitioned into 60% for training, 30% for validation, and 10% for testing. For out-of-distribution validation, we used the MIRIAD [29] dataset, comprising baseline T1 MRI scans from 46 mild-to-moderate Alzheimer's subjects and 23 cognitively normal controls.
For disease classification, we used 21,176 scans from the iSTAGING consortium, spanning 15 studies (Supplementary Tables 8, 9, 10, 11, and 12), covering six diagnostic and risk-factor categories: cognitively unimpaired (CU), Alzheimer's disease (AD), diabetes, elevated BMI, smoking status, and hypertension. To mitigate inter-site variability, data from multiple studies were balanced across
Table 1: Overview of datasets used for Brain2Vec pre-training, split by training and validation sets.
| Training Set | Validation Set | ||||||
|---|---|---|---|---|---|---|---|
| Study | n | Mean Age ± Std | (%) F | Study | n | Mean Age ± Std | (%) F |
| UKBIOBANK | 32,719 | 52.87 | UKBIOBANK | 4,104 | 51.32 | ||
| PENN | 694 | 57.49 | PENN | 95 | 55.79 | ||
| OASIS | 1,925 | 56.68 | OASIS | 250 | 57.20 | ||
| ADNI | 8,672 | 45.18 | ADNI | 1,074 | 45.72 | ||
| AIBL | 1,499 | 54.30 | AIBL | 210 | 53.33 | ||
| CARDIA | 1,111 | 53.65 | CARDIA | 142 | 49.30 | ||
| PreventAD | 991 | 71.64 | PreventAD | 114 | 64.04 | ||
| BLSA | 3,268 | 52.05 | BLSA | 377 | 49.34 | ||
| MESA | 850 | 52.59 | MESA | 94 | 58.51 | ||
| HABS | 410 | 59.51 | HABS | 51 | 52.94 | ||
| HCP | 1,462 | 55.61 | HCP | 179 | 51.40 | ||
| SHIP | 2,660 | 51.05 | SHIP | 330 | 51.21 | ||
| BIOCARD | 867 | 59.98 | BIOCARD | 125 | 56.80 | ||
| GSP | 1,257 | 58.55 | GSP | 147 | 53.06 | ||
| WRAP | 412 | 66.50 | WRAP | 52 | 76.92 | ||
| HANDLS | 181 | 54.14 | HANDLS | 24 | 58.33 | ||
| WHIMS | 523 | 100.00 | WHIMS | 67 | 100.00 | ||
| SPRINT | 45 | 35.56 | SPRINT | 6 | 33.33 | ||
| Total | 59,546 (80%) | 52.99 | Total | 7,441 (10%) | 51.73 | ||
disease groups where possible. All classification experiments were evaluated using 5-fold stratified cross-validation. For out-of-distribution validation, we used the IXI [5] dataset which consists of 581 cognitively unimpaired subjects. We removed subjects aged , resulting in a total of , reflecting the clinical scope of the model where neurodegeneration-related structural changes are most relevant.
All scans underwent the same preprocessing pipeline as with Brain2Vec pre-training introduced in Sec. 3.3, including skull-stripping, atlas registration, resampling to voxels and Z-score normalization.
3.2 Architecture
Brain2Vec is a 3D Masked Autoencoder [21] with an asymmetric encoder-decoder design (Fig. 1).
Feature extraction. A preprocessed volume is split into non-overlapping patches , each flattened to a 512-dimensional vector and linearly projected to the encoder width . A learnable [CLS] token is prepended to the sequence.
Tokenization. The encoder is a 12-layer ViT [13] with a hidden size of 768, 12 attention heads, and an MLP ratio of 4. A random subset (75%) of patches are masked and the encoder only processes a small subset of visible patches (25%), without incorporating mask tokens [11].
Decoder. The decoder is an 8-layer ViT with an input dimensionality of and 16 attention heads. The encoder's outputs are first projected to the required dimensionality and a shared learnable mask token is inserted at every masked position, followed by positional embeddings. The decoder processes the full sequence of tokens and a linear head predicts the voxel values of each patch. In all previous work, the decoder is not used for feature extraction but only during pre-training and discarded afterwards. We proposed an approach on using the decoder for interpretability (Sec. 4.3).
Objective. Let denote the predicted voxels of patch . The model is trained to minimize the mean squared error over masked patches only:
where targets are defined in the Z-score-normalized intensity space. Because our goal is a robust latent representation of brain structure rather than recovery of absolute voxel intensities, we do not reconstruct the original intensities.
Brain2Vec pre-training

Brain2Vec evaluation

Figure 1: Overview of the Brain2Vec pre-training architecture and downstream applications. (Pre-training) Brain2Vec is a 3D Masked Autoencoder (MAE) pre-trained on 74,425 T1-weighted MRI scans from the iSTAGING consortium. Input volumes are divided into patches, with 75% randomly masked. A 12-layer Vision Transformer (ViT) encoder processes only the visible patches to generate a 768-dimensional latent representation. Mask tokens are then introduced, and an 8-layer ViT decoder reconstructs the original scan. (Evaluation) The pre-trained encoder serves two complementary roles. First, it provides a robust weight initialization for end-to-end fine-tuning on a downstream task (brain age regression), accelerating convergence and improving accuracy relative to random initialization. Second, its frozen 768-dimensional embeddings serve as fixed features for lightweight downstream models, including a Support Vector Regressor (SVR) for brain age regression and SVMs for five binary classification tasks: CU vs. AD, elevated BMI, diabetes, smoking status, and hypertension. We additionally assess the quality and interpretability of these frozen embeddings via self-attention visualization, correlation with anatomically-defined Regions of Interest (ROIs), and latent-space manipulation, showing that Brain2Vec encodes spatially localized, neuroanatomically meaningful representations.
Embedding extraction. After pre-training, the decoder is discarded. We freeze the encoder weights and pass all the patches without any masking. The final embedding is obtained from the [CLS] token, though obtaining the final embedding using mean pooling is also a valid option and is used in other recent foundation models like NeuroJEPA.
3.3 Training
During training, we used voxel patches with a random masking ratio of 75%. Fig. 2 illustrates example scans with random masking applied, alongside their reconstruction generated by Brain2Vec and ground truth.
Data were split into 80% training, 10% validation, and 10% testing sets, stratified by disease. Given the foundation model nature of this work, the training set was intentionally maximized to expose the model to as much diverse data as possible during pre-training, as broader data coverage is critical for learning generalizable representations. Brain2Vec was trained for 500 epochs with an
Masked
Recon.
GT

(a) CU
Masked
Recon.
GT
(b) MCI
Masked
Recon.
GT
(c) AD
Figure 2: Brain2Vec reconstruction results (75% random masking) for a representative subject from each cognitive group: (a) CU (Cognitively Unimpaired), (b) MCI (Mild Cognitive Impairment), and (c) AD (Alzheimer's Disease). Within each panel, columns show the masked input, the Brain2Vec reconstruction (Recon.), and the ground truth (GT); rows show sagittal, coronal, and axial views.
effective batch size of 64 on two A100 GPUs, using the AdamW optimizer [28] with momentum of , , a base learning rate of , and a cosine annealing scheduler without warm restarts [27]. We applied the linear learning rate scaling rule [16], , where is the effective batch size, as we trained on two GPUs with a batch size of 32 each.
All scans were skull-stripped using a deep learning-based method and linearly registered to a common atlas space [3, 32]. Preprocessed scans were resized to voxels to reduce computational cost. It is important to note that the objective of our training is not precise reconstruction, but rather learning meaningful representations of the input data. To improve generalization, we applied data augmentation using TorchIO [33], including RandomBlur ( ), RandomGamma ( ), RandomFlip (lateral axis only), RandomNoise (mean=0, std=0), and affine transformations.
3.4 Evaluation
The pre-trained Brain2Vec model was evaluated on six downstream tasks including: (i) five classification tasks (CU vs. AD, elevated BMI, diabetes, smoking status and hypertension) and (ii) a brain age prediction task, under two complementary configurations:
• Encoder fine-tuning: The pre-trained encoder weights were used as initialization for a Vision Transformer (ViT) applied to a brain age prediction task. This approach preserves the original ViT architecture, allowing the downstream model to leverage the rich structural representations acquired during pre-training.
• Feature extraction: MRI scans were passed through the frozen pre-trained encoder to extract 768-dimensional embeddings (Brain2Vec features), which subsequently served as fixed input representations for lightweight downstream models using Support Vector Machines (SVMs).
We compared fine-tuning from Brain2Vec pretrained weights against training from random initialization, measuring both final accuracy and convergence speed. In the feature extraction setting, we compared downstream predictive performance against SPARE-BA, a model trained using segmentation-based regional volumetric features and using features extracted from NeuroJEPA, a state-of-the-art foundation model, providing a direct assessment of Brain2Vec relative to both traditional and more recent neuroimaging feature pipelines.
4 Results
4.1 Fine-tuning
Brain2Vec encoder weights were used to initialize a ViT-based brain age regression model (ViT-BA). We fine-tuned the model on our brain age prediction dataset explained in Sec. 3.1. In contrast to

Figure 3: ViT-BA validation metrics per epoch.
Brain2Vec model training stage, where maximizing training data sample size was prioritized, a larger proportion of data was used in this validation experiment to ensure robust evaluation of regression performance on the downstream task. Data were partitioned into for training, for validation, and for testing. All training configurations and hyperparameters were kept consistent with those used during the Brain2Vec model training. Results are reported with and without Brain2Vec initialization, enabling a direct assessment of the contribution of transfer learning to downstream regression performance.
As expected from pre-trained initializations, optimization dynamics were markedly improved, with the Brain2Vec-initialized model bypassing the initial plateau within fewer than 10 epochs compared to approximately 50 epochs for the randomly initialized model (Fig. 3). This confirms that self-supervised pre-training provides a superior weight initialization that optimizes training efficiency, accelerating convergence.
Brain2Vec initialization also improved brain age prediction accuracy (Table 2, Fig. 4). The pre-trained model outperformed the randomly initialized baseline across all metrics – Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and – on both the held-out test set and the external IXI dataset [5], with the performance gap being more pronounced on the latter. The larger improvement on out-of-sample data suggests that pre-training contributes to better generalization across sites.
Table 2: Brain age regression results with and without Brain2Vec pre-training on the held-out test set and the external IXI dataset.
| Dataset | Model | Pre-training | MAE | MSE | RMSE | |
|---|---|---|---|---|---|---|
| Test | ViT-BA | No | 4.0733 | 28.4987 | 5.3404 | 0.7275 |
| ViT-BA | Yes | 3.5573 | 21.9879 | 4.6856 | 0.7902 | |
| IXI | ViT-BA | No | 6.1846 | 63.9272 | 7.9955 | 0.4306 |
| ViT-BA | Yes | 5.1667 | 44.3969 | 6.6631 | 0.6045 |

(a) Brain age prediction without pre-training.

(b) Brain age prediction with pre-training.
Figure 4: ViT-BA prediction plots on the held-out test set.

(a) ViT-BA brain age prediction without pre-training.
(b) ViT-BA brain age prediction with pre-training.
(c) Brain2Vec-SVR brain age prediction.
Figure 5: ViT-BA and Brain2Vec-SVR prediction plots for IXI.
4.2 Feature extraction
4.2.1 Brain age prediction
We trained a Support Vector Regressor (SVR) on frozen Brain2Vec encoder embeddings to predict brain age. The rationale is that an effectively pretrained encoder that captures neuroanatomically relevant structure should enable a simple non-parametric model to generalize effectively to age prediction from fixed embeddings alone, without any backbone fine-tuning. We used 5-fold cross-validation for data splitting, with hyperparameters tuned via Optuna [1] using nested 5-fold cross-validation on the training folds, optimizing for score. Splits were randomly sampled.
Our results (Table 3, Fig. 5) demonstrate that the proposed approach achieves performance comparable to fully supervised ViT regressors, despite its simplicity, suggesting that Brain2Vec embeddings capture rich structural information relevant to brain aging. Notably, the SVR model trained on Brain2Vec features outperformed SPARE-BA, a validated and established brain age estimation method trained on volumetric features from anatomical segmentation using a pre-defined atlas [19], and performed comparable to SVR models trained on NeuroJEPA embeddings. This suggests that Brain2Vec features encode structural information that is at least as informative as anatomically defined, handcrafted regional volume features. We also evaluated the utility of brain age gap (predicted age – actual age) to capture disease related or risk-factor effects on multiple disease-specific datasets described in Sec. 3.1. The brain age gap from Brain2Vec-SVR model showed significant group differences in AD (Cohen's d = 0.94, p < 0.001) and elevated BMI (Cohen's d = 0.43, p < 0.001), outperforming ViT-BA model on this measure. Results are reported in supplementary Fig. 8.
Validations on the external IXI dataset were performed using the same SVR models trained in the cross-validation folds, without any additional training or fine-tuning. This approach was chosen to directly assess the generalization performance of the learned Brain2Vec feature space without any additional model adaptation, consistent with the frozen feature extraction paradigm. The same inference procedure was applied to SPARE-BA models trained on DLMUSE-derived features and NeuroJEPA-SVR trained on NeuroJEPA embeddings, ensuring a fair comparison between approaches under identical conditions. For the IXI inference, we combined predictions from all 5-fold SVR models into an ensemble, as this approach typically yields more robust and stable predictions by averaging out individual model variances. The results of the IXI inference are included in Table 3 and Fig. 5. The SVR model fitted on Brain2Vec embeddings yielded the best results, confirming that Brain2Vec has learned a generalizable representation of brain morphology that serves as a compact yet informative feature space for efficient downstream tasks.
Table 3: SVR brain age regression testing results.
| Model | MAE | MSE | RMSE | |
|---|---|---|---|---|
| SPARE-BA | 4.3695 ± 0.049 | 33.0857 ± 0.668 | 5.7517 ± 0.058 | 0.6798 ± 0.012 |
| NeuroJEPA-SVR | 3.4387 ± 0.070 | 19.6002 ± 0.787 | 4.4263 ± 0.089 | 0.8105 ± 0.008 |
| Brain2Vec-SVR | 3.4349 ± 0.017 | 19.6184 ± 0.127 | 4.4292 ± 0.014 | 0.8126 ± 0.001 |
| IXI Inference | ||||
| SPARE-BA | 7.8869 | 93.0798 | 9.6478 | 0.1709 |
| NeuroJEPA-SVR | 5.1895 | 40.9347 | 6.3980 | 0.6354 |
| Brain2Vec-SVR | 5.1039 | 40.5048 | 6.3643 | 0.6392 |
4.2.2 Disease and risk-factor classification
Following the same protocol as the brain age prediction experiments, we trained SVM classifiers on our disease classification dataset explained in Sec. 3.1. We used 5-fold cross-validation, with hyperparameters tuned via Optuna [1] through nested 5-fold cross-validation on each training set, optimizing for F1 score. Splits were stratified by disease or risk-factor.
Despite the encoder being trained without any disease supervision, the learned representations yielded strong classification performance across all disease groups, indicating that Brain2Vec captures clinically meaningful morphological structure beyond its explicit training objective. Compared to SPARE models trained on DLMUSE-derived features, our approach outperformed across all tasks in terms of accuracy, AUC, F1 score, recall and precision, except for AD classification, where DLMUSE retained a clear advantage. Compared to NeuroJEPA, Brain2Vec performed better on diabetes and smoking classification, while NeuroJEPA performed better on AD and elevated BMI classification, with comparable results on hypertension (Table 4).
Table 4: SVM disease classification testing results (mean ± std across 5 folds).
| Task | Method | Accuracy | AUC | F1 | Recall | Precision |
|---|---|---|---|---|---|---|
| CU vs. AD | DLMUSE | 0.8325 ± 0.017 | 0.9022 ± 0.014 | 0.8323 ± 0.017 | 0.8604 ± 0.029 | 0.8154 ± 0.019 |
| NeuroJEPA | 0.8040 ± 0.018 | 0.8778 ± 0.009 | 0.8036 ± 0.018 | 0.7702 ± 0.045 | 0.8269 ± 0.021 | |
| Brain2Vec | 0.7845 ± 0.023 | 0.8586 ± 0.022 | 0.7844 ± 0.022 | 0.7725 ± 0.021 | 0.7928 ± 0.035 | |
| CU vs. Elevated BMI | DLMUSE | 0.6065 ± 0.023 | 0.6453 ± 0.036 | 0.6058 ± 0.024 | 0.6317 ± 0.023 | 0.6041 ± 0.025 |
| NeuroJEPA | 0.7884 ± 0.016 | 0.8672 ± 0.013 | 0.7884 ± 0.016 | 0.7920 ± 0.017 | 0.7865 ± 0.019 | |
| Brain2Vec | 0.7756 ± 0.010 | 0.8505 ± 0.014 | 0.7756 ± 0.010 | 0.7636 ± 0.013 | 0.7825 ± 0.011 | |
| CU vs. Diabetes | DLMUSE | 0.5929 ± 0.007 | 0.6350 ± 0.013 | 0.5925 ± 0.007 | 0.6136 ± 0.016 | 0.5908 ± 0.008 |
| NeuroJEPA | 0.6134 ± 0.060 | 0.6526 ± 0.077 | 0.6119 ± 0.063 | 0.6420 ± 0.027 | 0.6124 ± 0.062 | |
| Brain2Vec | 0.6442 ± 0.008 | 0.6953 ± 0.013 | 0.6440 ± 0.008 | 0.6218 ± 0.005 | 0.6512 ± 0.011 | |
| CU vs. Smoking | DLMUSE | 0.5116 ± 0.018 | 0.4900 ± 0.010 | 0.5023 ± 0.019 | 0.6305 ± 0.068 | 0.5104 ± 0.016 |
| NeuroJEPA | 0.5354 ± 0.043 | 0.5453 ± 0.054 | 0.5343 ± 0.043 | 0.5704 ± 0.049 | 0.5338 ± 0.041 | |
| Brain2Vec | 0.6242 ± 0.014 | 0.6626 ± 0.017 | 0.6238 ± 0.015 | 0.6494 ± 0.016 | 0.6188 ± 0.017 | |
| CU vs. Hypertension | DLMUSE | 0.5235 ± 0.028 | 0.4997 ± 0.001 | 0.5183 ± 0.031 | 0.6073 ± 0.038 | 0.5221 ± 0.027 |
| NeuroJEPA | 0.6126 ± 0.011 | 0.6519 ± 0.009 | 0.6121 ± 0.011 | 0.6404 ± 0.017 | 0.6078 ± 0.013 | |
| Brain2Vec | 0.6004 ± 0.013 | 0.6371 ± 0.008 | 0.6204 ± 0.011 | 0.6534 ± 0.029 | 0.5916 ± 0.016 |
We further assessed generalization through external validation on the MIRIAD dataset [29], comprising baseline T1 MRI scans from 46 mild-to-moderate Alzheimer's subjects and 23 cognitively normal controls. The DLMUSE-based features achieved the best overall performance. Brain2Vec reached an accuracy comparable to NeuroJEPA (0.84 vs. 0.83) with substantially higher recall (0.93 vs. 0.76) but lower precision (0.85 vs. 0.99), while NeuroJEPA achieved a higher AUC (0.97 vs. 0.94). Therefore, these differences in recall and precision largely reflect different operating points under potential domain shift rather than differences in discriminative ability: NeuroJEPA ranked the cases well but predicted AD conservatively at the default threshold, whereas Brain2Vec favored sensitivity. Overall, Brain2Vec generalized reasonably well to this independent cohort, although threshold calibration on new cohorts may be needed for all embedding-based models.
Table 5: CU vs AD inference on MIRIAD.
| Model | Accuracy | AUC | F1 | Recall | Precision |
|---|---|---|---|---|---|
| DLMUSE | 0.9353 ± 0.012 | 0.9776 ± 0.005 | 0.9289 ± 0.013 | 0.9333 ± 0.014 | 0.9679 ± 0.011 |
| NeuroJEPA | 0.8305 ± 0.045 | 0.9708 ± 0.004 | 0.8243 ± 0.045 | 0.7550 ± 0.060 | 0.9929 ± 0.014 |
| Brain2Vec | 0.8407 ± 0.017 | 0.9392 ± 0.011 | 0.8051 ± 0.028 | 0.9300 ± 0.019 | 0.8509 ± 0.030 |
We report per-site classification results in supplementary Table 13 for the three sites with the largest sample sizes. Results are broadly consistent with the overall findings in Table 4, while UKBiobank data, with the largest sample size obtained higher accuracy, and sites with younger subjects that fall outside the Brain2Vec model's training distribution, such as CARDIA and HCP, obtained lower accuracy. This highlights the importance of training data coverage for foundation models, as well as the potential need for domain adaptation techniques to optimize performance on out-of-distribution cohorts.
Supplementary Fig. 9 presents PCA visualizations of Brain2Vec embeddings for each classification cohort, colored by study site. The embeddings exhibit site-related structure, indicating that Brain2Vec also captures study-level variation in the input data.
4.3 Interpretability of Brain2Vec's Learned Representations
In medical imaging, there is a growing need for interpretable models, as they enable researchers and clinicians to understand how a model makes predictions and which features are important for each task [37]. We assessed Brain2Vec's interpretability through three complementary strategies: (i) visualizing self-attention maps to examine which spatial regions the model attends to, (ii) correlating latent embeddings with anatomically-defined regions of interest to identify which brain structures drive specific features, and (iii) manipulating latent embeddings and inspecting their effect on reconstructed anatomy to test whether individual features encode monotonic, region-specific changes.
Attention maps. We visualized what the model considers important by plotting its self-attention maps (Fig. 6). The resulting maps show that different attention heads learn distinct spatial patterns rather than attending uniformly across the entire brain, consistent with findings in other models [6]. As shown in the attention visualizations, different heads consistently emphasize different anatomical regions across the axial, coronal, and sagittal views. Some heads exhibit relatively localized attention around specific brain structures, whereas others capture more distributed patterns across larger portions of the brain. This diversity suggests that the multi-head self-attention mechanism enables Brain2Vec to encode complementary spatial information, with individual heads potentially capturing different anatomical or contextual characteristics of the input MRI. An important exception is the behavior of heads 0 and 9: across views and samples, these heads frequently assign substantial attention to regions outside the brain, particularly along the image boundaries and background (see Section A.6). This indicates that they are not primarily encoding meaningful brain anatomy and may instead capture image-level or acquisition-related characteristics.
Correlation with anatomically defined regions. The latent embeddings of foundation models trained on domain-specific data can be interpreted by quantifying their correlation with anatomically defined regions of interest, particularly those known to be affected by disease. To this end, we computed the Pearson correlation between each individual Brain2Vec latent dimension and each DLMUSE regional volume, together with the mean difference in each latent dimension between CU and AD subjects, in order to identify which dimensions are most strongly associated with

Figure 6: Self-attention map of a participant with Alzheimer's Disease derived using the Vision Transformer (ViT) encoder of Brain2Vec. The attention map is computed using the [CLS] token on the heads of the encoder's last ViT layer. Additional examples for all the heads are presented in supplementary Section A.6.
which anatomical region. As shown in Fig. 7, several latent dimensions exhibit strong correlations with specific brain regions, including the ventricles, gray matter, frontal regions, and white matter. Consistent with known neurodegenerative patterns in AD, we observe an inverse relationship between ventricular volume and gray matter, frontal, and white matter volumes.

(a) Effect sizes of anatomically matched Brain2Vec dimensions by brain region (Pearson ).

(b) Cross-region correlation profiles of Brain2Vec dimensions.
Figure 7: Correlation analysis of Brain2Vec latent embeddings with brain regions.
Latent manipulation. Leveraging the generative nature of the model, we masked brain regions and manipulated latent embeddings to test whether this produces a monotonic effect on the reconstruction. We performed this analysis for three regions: (i) ventricles (Fig. 13), (ii) frontal regions (Fig. 14), and (iii) gray matter (GM) regions (Fig. 15). For masking, a patch was masked if it contained at least one voxel within the region of interest, and otherwise remained visible to the encoder. Detailed masking and reconstruction examples are shown in Figures 16, 17, and 18. We manually selected a subset S of 22 latent features to manipulate (Supplementary Table 14). We progressively added the mean difference , where denotes the Brain2Vec latent embeddings, with magnitude , giving , where is the manipulated embedding. After reconstruction, we computed each region's volume using DLMUSE. Across all three regions, we observed the expected monotonic change in regional volume as increases, confirming that the manipulated latent dimensions encode a consistent, region-specific anatomical effect (Section A.7).
4.4 Inference Speed and Scalability
Inference efficiency is a critical but often underreported aspect of deep learning evaluation, particularly in medical imaging, where 3D volumetric data introduces substantial computational overhead. For Brain2Vec, which processes full 3D MRI scans to produce subject-level embeddings, efficient inference is especially important given the large and diverse cohorts it targets.
We compared Brain2Vec's inference time against DLMUSE, which uses an nnU-Net [26] to segment the brain and compute ROI volumes from the full 3D input, and against NeuroJEPA, which uses a similar ViT encoder augmented with a Mixture of Experts (MoE) layer [35] at inference time. Benchmarks were conducted on the IXI dataset (581 scans) using an A40 GPU, as well as single-subject inference on CPU. On GPU, Brain2Vec processed the full IXI cohort in 30 seconds ( seconds per scan), an speedup over DLMUSE and an speedup over NeuroJEPA. On CPU, Brain2Vec remained faster than DLMUSE, whereas NeuroJEPA was faster than Brain2Vec (6.98 vs. 45.73 seconds). This is likely because NeuroJEPA's sparse MoE layer activates only a subset of its parameters for each input, which reduces sequential computation on CPU. Brain2Vec's dense ViT encoder, by contrast, benefits more from GPU parallelism. Overall, Brain2Vec offers substantially lower computational cost in GPU-based, cohort-scale settings while maintaining strong predictive performance (Table 6).
Table 6: Brain2Vec inference performance.
| Model | FLOPs | #Params | GPU (A40) | CPU |
|---|---|---|---|---|
| DLMUSE | 965.3B | 16.6M | 43.41 (min.) - n = 581 | 6.39 (min.) - n = 1 |
| NeuroJEPA | 172.9B | 122.0M | 3.62 (min.) - n = 581 | 6.98 (sec.) - n = 1 |
| Brain2Vec | 177.3B | 88.6M | 30.03 (sec.) - n = 581 | 45.73 (sec.) - n = 1 |
5 Discussion
In this work, we introduced Brain2Vec, a self-supervised foundation model trained on 74, 425 T1-weighted brain MRI scans. We evaluated Brain2Vec across multiple settings: fine-tuning for brain age prediction, feature extraction for disease classification, external validation on an independent cohort, interpretability analysis, and inference efficiency. We demonstrated that Brain2Vec serves as a versatile dual-purpose framework: (1) accelerating convergence and improving predictive accuracy when fine-tuned as a 3D ViT backbone, and (2) offering a rich, 768-dimensional frozen feature space that is competitive with or superior to both anatomically-derived volumetric features and larger foundation models across a range of disease classification tasks. Beyond predictive performance, we showed that Brain2Vec's learned representations are anatomically meaningful and interpretable, with generative manipulation of its latent dimensions revealing biologically interpretable, continuous neurodegenerative phenotypes in reconstructed brain space.
Our results reveal a consistent trade-off between anatomical segmentations and self-supervised continuous embeddings. While traditional pipelines like DLMUSE excel at detecting localized structural changes such as volumetric atrophy in Alzheimer's Disease, they are constrained by fixed anatomical boundaries. Conversely, Brain2Vec representations outperformed DLMUSE on harder classification tasks (e.g., diabetes, smoking, elevated BMI). This suggests that Brain2Vec may be learning representations beyond those captured by standard volumetric features derived from anatomical segmentation.
One notable finding of this study is that Brain2Vec-SVR models achieve competitive predictive performance relative to NeuroJEPA, a state-of-the-art foundation model, across several downstream tasks, despite Brain2Vec being pre-trained on fewer scans (74, 425 vs 683, 860). We attribute this sample efficiency to the inductive bias of our training objective within the structural MRI domain.
At their core, Joint Embedding Predictive Architectures (JEPA) like NeuroJEPA, use a context input x to estimate the embedded state of a target input y. This process relies on a predictor conditioned on an extra variable z to account for variability during feature-space prediction. However, in standardized neuroimaging datasets where scans are skull-stripped, atlas-registered, and anatomically aligned, latent representation matching presents a relatively low-variance objective. It is well documented that representation collapse is a concern with JEPA architectures [2]. In contrast, representation collapse is not a concern with reconstruction-based methods. Generative architectures mask a high percentage of the input and use an encoder to produce latent embeddings z of the masked input y and using a decoder, learn to reconstruct the original (unmasked) input x. This forces the encoder to learn high-fidelity structural priors and inter-regional anatomical dependencies across the entire brain volume. This dense supervisory signal explains both the model's high sample efficiency and the strong, explicit alignment observed between Brain2Vec latent dimensions and regional brain volumes (Section 4.3).
A common critique of deep feature extractors in neuroimaging is their limited interpretability relative to anatomically defined ROI volumes. Through latent manipulation experiments (Section 4.3), we provided evidence that Brain2Vec's latent dimensions can be linked to anatomically meaningful, region-specific effects, offering a step toward addressing this limitation. Progressively shifting latent dimensions along disease-associated vectors produced monotonic, anatomically plausible changes in reconstructed scans, specifically capturing ventricular expansion, and gray and white matter volume decrease. This generative steering provides evidence that the learned latent space encodes coherent, continuous radiological phenotypes rather than uninterpretable noise.
Despite being trained on a large and diverse dataset, Brain2Vec has two notable limitations. First, UK Biobank dataset dominates the training data ( 55%), which may bias learned representations toward its specific acquisition protocol and reduce embedding quality for scans acquired under substantially different conditions. Second, the training cohort is skewed toward older adults (mean age 65.0 years; fewer than 5% of scans from studies with mean age below 45), which may limit the model's representational accuracy for younger populations. Users applying Brain2Vec outside its training distribution should take these factors into account.
Brain2Vec code and trained models are publicly available at https://github.com/CBICA/Brain2Vec. Embeddings can be extracted locally via the installable package or through the NiChart cloud platform (https://cloud.neuroimagingchart.com), which requires no local installation or specialized infrastructure.
References
[1] Takuya Akiba, Shotaro Sano, Toshihiko Yanase, Takeru Ohta, and Masanori Koyama. Optuna: A next-generation hyperparameter optimization framework, 2019.
[2] Mahmoud Assran, Quentin Duval, Ishan Misra, Piotr Bojanowski, Pascal Vincent, Michael Rabbat, Yann LeCun, and Nicolas Ballas. Self-supervised learning from images with a joint-embedding predictive architecture, 2023.
[3] Vishnu M. Bashyam, Guray Erus, Yuhan Cui, Di Wu, Gyujoon Hwang, Alexander Getka, Ashish Singh, George Aidinis, Kyunglok Baik, Randa Melhem, Elizabeth Mamourian, Jimit Doshi, Ashwini Davison, Ilya M. Nasrallah, Christos Davatzikos, for the Alzheimer's Disease Neuroimaging Initiative, and for the iSTAGING Consortium. DLMUSE: Robust Brain Segmentation in Seconds Using Deep Learning. Radiology: Artificial Intelligence, 7(6):e240299, November 2025.
[4] Benjamin Billot, Douglas N. Greve, Oula Puonti, Axel Thielscher, Koen Van Leemput, Bruce Fischl, Adrian V. Dalca, and Juan Eugenio Iglesias. SynthSeg: Segmentation of brain MRI scans of any contrast and resolution without retraining. Medical Image Analysis, 86:102789, 2023.
[5] Biomedical Image Analysis Group, Imperial College London. IXI Dataset – Information eXtraction from Images. https://brain-development.org/ixi-dataset/. EPSRC Grant GR/S21533/02. Data available under CC BY-SA 3.0 license.
[6] Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers, 2021.
[7] Zekai Chen, Devansh Agarwal, Kshitij Aggarwal, Wiem Safta, Mariann Micsinai Balan, and Kevin Brown. Masked Image Modeling Advances 3D Medical Image Analysis. In 2023 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pages 1969–1979, January 2023. ISSN: 2642-9381.
[8] James H. Cole and Katja Franke. Predicting Age Using Neuroimaging: Innovative Brain Ageing Biomarkers. Trends in Neurosciences, 40(12):681–690, December 2017.
[9] Joseph Cox, Peng Liu, Skylar E. Stolte, Yunchao Yang, Kang Liu, Kyle B. See, Huiwen Ju, and Ruogu Fang. BrainSegFounder: Towards 3D foundation models for neuroimage segmentation. Medical Image Analysis, 97:103301, October 2024.
[10] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 248–255, 2009.
[11] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Jill Burstein, Christy Doran, and Thamar Solorio, editors, Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics.
[12] Jimit Doshi, Guray Erus, Yangming Ou, Susan M. Resnick, Ruben C. Gur, Raquel E. Gur, Theodore D. Satterthwaite, Susan Furth, and Christos Davatzikos. MUSE: MUlti-atlas region Segmentation utilizing Ensembles of registration algorithms and parameters, and locally optimal atlas selection. NeuroImage, 127:186–195, February 2016.
[13] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An Image is Worth Words: Transformers for Image Recognition at Scale. October 2020.
[14] Bruce Fischl. FreeSurfer. NeuroImage, 62(2):774–781, 2012.
[15] Bruce Fischl and Anders M. Dale. Measuring the thickness of the human cerebral cortex from magnetic resonance images. Proceedings of the National Academy of Sciences, 97(20):11050–11055, 2000.
[16] Priya Goyal, Piotr Dollár, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet in 1 hour, 2018.
[17] Ludovica Griffanti, Giovanna Zamboni, Aamira Khan, Linxin Li, Guendalina Bonifacio, Vaanathi Sundaresan, Ursula G. Schulz, Wilhelm Kuker, Marco Battaglini, Peter M. Rothwell, and Mark Jenkinson. BIANCA (Brain Intensity AbNormality Classification Algorithm): A new tool for automated segmentation of white matter hyperintensities. NeuroImage, 141:191–205, 2016.
[18] Xiaojuan Guo, Zhiqun Wang, Kuncheng Li, Ziyi Li, Zhigang Qi, Zhen Jin, Li Yao, and Kewei Chen. Voxel-based assessment of gray and white matter volumes in alzheimer's disease. Neuroscience Letters, 468(2):146–150, 2010.
[19] M. Habes, D. Janowitz, G. Erus, J. B. Toledo, S. M. Resnick, J. Doshi, S. Van der Auwera, K. Wittfeld, K. Hegenscheid, N. Hosten, R. Biffar, G. Homuth, H. Völzke, H. J. Grabe, W. Hoffmann, and C. Davatzikos. Advanced brain aging: relationship with epidemiologic and genetic risk factors, and overlap with Alzheimer disease atrophy patterns. Translational Psychiatry, 6(4):e775–e775, April 2016.
[20] Mohamad Habes, Raymond Pomponio, Haochang Shou, Jimit Doshi, Elizabeth Mamourian, Guray Erus, Ilya Nasrallah, Lenore J. Launer, Tanweer Rashid, Murat Bilgel, Yong Fan, Jon B. Toledo, Kristine Yaffe, Aristeidis Sotiras, Dhivya Srinivasan, Mark Espeland, Colin Masters, Paul Maruff, Jurgen Fripp, Henry Völzk, Sterling C. Johnson, John C. Morris, Marilyn S. Albert,
Michael I. Miller, R. Nick Bryan, Hans J. Grabe, Susan M. Resnick, David A. Wolk, Christos Davatzikos, and iSTAGING consortium, the Preclinical AD consortium, the ADNI, and the CARDIA studies. The Brain Chart of Aging: Machine-learning analytics reveals links between brain aging, white matter disease, amyloid burden, and cognition in the iSTAGING consortium of 10,216 harmonized MR scans. Alzheimer's & Dementia: The Journal of the Alzheimer's Association, 17(1):89–102, January 2021.
[21] Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, and Ross Girshick. Masked Autoencoders Are Scalable Vision Learners. In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 15979–15988, June 2022. ISSN: 2575-7075.
[22] Haoxu Huang, Long Chen, Jingyun Chen, Jinu Hyun, James Ryan Loftus, Kara Melmed, Daniel Orringer, Jennifer Frontera, Seena Dehkharghani, Arjun Masurkar, and Narges Razavian. Learning sparse latent predictive foundation model for multimodal neuroimaging, 2026.
[23] Shih-Cheng Huang, Anuj Pareek, Malte Jensen, Matthew P. Lungren, Serena Yeung, and Akshay S. Chaudhari. Self-supervised learning for medical image classification: a systematic review and implementation guidelines. npj Digital Medicine, 6(1):74, April 2023.
[24] Xinhao Huang, Zihao Wang, Weichen Zhou, Kexin Yang, Kaihua Wen, Haiguang Liu, Shoujin Huang, and Mengye Lyu. Tailored self-supervised pretraining improves brain MRI diagnostic models. Computerized Medical Imaging and Graphics, 123:102560, July 2025.
[25] Gyujoon Hwang, Ahmed Abdulkadir, Guray Erus, Mohamad Habes, Raymond Pomponio, Haochang Shou, Jimit Doshi, Elizabeth Mamourian, Tanweer Rashid, Murat Bilgel, Yong Fan, Aristeidis Sotiras, Dhivya Srinivasan, John C. Morris, Marilyn S. Albert, Nick R. Bryan, Susan M. Resnick, Ilya M. Nasrallah, Christos Davatzikos, David A. Wolk, from the iSTAGING consortium, and for the ADNI. Disentangling Alzheimer's disease neurodegeneration from typical brain ageing using machine learning. Brain Communications, 4(3):fcac117, June 2022.
[26] Fabian Isensee, Jens Petersen, Andre Klein, David Zimmerer, Paul F. Jaeger, Simon Kohl, Jakob Wasserthal, Gregor Koehler, Tobias Norajitra, Sebastian Wirkert, and Klaus H. Maier-Hein. nnu-net: Self-adapting framework for u-net-based medical image segmentation, 2018.
[27] Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts, 2017.
[28] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization, 2019.
[29] Ian B. Malone, David Cash, Gerard R. Ridgway, David G. MacManus, Sebastien Ourselin, Nick C. Fox, and Jonathan M. Schott. MIRIAD—Public release of a multiple time point Alzheimer's MR imaging dataset. NeuroImage, 70:33–36, April 2013.
[30] Sean Michael Nestor, Raul Rupsingh, Michael Borrie, Matthew Smith, Vittorio Accomazzi, Jennie L. Wells, Jennifer N Fogarty, and Robert Bartha. Ventricular enlargement as a possible measure of alzheimer's disease progression validated using the alzheimer's disease neuroimaging initiative database. Brain : a journal of neurology, 131 Pt 9:2443–54, 2008.
[31] Vincent Planche, José V. Manjon, Boris Mansencal, Enrique Lanuza, Thomas Tourdias, Gwenaëlle Catheline, and Pierrick Coupé. Structural progression of alzheimer's disease over decades: the mri staging scheme. Brain Communications, 4(3):fcac109, 06 2022.
[32] Raymond Pomponio, Guray Erus, Mohamad Habes, Jimit Doshi, Dhivya Srinivasan, Elizabeth Mamourian, Vishnu Bashyam, Ilya M. Nasrallah, Theodore D. Satterthwaite, Yong Fan, Lenore J. Launer, Colin L. Masters, Paul Maruff, Chuanjun Zhuo, Henry Völzke, Sterling C. Johnson, Jurgen Fripp, Nikolaos Koutsouleris, Daniel H. Wolf, Raquel Gur, Ruben Gur, John Morris, Marilyn S. Albert, Hans J. Grabe, Susan M. Resnick, R. Nick Bryan, David A. Wolk, Russell T. Shinohara, Haochang Shou, and Christos Davatzikos. Harmonization of large MRI datasets for the analysis of brain imaging patterns throughout the lifespan. NeuroImage, 208:116450, March 2020.
[33] Fernando Pérez-García, Rachel Sparks, and Sébastien Ourselin. Torchio: A python library for efficient loading, preprocessing, augmentation and patch-based sampling of medical images in deep learning. Computer Methods and Programs in Biomedicine, 208:106236, 2021.
[34] Saima Rathore, Mohamad Habes, Muhammad Aksam Iftikhar, Amanda Shacklett, and Christos Davatzikos. A review on neuroimaging-based classification studies and associated feature extraction methods for alzheimer's disease and its prodromal stages, jul 2017.
[35] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer, 2017.
[36] Divyanshu Tak, Biniam A. Garomsa, Anna Zapaishchykova, Tafadzwa L. Chaunzwa, Juan Carlos Climent Pardo, Zezhong Ye, John Zielke, Yashwanth Ravipati, Suraj Pai, Sri Vajapeyam, Maryam Mahootiha, Mitchell Parker, Luke R. G. Pike, Ceilidh Smith, Ariana M. Familiar, Kevin X. Liu, Sanjay Prabhu, Omar Arnaout, Pratiti Bandopadhayay, Ali Nabavizadeh, Sabine Mueller, Hugo JWL Aerts, Raymond Y. Huang, Tina Y. Poussaint, and Benjamin H. Kann. A generalizable foundation model for analysis of human brain MRI. Nature Neuroscience, 29(4):945–956, April 2026.
[37] Vivien van Veldhuizen, Vanessa Botha, Chunyao Lu, Melis Erdal Cesur, Kevin Groot Lipman, Edwin D. de Jong, Hugo Horlings, Clárisa I. Sanchez, Cees G. M. Snoek, Lodewyk Wessels, Ritse Mann, Eric Marcus, and Jonas Teuwen. Foundation models in medical imaging: A review and outlook, 2025.
[38] Jennifer L Whitwell, Dennis W Dickson, Melissa E Murray, Stephen D Weigand, Nirubol Tosakulwong, Matthew L Senjem, David S Knopman, Bradley F Boeve, Joseph E Parisi, Ronald C Petersen, Clifford R Jack, and Keith A Josephs. Neuroimaging correlates of pathologically defined subtypes of alzheimer's disease: a case-control study. The Lancet Neurology, 11(10):868–877, 2012.
[39] Lei Zhou, Huidong Liu, Joseph Bae, Junjun He, Dimitris Samaras, and Prateek Prasanna. Self pre-training with masked autoencoders for medical image classification and segmentation. In 2023 IEEE 20th International Symposium on Biomedical Imaging (ISBI), pages 1–6, 2023.
A Supplementary materials
A.1 Characteristics of the datasets used for downstream prediction tasks
Table 7: Characteristics of the training and validation datasets for brain age prediction.
| Training Set | Validation Set | ||||||
|---|---|---|---|---|---|---|---|
| Study | n | Mean Age ± Std | (%) F | Study | n | Mean Age ± Std | (%) F |
| UKBIOBANK | 10,240 | 66.23 ± 7.14 | 45.39 | UKBIOBANK | 5,141 | 66.25 ± 7.14 | 45.75 |
| HCP | 465 | 42.03 ± 18.89 | 54.19 | HCP | 204 | 41.83 ± 19.46 | 58.33 |
| AIBL | 183 | 72.92 ± 5.92 | 55.74 | AIBL | 90 | 73.03 ± 5.62 | 60.00 |
| BLSA | 158 | 56.71 ± 17.72 | 65.19 | BLSA | 76 | 54.95 ± 17.63 | 63.16 |
| SHIP | 149 | 40.24 ± 13.37 | 42.95 | SHIP | 88 | 38.95 ± 12.38 | 34.09 |
| BIOCARD | 117 | 60.39 ± 9.83 | 58.12 | BIOCARD | 53 | 56.17 ± 8.24 | 67.92 |
| PreventAD | 116 | 62.20 ± 4.34 | 68.97 | PreventAD | 66 | 62.61 ± 3.92 | 66.67 |
| ADNI | 115 | 70.84 ± 4.05 | 73.91 | ADNI | 51 | 72.23 ± 5.08 | 64.71 |
| MESA | 129 | 80.36 ± 7.45 | 57.36 | MESA | 69 | 78.03 ± 7.87 | 40.58 |
| CARDIA | 59 | 51.24 ± 3.71 | 44.07 | CARDIA | 34 | 51.74 ± 3.08 | 44.12 |
| OASIS | 45 | 60.32 ± 8.56 | 51.11 | OASIS | 19 | 62.26 ± 7.10 | 73.68 |
| WHIMS | 14 | 70.77 ± 4.16 | 100.00 | WHIMS | 6 | 69.17 ± 2.41 | 100.00 |
| HANDLS | 8 | 53.75 ± 8.12 | 37.50 | HANDLS | 5 | 53.24 ± 11.08 | 0.00 |
| Total | 11,798 (60%) | 64.93 ± 10.18 | 46.97 | Total | 5,902 (30%) | 64.91 ± 10.15 | 47.09 |
Table 8: Characteristics of the training and validation datasets for CU vs. AD classification.
| CU | AD | ||||||
|---|---|---|---|---|---|---|---|
| Study | n | Mean Age ± Std | (%) F | Study | n | Mean Age ± Std | (%) F |
| ADNI | 419 | 74.68 ± 7.12 | 45.11 | ADNI | 418 | 74.83 ± 7.72 | 44.26 |
| OASIS | 313 | 75.04 ± 7.33 | 52.40 | OASIS | 313 | 75.49 ± 7.49 | 49.52 |
| AIBL | 92 | 74.16 ± 7.72 | 59.78 | AIBL | 92 | 74.23 ± 7.92 | 59.78 |
| BLSA | 9 | 81.33 ± 8.76 | 33.33 | BLSA | 9 | 81.44 ± 8.91 | 33.33 |
| PENN | 7 | 70.01 ± 7.45 | 42.86 | PENN | 7 | 70.81 ± 6.96 | 71.43 |
| UKBIOBANK | 4 | 60.87 ± 4.35 | 25.00 | UKBIOBANK | 4 | 60.96 ± 4.43 | 25.00 |
| BIOCARD | 1 | 70.37 ± 0.00 | 0.00 | BIOCARD | 1 | 70.26 ± 0.00 | 0.00 |
| Total | 845 | 74.72 ± 7.39 | 49.11 | Total | 844 | 74.97 ± 7.76 | 47.87 |
Table 9: Characteristics of the training and validation datasets for CU vs. Diabetes classification.
| CU | Diabetes | ||||||
|---|---|---|---|---|---|---|---|
| Study | n | Mean Age ± Std | (%) F | Study | n | Mean Age ± Std | (%) F |
| UKBIOBANK | 2,051 | 66.12 ± 7.16 | 36.03 | UKBIOBANK | 2,051 | 66.14 ± 7.19 | 36.03 |
| SHIP | 371 | 59.84 ± 11.13 | 47.44 | SHIP | 371 | 60.13 ± 11.27 | 42.05 |
| MESA | 169 | 74.59 ± 7.45 | 46.15 | MESA | 169 | 74.72 ± 7.52 | 46.15 |
| BLSA | 107 | 68.47 ± 9.96 | 55.14 | BLSA | 107 | 68.41 ± 9.93 | 55.14 |
| CARDIA | 108 | 51.66 ± 3.75 | 56.48 | CARDIA | 108 | 51.74 ± 3.88 | 56.48 |
| OASIS | 57 | 70.41 ± 8.73 | 57.89 | OASIS | 57 | 70.48 ± 8.60 | 57.89 |
| AIBL | 55 | 72.60 ± 5.99 | 50.91 | AIBL | 55 | 72.58 ± 5.90 | 50.91 |
| HANDLS | 41 | 55.00 ± 9.51 | 53.66 | HANDLS | 41 | 54.77 ± 9.33 | 51.22 |
| ADNI | 28 | 73.87 ± 5.70 | 32.14 | ADNI | 28 | 74.03 ± 5.69 | 32.14 |
| WHIMS | 7 | 68.00 ± 1.41 | 100.00 | WHIMS | 7 | 68.00 ± 1.41 | 100.00 |
| PreventAD | 7 | 67.26 ± 5.85 | 57.14 | PreventAD | 7 | 67.41 ± 6.23 | 57.14 |
| WRAP | 2 | 70.00 ± 0.40 | 50.00 | WRAP | 2 | 65.05 ± 0.35 | 100.00 |
| HCP | 2 | 29.00 ± 2.00 | 0.00 | HCP | 2 | 29.00 ± 2.00 | 0.00 |
| PENN | 1 | 69.00 ± 0.00 | 100.00 | PENN | 1 | 65.00 ± 0.00 | 100.00 |
| Total | 3,006 | 65.49 ± 9.04 | 40.52 | Total | 3,006 | 65.55 ± 9.06 | 39.85 |
Table 10: Characteristics of the training and validation datasets for CU vs. Elevated BMI classification.
| CU | BMI | ||||||
|---|---|---|---|---|---|---|---|
| Study | n | Mean Age ± Std | (%) F | Study | n | Mean Age ± Std | (%) F |
| UKBIOBANK | 1,702 | 62.17 ± 7.17 | 61.69 | UKBIOBANK | 1,702 | 62.16 ± 7.18 | 61.69 |
| CARDIA | 132 | 50.22 ± 3.94 | 72.73 | CARDIA | 132 | 50.16 ± 3.86 | 72.73 |
| HCP | 122 | 37.25 ± 13.59 | 68.03 | HCP | 122 | 37.27 ± 13.59 | 68.03 |
| SHIP | 127 | 56.00 ± 12.29 | 63.78 | SHIP | 127 | 56.00 ± 12.29 | 63.78 |
| MESA | 106 | 70.70 ± 5.76 | 68.87 | MESA | 106 | 70.61 ± 5.94 | 68.87 |
| ADNI | 71 | 70.35 ± 5.86 | 70.42 | ADNI | 71 | 70.38 ± 5.89 | 70.42 |
| OASIS | 66 | 67.98 ± 6.86 | 69.70 | OASIS | 66 | 67.86 ± 6.99 | 69.70 |
| BLSA | 55 | 61.71 ± 10.62 | 67.27 | BLSA | 55 | 61.89 ± 10.68 | 67.27 |
| HANDLS | 47 | 52.03 ± 8.62 | 76.60 | HANDLS | 47 | 51.92 ± 9.01 | 78.72 |
| AIBL | 23 | 71.82 ± 4.97 | 69.57 | AIBL | 23 | 71.87 ± 4.97 | 69.57 |
| PreventAD | 16 | 64.50 ± 4.98 | 75.00 | PreventAD | 16 | 64.46 ± 5.04 | 75.00 |
| BIOCARD | 14 | 49.81 ± 9.72 | 71.43 | BIOCARD | 13 | 50.81 ± 9.40 | 69.23 |
| WHIMS | 8 | 68.00 ± 2.87 | 100.00 | WHIMS | 8 | 68.00 ± 2.87 | 100.00 |
| WRAP | 2 | 70.00 ± 0.40 | 50.00 | WRAP | 2 | 70.90 ± 0.40 | 100.00 |
| PENN | 1 | 70.20 ± 0.00 | 100.00 | PENN | 1 | 70.91 ± 0.00 | 100.00 |
| Total | 2,492 | 60.62 ± 10.41 | 64.21 | Total | 2,491 | 60.61 ± 10.42 | 64.27 |
Table 11: Characteristics of the training and validation datasets for smoker vs. non-smoker classification.
| Non-smoker | Smoker | ||||||
|---|---|---|---|---|---|---|---|
| Study | n | Mean Age ± Std | (%) F | Study | n | Mean Age ± Std | (%) F |
| UKBIOBANK | 1,051 | 61.52 ± 7.57 | 45.58 | UKBIOBANK | 1,051 | 61.55 ± 7.56 | 45.58 |
| SHIP | 680 | 52.71 ± 13.72 | 42.35 | SHIP | 680 | 52.46 ± 13.67 | 61.62 |
| HCP | 180 | 29.41 ± 3.34 | 43.89 | HCP | 180 | 29.27 ± 3.22 | 43.89 |
| CARDIA | 144 | 50.54 ± 4.16 | 48.61 | CARDIA | 144 | 50.31 ± 3.80 | 48.61 |
| ADNI | 95 | 74.97 ± 4.69 | 43.16 | ADNI | 95 | 75.00 ± 4.59 | 43.16 |
| MESA | 62 | 70.26 ± 6.50 | 53.23 | MESA | 62 | 70.29 ± 6.49 | 53.23 |
| OASIS | 44 | 65.75 ± 8.83 | 70.45 | OASIS | 44 | 65.88 ± 8.55 | 70.45 |
| BLSA | 30 | 62.90 ± 12.08 | 30.00 | BLSA | 30 | 62.90 ± 11.93 | 30.00 |
| HANDLS | 47 | 51.33 ± 9.04 | 55.32 | HANDLS | 47 | 51.91 ± 9.80 | 48.94 |
| AIBL | 22 | 70.21 ± 7.55 | 45.45 | AIBL | 22 | 70.23 ± 6.96 | 45.45 |
| WHIMS | 4 | 69.25 ± 2.17 | 100.00 | WHIMS | 4 | 69.00 ± 1.87 | 100.00 |
| Total | 2,359 | 56.62 ± 13.64 | 45.36 | Total | 2,359 | 56.55 ± 13.67 | 50.78 |
Table 12: Characteristics of the training and validation datasets for CU vs. Hypertension classification.
| CU | Hypertension | ||||||
|---|---|---|---|---|---|---|---|
| Study | n | Mean Age ± Std | (%) F | Study | n | Mean Age ± Std | (%) F |
| UKBIOBANK | 1,484 | 61.85 ± 7.13 | 58.22 | UKBIOBANK | 1,484 | 61.95 ± 7.33 | 64.35 |
| SHIP | 82 | 51.96 ± 11.53 | 53.66 | SHIP | 82 | 50.00 ± 11.45 | 71.95 |
| PreventAD | 9 | 66.87 ± 6.47 | 66.67 | PreventAD | 9 | 63.98 ± 4.29 | 100.00 |
| MESA | 46 | 70.30 ± 6.40 | 47.83 | MESA | 46 | 71.35 ± 8.35 | 52.17 |
| HANDLS | 12 | 50.52 ± 9.33 | 50.00 | HANDLS | 12 | 51.02 ± 8.37 | 83.33 |
| HCP | 59 | 43.90 ± 20.36 | 35.59 | HCP | 59 | 46.89 ± 19.61 | 71.19 |
| AIBL | 16 | 74.28 ± 5.67 | 62.50 | AIBL | 16 | 70.99 ± 4.68 | 50.00 |
| CARDIA | 53 | 51.51 ± 3.68 | 49.06 | CARDIA | 53 | 50.79 ± 4.70 | 49.06 |
| OASIS | 38 | 69.58 ± 7.05 | 65.79 | OASIS | 38 | 69.21 ± 8.17 | 60.53 |
| ADNI | 35 | 70.66 ± 7.13 | 51.43 | ADNI | 35 | 71.36 ± 5.96 | 42.86 |
| BLSA | 47 | 71.64 ± 8.81 | 70.21 | BLSA | 47 | 69.49 ± 11.41 | 42.55 |
| WHIMS | 5 | 69.40 ± 5.28 | 100.00 | WHIMS | 5 | 67.80 ± 3.92 | 100.00 |
| WRAP | 1 | 70.50 ± 0.00 | 100.00 | WRAP | 1 | 70.40 ± 0.00 | 100.00 |
| Total | 1,887 | 61.42 ± 9.56 | 57.29 | Total | 1,887 | 61.42 ± 9.63 | 63.43 |
A.2 Brain age gap differences across disease and risk-factor groups
We evaluated whether the brain age gap (BAG, predicted minus chronological age) captures disease and risk-factor related effects. Using two brain age models, Brain2Vec-SVR and ViT-BA, we computed BAG in multiple disease-specific datasets and compared each disease or risk-factor group with its matched control group. A higher BAG in the affected groups would indicate that the models' age predictions are sensitive to disease and risk-factor related changes in brain structure, beyond normal aging.

(a) Brain2Vec-SVR models. For the inference, we ensemble predictions from all 5-fold SVR models.

(b) ViT-BA model.
Figure 8: Brain age gap differences across disease and risk-factor groups.
A.3 Brain2Vec classification performance across studies
Table 13: Disease classification performance by study using Brain2Vec embeddings as input features.
| Study | n | Accuracy | AUC | F1 | Recall | Precision |
|---|---|---|---|---|---|---|
| CU vs AD | ||||||
| ADNI | 837 | |||||
| OASIS | 626 | |||||
| AIBL | 184 | |||||
| CU vs Elevated BMI | ||||||
| UKBIOBANK | 3404 | |||||
| CARDIA | 264 | |||||
| SHIP | 254 | |||||
| CU vs Diabetes | ||||||
| UKBIOBANK | 4102 | |||||
| SHIP | 742 | |||||
| MESA | 338 | |||||
| CU vs Smoking | ||||||
| UKBIOBANK | 2102 | |||||
| SHIP | 1360 | |||||
| HCP | 360 | |||||
| CU vs Hypertension | ||||||
| UKBIOBANK | 17797 | |||||
| SHIP | 978 | |||||
| HCP | 708 | |||||
A.4 Study-related variation in Brain2Vec embeddings for different disease and risk-factor groups
To assess whether Brain2Vec embeddings encode acquisition site in addition to anatomy, we projected the embeddings of each disease and risk-factor group onto their first two principal components and colored each scan by site.

(a) PCA on AD.

(b) PCA on Elevated BMI.
(c) PCA on Diabetes.

(d) PCA on Smoking.
(e) PCA on Hypertension.
Figure 9: Principal component analysis of Brain2Vec embeddings for samples in different disease and risk-factor groups, colored by acquisition site.
A.5 Selection of Brain2Vec features for latent manipulation
To construct the subset of manipulated features S used in Section 4.3, we identified Brain2Vec latent dimensions that are strongly associated with specific DLMUSE ROIs and have a consistent, monotonic effect on those regions under manipulation. For each Brain2Vec dimension, we computed (i) the mean difference between CU and AD subjects and (ii) its Pearson correlation with the best-matching DLMUSE ROI. Based on this ranking, we selected the 22 dimensions with the largest and most consistent effects (supplementary Table 14).
We restricted this latent manipulation analysis to the CU vs. AD task because it shows the largest anatomical differences between groups among the classification tasks we studied. We repeated the same selection procedure for other tasks in our cohort, including elevated BMI, smoking, diabetes, and hypertension, but did not observe features with comparably strong effects. This suggests that the latent directions identified for CU vs. AD reflect a stronger, more anatomically coherent signal than those for tasks with subtler or more heterogeneous structural correlates.
A.6 Example self-attention maps for CU, MCI, and AD participants

Figure 10: Self-attention map of a cognitively unimpaired patient
Table 14: Brain2Vec dimensions selected for latent manipulation and their best-matching DLMUSE ROIs
| Brain2Vec dim. | Mean difference | Cohen's d | DLMUSE ROI | Pearson r |
|---|---|---|---|---|
| 497 | 0.8365 | 509 (Ventricles) | 0.6624 | |
| 110 | -0.7359 | 509 (Ventricles) | -0.5890 | |
| 327 | 0.7299 | 509 (Ventricles) | 0.4885 | |
| 175 | -0.7027 | 509 (Ventricles) | -0.5720 | |
| 693 | -0.6911 | 509 (Ventricles) | -0.5170 | |
| 691 | -0.6884 | 509 (Ventricles) | -0.4771 | |
| 451 | 0.6811 | 4 (3rd Ventricle) | 0.6381 | |
| 230 | 0.6756 | 4 (3rd Ventricle) | 0.4295 | |
| 583 | 0.6637 | 509 (Ventricles) | 0.6794 | |
| 249 | -0.6602 | 4 (3rd Ventricle) | -0.5147 | |
| 521 | -0.6540 | 4 (3rd Ventricle) | -0.4167 | |
| 427 | 0.6466 | 4 (3rd Ventricle) | 0.4494 | |
| 188 | 0.6416 | 4 (3rd Ventricle) | 0.5080 | |
| 426 | 0.6399 | 509 (Ventricles) | 0.4882 | |
| 120 | -0.6355 | 4 (3rd Ventricle) | -0.5458 | |
| 431 | 0.6327 | 4 (3rd Ventricle) | 0.5534 | |
| 193 | 0.6245 | 509 (Ventricles) | 0.5414 | |
| 357 | 0.6171 | 509 (Ventricles) | 0.4215 | |
| 206 | 0.6017 | 509 (Ventricles) | 0.6608 | |
| 183 | 0.5969 | 4 (3rd Ventricle) | 0.4961 | |
| 201 | -0.5930 | 4 (3rd Ventricle) | -0.5834 | |
| 491 | -0.5909 | 509 (Ventricles) | -0.5279 |

Figure 11: Self attention map of a participant with mild cognitive impairment

Figure 12: Self-attention map of a participant with Alzheimer's disease
A.7 Manipulation of latent Brain2Vec embeddings

Figure 13: Effect on ventricles: we observe a monotonic increase of ventricle regions which is something clinically expected, as ventricular enlargement is a well-established radiological marker of neurodegeneration and disease progression in Alzheimer's disease [30].

Figure 14: Effect on frontal regions: we observe a monotonic decrease of frontal regions which is consistent with well-documented patterns of medial and lateral frontal lobe atrophy in AD patients [38, 31].

Figure 15: Effects on GM: we observe a similar trend on frontal regions as well as decreased GM and WM volumes, accompanied by an increase in cortical CSF. This pattern is consistent with enlargement of CSF spaces as brain tissue is lost, and is validated by prior volumetric findings in Alzheimer’s disease [18].
A.8 Brain2Vec masking and reconstruction examples

(a) Original input
(b) Ventricles region mask(c) Ventricles masking for(d) Ventricles reconstruction with Brain2Vec
Figure 16: Example of ventricles region masking and reconstruction with Brain2Vec.

(a) Original input
(b) Frontal region mask (c) Frontal masking for(d) Frontal reconstruction Brain2Vec with Brain2Vec
Figure 17: Example of frontal region masking and reconstruction with Brain2Vec.

(a) Original input
(b) GM region mask
(c) GM masking
Brain2Vec
for(d) GM reconstruction
with Brain2Vec
Figure 18: Example of gray matter region masking and reconstruction with Brain2Vec.