Figures and data


Demographics for each subsample analysed: number, age, and sex of participants who completed all cognitive tests, mental health questionnaires, and MRI scanning

Experimental design.
a UK Biobank variables: cognitive tests, mental health, and neuroimaging phenotypes from three MRI modalities. b Derivation of the g-factor from cognitive performance scores with Exploratory Structural Equation Modeling (ESEM) and prediction of the g-factor from mental health indices using Partial Least Squares Regression (PLSR). c Scheme of the machine learning model (PLSR) with nested cross-validation. d Scheme of the two-level predictive modeling and commonality analyses. First, individual neuroimaging phenotypes from dwMRI (42 phenotypes), rsMRI (10 phenotypes), and sMRI (20 phenotypes) are used as features to predict the g-factor. Then, g-factor values predicted from distinct neuroimaging phenotypes are combined within each modality (“dwMRI Stacked”, “rsMRI Stacked”, and “Stacked sMRI”) as well as across all modalities (“All MRI Stacked”) and used as features, resulting in one predicted value per subject per stacked model (ĝdwMRI, ĝrsMRI, ĝsMRI, and ĝallMRI). Finally, values predicted from MRI data together with the values predicted from mental health indices (ĝMH) are used as independent explanatory variables in commonality analyses. XD-scores, XR-scores, Xs-scores, and Y-scores, weighted linear combinations of the original features (dwMRI, rsMRI, and sMRI neuroimaging phenotypes, respectively) in PLSR; WM, white matter; TBSS, tract-based spatial statistics; ACT, anatomically-constrained tractography; iFOD2, Fiber Orientation Distributions; FA, fractional anisotropy; MD, mean diffusivity; MO, diffusion tensor mode; L1, L2, L3, eigenvalues of the diffusion tensor; ICVF, intracellular volume fraction; OD, orientation dispersion index; ISOVF, isotropic volume fraction; BOLD, blood oxygenation level dependent signal; ICA, independent component analysis; GM, grey matter; CSF, cerebrospinal fluid; F1, F2, F3, and F4, latent factors from ESEM; ESEM loadings, loadings of the test scores onto the latent factors and loadings of the latent factors onto the g-factor; X-loadings and Y-loadings, loadings of the predictor (mental health measures; X) and target (g-factor; Y) variables; respectively, onto the PLSR components; XM-scores and Y-scores, the weighted linear combinations of the original predictor (mental health measures) and target (g-factor) variables, respectively; ĝMH, values of the g-factor predicted from mental health features; ĝ, predicted values of the g-factor; r, Pearson r (between original and predicted values of the g-factor); R2, coefficient of determination (between original and predicted values of the g-factor); MAE, mean absolute error; CV, cross-validation.

g-factor modeling and the relationship between the g-factor and mental health features.
In our analysis, we derived the g-factor and built machine learning models in each outer fold separately. For visualization purposes, we display the results of the (a) Exploratory Structural Equation Modeling (ESEM) performed on a sample of 31 614 participants and (b) Partial Least Squares Regression (PLSR) model for the g-factor and mental health built on a sample of 21 077 participants with a single train/test split (80%/20%) as representations of ESEM and PLSR model structures across five folds. a Loadings of the cognitive test scores onto four latent factors and loading of the latent factors onto the g-factor based on the ESEM. b Scatterplot of the observed g-factor and g-factor predicted from mental health indices with PLSR. Out-of-sample predictive performance of the PLSR model is evaluated with Pearson r and R2 averaged across five folds. c Pearson correlations between the g-factor and mental health indices. Mental health features are grouped into categories. Within each category, a feature with the highest absolute value of Pearson r is annotated. Pale and bright dots represent non-significant and significant correlations, respectively. d Loadings of mental health indices in the PLSR model showing the relationships between the features (mental health) and the target variable (g-factor). The loadings are averaged across all PLSR components and weighted by R2 in the training set. Mental health features are grouped into categories. Within each category, a feature with the highest absolute value of the loading is annotated. SD, standard deviation (mean across five folds).

Predictive performance of machine learning models based on 72 individual neuroimaging phenotypes.
Bootstrap distribution of Pearson r for the g-factor derived from ESEM and g-factor predicted from each neuroimaging phenotype, and corresponding 95% confidence intervals (95% CI). Values at the top and bottom of the plots indicate the lower and upper 95% CI for the bootstrap Pearson r.

