Study design
This was a nested case-control study designed to assess whether DMN effective connectivity can be used predict two outcomes of interest. The first outcome is a future diagnosis of dementia. The second outcome is time until dementia diagnosis. Potential confounders, which we identified and tried to control for in our analyses, included age, sex, ethnicity, handedness, in-scanner head motion, geographical location of data acquisition and social deprivation (Townsend index). All statistical tests reported are two-sided.
UKB sample selection
The UKB is a longitudinal cohort study that is regularly updated with healthcare outcomes from national UK primary and secondary healthcare databases. We identified all UKB participants who have ever had a dementia diagnosis on their health record, as of the UKB data update in May 2023, and who also had rs-fMRI data available on the UKB. Our sample size was therefore determined by data availability. Selection bias was mitigated in this study by identifying every single participant with a dementia diagnosis. This yielded an initial sample of 148 dementia cases. For each of these dementia cases, we identified ten control participants from the UKB who did not have a dementia diagnosis on their health record, and matched them with the dementia case in terms of age, sex, handedness, ethnicity and the geographical location of the MRI scanning center. After excluding participants who failed the preprocessing stage (for example, excessive head motion) and replacing failed controls with new matched controls we were left with a final usable sample of 103 cases and 1,030 matched controls. Of these 103 cases, 81 did not have a dementia diagnosis at the time of MRI data acquisition, whereas 22 already had prevalent dementia. In total, 1,486 control participants were screened through data preprocessing before the target number of 1,030 was achieved.
Participant sex identification was acquired from a central registry (the National Health Service) at the time of recruitment to the UKB, but in some cases was updated through participant self-report. Participant ethnicity was defined through self-report at the time of recruitment to the UKB. Participants were asked to report their ethnicity as ‘white’, ‘mixed’, ‘Asian or Asian British’, ‘Black or Black British’, ‘Chinese’, ‘other ethnic group’, ‘do not know’ or ‘prefer not to answer’.
MRI data acquisition
Magnetic resonance imaging data were acquired between 2006 and 2010 as part of the UKB prospective cohort study, across multiple sites in the United Kingdom (Manchester, Newcastle and Reading). The scanner was a Siemens Skyra 3 T with a Siemens 32-channel RF receive head coil. Each participant underwent a 35 min scanning session, during which the following data were acquired: a T1-weighted structural image, rs-fMRI time-series, a T2-weighted FLAIR structural image, a diffusion MRI structural image, a susceptibility-weighted image and task-based fMRI time-series data. We only used the T1 image and the rs-fMRI data for our analyses.
The T1-weighted image was acquired in a 5 min 3D MPRAGE sequence with a resolution of 1 mm isotropic. The rs-fMRI data were acquired using a 6 min GE-EPI sequence with ×8 multislice acceleration. Resolution, 2.4 mm isotropic; repetition time (TR), 0.735 s; echo time (TE), 39 ms; flip angle, 52°. Data were acquired under the same protocols for cases and controls.
MRI data preprocessing
Preprocessing was performed on raw UKB imaging data in SPM12 using batch scripts in MATLAB R2023a. First, the T1-weighted structural image was segmented into tissue subtypes, skull-stripped and then warped into Montreal Neurological Institute (MNI) space. The rs-fMRI data were spatially realigned to the single-band reference scan that was acquired in addition to the multi-band EPI sequence. Volumes were then co-registered to the skull-stripped T1 image, normalized to MNI space and spatially smoothed using a 6 mm isotropic Gaussian kernel.
In-scanner head motion was estimated for each participant by computing framewise displacement for each participant using the three translational and three rotational motion parameters (assuming rotation around the surface of a sphere with radius 50 mm). Participants were excluded from further analysis if their maximum framewise displacement exceeded 2.4 mm. This threshold was chosen because it was the voxel resolution of the dataset.
Time-series extraction
A DMN was constructed by pre-defining ten ROIs on the basis of pre-existing literature7,75. This number of ROIs was chosen to compromise between anatomical detail and feasible computation time when fitting dynamic causal models. The ten-node network comprised a core DMN of the anterior medial prefrontal cortex (amPFC), the precuneus, and the left and right intraparietal cortex (IPC). These four ROIs were centered around the following co-ordinates, respectively, on the basis of a previous study on DMN effective connectivity by Almgren and colleagues75: (x = 2, y = 56, z = –4), (x = 2, y = –58, z = 30), (x = –44, y = –60, z = 24), (x = 54, y = –62, z = 28). We included the following additional ROIs in our DMN network, using co-ordinates from a past study on DMN connectivity in amnestic cognitive impairment by Dunn and colleagues7: ventromedial prefrontal cortex (vmPFC), dorsomedial prefrontal cortex (dmPFC), left and right lateral temporal cortex (LTC) and left and right parahippocampal formation (PHF), centered on the following co-ordinates, respectively: (x = 0, y = 26, z = 18), (x = 0, y = 52, z = 26), (x = –60, y = –24, z = 18), (x = 60 , y = –24, z = 18), (x = –28, y = –40, z = –12), (x = 28, y = –40, z = –12).
The signal from each ROI was estimated by fitting a general linear model containing a discrete cosine basis set with frequency range 0.0078–0.1 Hz, as well as the following nuisance regressors: six head motion regressors, a regressor for cerebrospinal fluid signal (a principal eigenvariate sphere radius of 5 mm centered in the third ventricle at (x = 0, y = –40, z = –5)), a regressor for white matter signal (a principal eigenvariate sphere radius of 6 mm centered in the brainstem at (x = 0, y = –24, z = –33)). Global signal regression was not performed as there is evidence it does not substantially impact results in small network analyses75. An F-contrast was specified across all components of the discrete cosine basis set, yielding a BOLD time-series of low-amplitude fluctuations in each voxel within a 10 mm radius sphere centered on each of the ten ROI co-ordinates listed above.
For each ROI, a new 8 mm sphere was then centered on the peak intensity voxel. A summary signal for the ROI was computed as the principal eigenvariate of all supra-threshold voxels (uncorrected α = 0.05) that lay in the conjunction space of the first 10 mm sphere and the second 8 mm sphere. These were voxels with evidence for low frequency BOLD fluctuations. Note that the principal eigenvariate across voxels is used, rather than the mean, so that negative and positive signals do not negate each other and that the extreme values don’t bias the mean estimate. If any of the ten ROIs yielded no supra-threshold voxels then the participant was excluded from further analysis.
Estimating effective connectivity
Effective connectivity was estimated using spectral DCM using the DCM12 toolbox in SPM12. Spectral DCM fits a biophysical state-space model to the observed cross-spectra of BOLD signals, to estimate underlying neuronal states30 and the rate of change in neural activity in each region (in hertz) as a function of activity in other regions (that is effective connectivity). For each participant we fitted a fully connected DCM with a connectivity parameter for every possible pair of the ten ROIs, including auto-inhibitory self-connections. This model thus comprised 100 connectivity parameters. The DCM software76,77 uses the variational Laplace algorithm to invert the model and estimate these connectivity parameters by minimizing negative free energy. We used the software’s default priors. Each participant’s DCM fit was screened for convergence by ensuring it met the following criteria: explained variance of BOLD signal greater than 10%, at least one connection (excluding self-connections) with an absolute connection strength of greater than 1/8 Hz, and at least one effectively estimated parameter (based on the Kullback–Leibler divergence of posterior from prior). All participants who had a DCM fitted met these criteria for model convergence.
We fit a parametric empirical Bayes (PEB) model78 to the full set of participant-specific DCMs to estimate an average connectivity matrix across participants and estimate the difference in connectivity between cases and controls. The PEB technique enables us to estimate group-level connectivity strengths by fitting a hierarchical model to the estimated connectivity parameters of each individual and the precisions of those parameters. We specified a between-participants design matrix that contained five columns: a column of ones, to model the average connectivity strengths across all participants; a column of ones and zeros, to model the differences in connectivity between cases and controls; and three columns to model covariates of no-interest (age, sex and mean framewise displacement to model any effects attributable to head motion). The last three columns were mean-centered. Instead of estimating a full covariance matrix across connectivity parameters, a single precision component was shared across connectivity parameters, to permit model estimation within a reasonable amount of time. The resulting PEB model comprised 500 connectivity parameters, that is, a 10 × 10 connectivity matrix for each of the five columns of the between-participants design matrix.
Finally, we used exploratory Bayesian model reduction and Bayesian model comparison to find the best (and simplest) model to explain the data. In this procedure an automatic greedy search over reduced models iteratively discards parameters that don’t contribute to model evidence. A Bayesian model average of parameters is then calculated over the 256 models from the final iteration of the greedy search (default settings of DCM software).
The details of the biophysical model used in DCM, model inversion at a participant and group level and Bayesian model reduction have already been extensively documented76,77,79 and will not be reproduced here.
Case-control classifier
Of the group-level parameters that model differences in effective connectivity between cases and controls, we selected all parameters with an at least 99% posterior probability of being non-zero. This way we identified a set of statistically plausible connections to use as data features for our classifier.
We trained an elastic-net regularized logistic regression model on these features to classify cases from controls using the glmnet toolbox for MATLAB. To accommodate for the 10:1 imbalance in class size, observation weights were applied so that cases were weighted ten times more than controls. A nested stratified k-fold cross-validation (CV) scheme was applied for tuning two hyperparameters: elastic mixing parameter \(\alpha\) and regularization penalty \(\lambda\).
The dataset was partitioned into K = 10 subsets. The first subset contained the 22 participants with prevalent dementia at the time of data acquisition as well as their 220 matched controls; the remaining nine contained a random sampling of the rest of the dataset, with the requirement that each subset contained ten controls per case.
For each outer fold of CV, one subset was held out as a test set while the remaining nine subsets constituted a train-set. Note that the first subset was never used as a test set and only nine folds of outer cross-validation were actually performed. Therefore, data from the 22 participants who had a prevalent diagnosis of dementia at the time of data acquisition were only used to train the model, whereas the performance of the model exclusively refers to its ability to predict a future dementia diagnosis in those who did not yet have a diagnosis at the time of data acquisition.
For each of these nine outer folds of CV, the train-set was randomly partitioned into K = 5 inner subsets, again with the requirement that each inner subset contained ten controls per case. Thus, five folds of inner CV were performed. Each of these five inner folds was repeated for a different value of \(\alpha\), ranging from zero to one in increments of 0.1. Glmnet automatically uses a range of 100 \(\lambda\) values every time a model is estimated. A different ROC curve was generated for each possible combination of hyperparameters, and for each inner fold of CV. The AUC was averaged across the five inner folds. The combination of hyperparameters that generated the maximum average AUC were then used for a model trained on the entire train-set and applied to the originally held out test set. At the end of the procedure, nine AUC curves were generated, one for each outer fold of CV. The mean AUC from these nine ROC curves was used as the final AUC.
As K-fold CV is sensitive to the way that the data is partitioned, the entire procedure described above was performed nine times, with a different random partitioning of data each time. The median AUC from these nine iterations is reported as the main result with the minimum and maximum AUC reported in brackets. The ROC curves from all nine iterations are plotted in Fig. 4.
The above analysis was also performed using nested leave-one-out CV instead of K-fold CV, to generate a robust and unique participant-specific probability of dementia. We call this participant-specific value ‘effective connectivity (EC) index’ and it was used for subsequent analyses on individual differences (see the ‘Volumetric data analysis’ and ‘Modifiable risk factors analysis’ sections below).
Prognosticator
We trained a prognosticator model to test whether effective connectivity features could also be used to predict when these individuals got their dementia diagnosis. A group-level effective connectivity matrix was computed, using the PEB framework with Bayesian model reduction, as described above, but this time only the dementia cases were included in the analysis. The second column in the between-participants design matrix was not a column of ones and zeros to represent cases and controls, but rather a continuous variable that was computed as date of MRI acquisition subtracted from the date of dementia diagnosis (that is, how long, in years, until a dementia diagnosis). The value was negative if the participant already had a dementia diagnosis at the time of data acquisition. One participant, with prevalent dementia at the time of data collection, was excluded from this analysis as there was no reliable date of their past dementia diagnosis. Of the group-level parameters that model differences in effective connectivity as a function of the time until diagnosis, we selected all parameters with a posterior probability of at least 99% of being non-zero.
We then trained an elastic-net regularized linear regression model using the same K-fold cross-validation scheme as described above for the classifier. However, in this analysis, we wanted to assess the ability of the prognosticator to predict both positive and negative time until dementia diagnosis. The model was therefore tested on the cases with prevalent dementia at the time of data acquisition, and therefore all K = 10 subsets were used as test sets and ten folds of outer CV were performed. Hyperparameters \(\alpha\) and \(\lambda\) were tuned by minimizing the squared error between predictions and true values. Performance was evaluated as the Spearman correlation coefficient between final model predictions are true values. As above, the entire procedure was iterated nine times, the final reported result was the median Spearman coefficient across the nine iterations.
Volumetric data analysis
We repeated the above analyses to see how useful effective connectivity parameters were at making predictions about dementia compared to other MRI-based features, but this time using volumetric data features from structural MRI instead. We used pre-existing volume data from UKB’s imaging-derived phenotype database80. Specifically, we used the following 18 hippocampal subsegmental volumes (segmented using FreeSurfer): body of CA1, head of CA1, body of CA3, head of CA3, body of CA4, head of CA4, molecular layer of hippocampal body, molecular layer of hippocampal head, parasubiculum, presubiculum body, presubiculum head, subiculum body, subiculum head, whole hippocampal tail, whole hippocampal body, whole hippocampal head, whole hippocampus and hippocampal fissure. We also used two additional gray matter volumes from UKB’s imaging-derived phenotype database, segmented using FMRIB’s automated segmentation tool (FAST): anterior division of parahippocampal gyrus and posterior division of parahippocampal gyrus. Volumes were used from both the left and right hemispheres, and thus a total of 40 features were used.
Each feature was normalized by total intracranial volume. We then trained regularized logistic regression and linear regression models on this volumetric data using exactly the same cross-validation procedures that we used for the effective connectivity data features, as described above.
We also tested for an association between effective connectivity index and volumetric data. We took the mean across all 40 subsegmental volumes and fit a weighted linear regression model using fitglm in MATLAB to see whether average volume was associated with effective connectivity index. Individuals with dementia were upweighted and control participants were downweighed such that cases and controls made equal contributions to the regression model. We then ran 40 separate post-hoc regressions where the predictor variable was each individual subsegmental volume. Only the regression models that yielded the three highest R2 values are reported.
Functional connectivity analysis
We estimated functional connectivity matrices for each participant to compare predictions based on effective connectivity to an alternative rs-fMRI metric. For this analysis we used the same BOLD time-series that were used for the DCM analysis. For each possible pair of ROIs, a Fisher z-transformed Pearson correlation coefficient was computed between the BOLD time-series from these two ROIs. This generated a 10 × 10 functional connectivity matrix for each participant. As this matrix is symmetrical, duplicate elements were removed and the diagonal elements (self-connections) were also removed. This resulted in 45 functional connectivity values. We then trained regularized logistic regression and linear regression models on these functional connectivity values using exactly the same cross-validation procedures that we used for the effective connectivity data features, as described above.
Cognitive data analysis
To assess the cognitive profile of the cases and controls in this study, we utilized UKB data from touchscreen cognitive function tests. Multiple cognitive tests were performed but only four tests were deemed to have sufficient data for analysis. For the other cognitive tests, at least 30% of our analyzed participants had missing data. The four cognitive tests that we used for analysis were assessments of visual declarative memory, processing speed, verbal and numerical reasoning and prospective memory. Missing data were imputed with the median across all participants. Details of the cognitive tests and performance of cases and controls in each of the four tests can be seen in Supplementary Table 3.
We found significant differences between cases and controls in reaction time, fluid intelligence and prospective memory, with controls performing better in all three tasks. To assess how well these cognitive data could predict future dementia diagnosis and time until dementia diagnosis, we trained regularized logistic regression and linear regression models on these cognitive outcome measures using exactly the same cross-validation procedures that we used for the effective connectivity data features, as described above.
We also constructed a composite score of cognitive ability by running a principal components analysis on the four test scores. We took individual scores for the first principal component, which loaded negatively on number of errors in the pairs matching test and reaction time, and loaded positively on scores in the fluid intelligence and prospective memory task (that is, a higher score on this principal component indicated better performance across the four tasks).
Modifiable risk factors analysis
We investigated which modifiable risk factors were associated with dementia-related changes in DMN effective connectivity using multiple multivariable linear regression models. We constructed a variable for each of the 12 modifiable risk factors identified in the 2020 Lancet commission on dementia1. History of hypertension, diabetes, smoking, depression, physical inactivity, traumatic brain injury and hearing loss, absence of secondary education, and residence in a highly polluted neighborhood (top decile) were coded as binary variables. Body mass index, weekly alcohol consumption and social isolation were coded as continuous numerical variables. The social isolation variable was constructed with data from three questions, which participants answered as part of the touchscreen session at baseline data collection. These three questions assessed: (1) weekly attendance at social leisure activities (binary); (2) an estimated number of visits from friends or family within a year (continuous numerical); and (3) an estimated number of times the participant felt able to confide in someone close to them within a year (continuous numerical). We ran a principal components analysis on these three variables and took individual scores for the first principal component, which loaded negatively on all three variables (that is, a higher score on this principal component indicated greater social isolation). Traumatic brain injury was excluded from the subsequent regression analyses as there were only nine positive cases across the entire sample. This left 11 modifiable risk factors for analysis. For all variables, missing data were imputed with the median across all participants (see Supplementary Table 2 for numbers of missing data points). Data acquisition and processing were identical for cases and controls. Supplementary Table 4 shows details of the raw UKB variables used to derive the variables in this analysis.
For each of the 11 modifiable risk factors, as well as AD PRS, a weighted linear regression model was estimated using fitglm in MATLAB, where the risk factor of interest was the predictor variable, and effective connectivity index was the response variable. The effective connectivity index is simply the probability of dementia outputted from the case-control classifier trained with leave-one-out cross-validation. A higher value here indicates that the participant’s overall effective connectivity pattern conforms more to a dementia-like phenotype than a control-like phenotype. Age, sex and Townsend social deprivation score were included as covariates of no-interest in each of the 12 linear regression models. Participants with dementia were upweighted and control participants were downweighed in the linear regression models, such that cases and controls made equal contributions to the regression models. A P-value was estimated for each of the 11 modifiable risk factors and for PRS, which was corrected for multiple comparisons using the Holm–Bonferroni method, to maintain a family wise error rate of 0.05.
A mediation analysis was performed, with social isolation as a predictor, effective connectivity index as a mediator and dementia incidence as a response variable (dummy-coded binary variable). Each regression model estimated in the mediation analysis included age, sex and Townsend social deprivation score as covariates of no-interest, and used weighted observations such that cases and controls contributed equally to the model. A P-value was estimated for the significance of the indirect path coefficient by generating a permutation-based null distribution. For each permutation, the dementia incidence variable was randomly shuffled and an indirect path coefficient was estimated. This was repeated 1,000 times to generate a null distribution of indirect path coefficients with which to evaluate the true indirect path coefficient magnitude.
Alzheimer’s disease polygenic risk score
The AD PRS was downloaded from the UKB standard PRS set81. The database comprises PRSs for 28 diseases and 25 traits for every UKB participant. Polygenic risk scores were derived from meta-analysis of multiple external genome-wide association study sources. Detailed methods for how PRSs were generated have already been extensively documented81 and will not be reproduced here.
Ethics and inclusion statement
This research included local researchers throughout the research process. Roles and responsibilities were agreed amongst collaborators ahead of the research. This research involved no health, safety, security or other risk to participants or researchers.
Data access and ethics
This research was conducted using the UKB Resource under application no. 78867 (PI: C. Marshall). Informed written consent was obtained from all participants on enrollment in UKB and they were informed that they are free to withdraw their consent at any time, at which time their data would be censored and excluded from future analysis. Participants were offered compensation for reasonable travel expenses. The UKB has approval from the North West Multicentre Research Ethics Committee as a Research Tissue Bank (REC reference: 21/NW/0157).
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.