Study design schematic. (A, B) T1 MRI scans were minimally preprocessed according to the SFCN pipeline [14]. These were a) directly input into the pretrained brain age model, or b) split into 10 cross-validation folds to finetune the model. The finetuned model transferred the weights from the pretrained model for initialization. All layers were then retrained. Age predictions were obtained on the test folds. BAG was calculated by subtracting chronological age from predicted age. Model interpretability was interrogated using guided backpropagation. (C) Cross-sectional and longitudinal association of BAG and cognitive performance were tested using multiple linear regression models in both elderly and children. Time intervals for BAG and cognition, based on data availability, are shown schematically. Annual rate of change was calculated from a linear regression with time for each participant. All models included chronological age and sex as covariates. : models for elderly also included years of education as a covariate; *: models with (annual rate of) change in BAG also included baseline BAG as a covariate. Key: EDIS – Epidemiology of Dementia in Singapore; SLABS – Singapore-Longitudinal Aging Brain Study; GUSTO -Growing Up in Singapore Towards healthy Outcomes; BAG – brain age gap

Participant characteristics at baseline. EDIS was cross-sectional, while SLABS and GUSTO were longitudinal. Reported as mean ± standard deviation (range). *: GUSTO ethnicities were based on the mother. Key: M/F - Male/Female; C/M/I/O - Chinese/Malay/Indian/Other; MMSE – Mini-Mental State Examination; EDIS – Epidemiology of Dementia in Singapore; SLABS – Singapore Longitudinal Aging Brain Study; GUSTO - Growing Up in Singapore Towards healthy Outcomes

The pretrained brain age model performs well in elderly participants, while the finetuned model performs well in both elderly participants and children. Black identity lines representing perfect prediction are included for reference. (A) Predicted brain ages from the pretrained model are plotted against chronological age. They are highly correlated for EDIS and SLABS (elderly), but not GUSTO (children). (B) Predicted brain ages from the finetuned model are plotted against chronological age. They are highly correlated in all three datasets. Key: EDIS – Epidemiology of Dementia in Singapore; SLABS – Singapore-Longitudinal Aging Brain Study; GUSTO - Growing Up in Singapore Towards healthy Outcomes; N – Number of participants; r – Pearson’s correlation coefficient; MAE – Mean Absolute Error; NCI – No Cognitive Impairment; CIND – Cognitive Impairment No Dementia

Brain age gap from the pretrained model is negatively associated with executive function in elderly participants. Bolded p-values indicate significance after Holm-Bonferroni correction (pcorr < 0.05). indicates the change in adjusted R2 after adding the variable of interest. All models include chronological age, sex, and years of education as covariates. Models with change in BAG also include baseline BAG as a covariate. Results are similar after finetuning (Supplementary Figure S2) (A) Partial regression plot between baseline BAG and executive function in EDIS, colored by cognitive status. A significant negative association is observed. (B) Partial regression plot between baseline BAG and long-term rate of change in executive function (mean follow-up time = 7.8 ± 1.0 years) in SLABS. A negative association is observed, but it is not significant after correcting for multiple comparisons. (C) Partial regression plot of early longitudinal rate of change in BAG (mean follow-up time = 3.6 ± 0.8 years) when added to the model in (B). A significant negative association and increase in R2 is observed. (D) Partial regression plot as in (C), but with future rate of change in executive function (mean follow-up time = 4.2 ± 1.1 years), removing the overlap with early change in BAG. A significant negative association is again observed. Key: N – number of participants; p – p-value for variable of interest (x-axis); - change in adjusted R2 when adding variable of interest; BAG – Brain Age Gap; NCI – No Cognitive Impairment; CIND – Cognitive Impairment No Dementia; EDIS – Epidemiology of Dementia in Singapore; SLABS – Singapore-Longitudinal Aging Brain Study

Longitudinal brain age gap from the finetuned model is positively associated with inhibition in children. Bolded p-values indicate significance after Holm-Bonferroni correction (pcorr < 0.05). indicates the change in adjusted R2 after adding the variable of interest. All models include chronological age and sex as covariates. Models with change in BAG also include baseline BAG as a covariate. (A) Partial regression plot between baseline BAG (calculated from 4.5 or 6.0 years old) and future NEPSY-II inhibition scaled subscore (measured at 8.5 years old). No significant association is observed. (B) Partial regression plot of early longitudinal rate of change in BAG calculated from 4.5 to 7.5 years old (mean follow-up time = 2.4 ± 0.7 years) when added to the model in (A). A significant positive association and increase in R2 is observed. Key: N – number of participants; p – p-value for variable of interest (x-axis); -change in adjusted R2 when adding variable of interest; BAG – Brain Age Gap; GUSTO - Growing Up in Singapore Towards healthy Outcomes

Finetuned brain age models focus on distinct features in children and elderly participants. The top 10% of features are shown for four representative brain slices on the left. Relative contributions for gray and white matter features across the whole brain are shown on the right. Regions near the lateral ventricles are labeled in red. Features more prominent in elderly than children are labeled in magenta, while features more prominent in children than elderly are labeled in blue. Features and relative contributions are generally consistent between (A) EDIS and (B) SLABS, but key differences can be seen in (C) GUSTO. Key: EDIS – Epidemiology of Dementia in Singapore; SLABS – Singapore-Longitudinal Aging Brain Study; GUSTO - Growing Up in Singapore Towards healthy Outcomes; MCP – Middle cerebellar peduncle; PCT – Pontine crossing tract; gCC – Genu of corpus callosum; bCC – Body of corpus callosum; sCC – Splenium of corpus callosum; Fx – Fornix (column and body); CST – Corticospinal tract; ML – Medial lemniscus; ICP – Inferior cerebellar peduncle; SCP – Superior cerebellar peduncle; CP – Cerebral Peduncle; ALIC – Anterior limb of internal capsule; PLIC – Posterior limb of internal capsule; RLIC – Retrolenticular part of internal capsule; ACR – Anterior corona radiata; SCR – Superior corona radiata; PCR – Posterior corona radiata; PTR – Posterior thalamic radiation; SS – Sagittal stratum; EC – External capsule; Cingulum CG – Cingulum (cingulate gyrus); Cingulum HIP – Cingulum (hippocampus); Fx/ST – Fornix (cres) / Stria terminalis; SLF – Superior longitudinal fasciculus; SFO – Superior fronto-occipital fasciculus; UF – Uncinate fasciculus; TAP – Tapetum; Vis – Visual network; SomMot – Somatomotor network; DorsAttn – Dorsal attention network; SalVentAttn – Salience/Ventral attention network; Limbic – Limbic network; Cont – Control/frontoparietal network; Default – Default mode network; Hip+Amy – Hippocampus + amygdala; Put+Cau – Putamen + caudate; Thal – Thalamus