Predictive performance of machine learning models based on neuroimaging phenotypes stacked within and across three MRI modalities.
Bootstrap distribution of Pearson r between the g-factor derived from ESEM and the g-factor predicted from stacked dwMRI, rsMRI, sMRI, and all MRI modalities stacked. Values at the top of each plot mark the median Pearson r.

Feature importance maps for neuroimaging features with the highest predictive performance for cognition derived via the Haufe transformation
[62]. The colour of the lines (rsMRI and dwMRI) and subcortical structures (sMRI) indicates the magnitude and direction of Pearson correlations between the predicted g-factor and features from the top-performing neuroimaging phenotype. Correlations were computed in test sets pooled across 5 outer folds. rsMRI: A connectogram displays network-level feature importance for functional connectivity between 55 neuronally driven independent components (IC) grouped into seven networks (Yeo 2011 parcellation). Full correlation matrices rather than tangent space parameterization were used for interpretability. The IC with the highest activation within each network is highlighted in colour, and its corresponding functional connectivity map is overlaid. Values of Pearson r for top correlations are given in Fig. S3. dwMRI: The importance of structural connections (streamline count) between brain regions parcellated using the aparc (Desikan-Killiany) MSA-I atlases for predicting cognition is shown as a glass brain plot, with cortical/subcortical nodes (circles) and their connecting edges (lines) coloured by correlation direction and strength. Values of Pearson r for top correlations are given in Fig. S2. sMRI: Regional volumes of subcortical structures derived from FreeSurfer subcortical volumetric subsegmentation are overlaid on a glass brain. Values of Pearson r for top correlations are given in Fig. S5.

Results of commonality analyses: the contribution of neuroimaging phenotypes to the relationship between cognition and mental health.
Stacked bar plot diagrams of the results of commonality analyses for each neuroimaging phenotype. Unique variance proportion (%) of variance in the g-factor explained uniquely by mental health and neuroimaging phenotypes, Common variance proportion (%) of variance in the g-factor shared between mental health and neuroimaging phenotypes. aparc.a2009s, Destrieux cortical atlas; Schaefer7n200p, Schaefer Atlas for 7 networks and 200 parcels; Schaefer7n500p, Schaefer Atlas for 7 networks and 500 parcels; I, Melbourne Subcortical Atlas I; IV, Melbourne Subcortical Atlas IV; SIFT2, Spherical-Deconvolution Informed Filtering of Tractograms 2; FA, fractional anisotropy; MD, mean diffusivity; MO, diffusion tensor mode; L1, L2, and L3, eigenvalues of the diffusion tensor; OD, orientation dispersion index; ICVF, intracellular volume fraction; ISOVF, isotropic volume fraction; TBSS, Tract-Based Spatial Statistics; Func. Connectivity, functional connectivity; Subseg., Freesurfer subsegmentation; ASEG, Freesurfer automated subcortical volumetric segmentation; FSL FAST, FSL FMRIB’s Automated Segmentation Tool; WM, white matter; GM, grey matter; FSL, FIRST FMRIB’s Integrated Registration and Segmentation Tool; DKT, Desikan-Killiany-Tourville; BA, FreeSurfer ex-vivo Brodmann Area Maps.

Scatterplot of the relationship between the PLSR performance of individual neuroimaging phenotypes and the proportion of cognition-mental health relationship they capture.

The contribution of neuroimaging phenotypes stacked within each and across all MRI modalities to the relationship between cognition and mental health: Results of predictive modeling and commonality analyses.
a-d Distributions of the g-factor derived from cognitive tests via ESEM and predicted from stacked dwMRI (a), rsMRI (b), sMRI (c), and all MRI modalities (d). e-l Venn diagrams of the results of commonality analyses. e-h The proportion (%) of variance in the g-factor explained uniquely by mental health and neuroimaging phenotypes: dwMRI (e), rsMRI (f), sMRI (g), and all MRI modalities stacked (h), as well as the common effects between mental health and neuroimaging phenotypes. i-l The proportion (%) of variance in the g-factor explained uniquely by mental health, neuroimaging phenotypes stacked within dwMRI (i), rsMRI (j), sMRI (k), and all MRI modalities (l), and age and sex, as well as the common effects among all explanatory variables.