Introduction

Depression and anxiety are common mental disorders that often co-occur and are associated with increased disability and mortality, especially in older adults1. Prevention of depression and anxiety in older adults therefore has potential to mitigate disease burden in an aging population2. Identification of risk factors and mechanisms of vulnerability to mental disorders is a public health priority. Recent reports from multiple cohorts reveal poor mental health as a risk factor for more advanced and faster biological aging, including self-reported unsuccessful aging3, accelerated brain aging4, shorter leukocyte telomere length5, epigenetic aging measured from blood DNA methylation profiles6, and older biological age and faster pace of aging as measured from blood chemistries and other clinical traits7. However, nearly all work to date had focused on the hypothesis that poor mental health accelerates processes of biological aging8. A complementary, but less-studied hypothesis is that accelerated processes of biological aging may, themselves, pose risks to depression/anxiety disorders of older adults9.

Aging is a complex biological process that progressively undermines the integrity and resilience capacity of cells, tissues, and organs10. Ideal measurements of biological aging should thus reflect the landscape of aging in multiple biological systems11. Several measurements of biological aging have been proposed, ranging from individual biomarkers such as telomere length to algorithms that integrate information across epigenetic, proteomic, metabolomic, and other molecular levels of analysis12,13. Among these, algorithms that combine information from standard clinical parameters have proven to be among the most accurate for predicting morbidity and mortality14,15. To test the hypothesis that accelerated biological aging could increase the risk for depression/anxiety, we applied two published and validated clinical-parameter biological-age algorithms to blood chemistries collected from ~0.4 million UK Biobank participants at their baseline assessment and linked the computed biological age data with health records compiled over ~nine years of follow-up. We computed biological age values for participants using the Klemera-Doubal method Biological Age (KDM-BA) and the PhenoAge algorithms16,17, both of which have been validated in multi-ethnic cohorts of older adults to predict disease, disability, and mortality18,19. KDM-BA models biological age as the average biological state associated with a particular chronological age in a reference population. This model assumes biological age increases linearly with time. PhenoAge models biological age as the average biological state associated with a particular level of mortality risk in a reference population. This model assumes biological age increases exponentially with time. Following our approach in past projects, we used both algorithms to establish the robustness of findings to assumptions about the correct way to model biological aging20,21.

In this work, we tested the associations of the two biological ages with the risks of depression/anxiety in the UK Biobank cohort. The study shows that advanced biological aging could be a potential risk factor for incident depression/anxiety in midlife and older adults and a potential target for risk assessment and intervention. Our analysis proceeded in three steps (Figure S1). First, we tested if participants who were biologically older at baseline were more likely to have prevalent depression or anxiety as compared to peers of the same chronological age who were measured to be biologically younger. This analysis included in the full set of UK Biobank participants with available data on biological age and depression/anxiety at baseline (N = 424,299). Second, we tested if participants who were biologically older at baseline were more likely to have incident depression/anxiety over follow-up as compared to peers of the same chronological age who were measured to be biologically younger. This analysis included the subset of participants who were free of depression and anxiety at baseline and who were followed-up through healthcare records and a follow-up survey (N = 369,745). Third, we repeated this second analysis among the subset of participants free of depression and anxiety at baseline who completed the follow-up survey (N = 124,976). The purpose of this third analysis was to evaluate the extent to which reliance on healthcare records might bias association results. We additionally conducted a secondary analysis of UK Biobank genetic data to evaluate the potential gene-environment interplay between genetic risk for depression and anxiety and the internal physiological environment reflected by participants’ biological aging status.

Results

Participants’ characteristics and biological ages

We analyzed data for three overlapping groups of participants. The first group included all individuals providing baseline blood chemistry data required for calculation of biological age measurements and who completed mental health surveys at enrollment baseline (N = 424,299). The second group consisted of the subset of the first group who did not have prevalent depression/anxiety at baseline (N = 369,745). The third group was the subset of individuals who did not have prevalent depression/anxiety at baseline and who also participated in the online follow-up mental health survey (N = 124,976). Characteristics of these three groups are reported in Table 1. Briefly, the participants were mostly White (>95%), 46.2% were male, aged 57 ± 8-year-old, with a substantial prevalence of hypertension (54%) and some prevalence of coronary heart disease (3–5%) and diabetes (3–5%). In the first group, baseline PHQ-4 scores averaged 1.58 ± 2.08. Based on PHQ-4 scores and hospital records, 13% met the criteria for having symptoms of depression (6%) and anxiety (10%). In the second group, who were free of depression and anxiety at baseline, depression, and anxiety were incident in 4.47% (Ndepression = 11,402, Nanxiety = 8,472, and Nboth = 2,991) over a median of 8.7 years of follow-up. In the third group, who were free of depression/anxiety at baseline and who participated in the follow-up survey, depression, and anxiety were incident in 4.9% (Ndepression= 4,230, Nanxiety = 3,347, and Nboth = 1,501) at online follow-up (median follow-up = 8.7 years).

Table 1 Characteristics of study participantsa

At baseline, participants’ biological ages were highly correlated with their chronological ages. After residualizing measures for chronological age, the residual values of KDM-BA and PhenoAge (referred to as “age acceleration; AA”) remained correlated (Pearson coefficient = 0.23; Fig. S2)

Biological aging and prevalence of depression/anxiety at baseline

Participants with older biological age had higher PHQ-4 scores and were more likely to have a diagnosis of depression or anxiety at baseline as compared with peers of the same chronological age who were biologically younger (Table S1). Covariate adjustment for socioeconomic factors, health behaviors, and prevalent chronic diseases attenuated effect-size estimates. However, most associations remained statistically significant (p-values <0.05; Table 2); in the fully-adjustment model, participants with KDM-BA values one-standard deviation (SD) older the expectation for their chronological age scored 0.0516-units (Standard error = 0.0045) higher on the PHQ-4, and had 12.3% higher odds of depression/anxiety (95% confidence intervals [CI]: 10.8%–13.8%; for depression, 9.6%, 95% CI: 7.6–11.7%; for anxiety, 13.5%, 95% CI: 11.8%–15.2%; all p-values <0.0001). Results were similar for the PhenoAge, with somewhat larger effect sizes (Table 2). For both KDM-BA and PhenoAge, associations with PHQ-4 scores and disorders were monotonic and non-linear across quartiles of biological age (Table 2 and Fig. 1). For instance, compared to Q1 of KDM-BA acceleration, the odds ratios (ORs) of either disorder were 1.135 (95% CI: 1.100–1.170), 1.199 (95% CI: 1.156–1.243), and 1.325 (95% CI: 1.276–1.375), respectively.

Table 2 Associations of the biological age accelerations with the PHQ-4 Score and odds of depression/anxiety disorders at baseline (fully adjusted model)a
Fig. 1: Graphs of the best fitting models for relationships of KDM-BA acceleration and PhenoAge acceleration with PHQ-4 score at baseline.
figure 1

Panels: KDM-BA acceleration (a) and PhenoAge acceleration (b). Solid line: Point estimation; Dash line: Confidence limits; Dots: Knots (5th, 50th, and 95th percentiles). Restricted cubic spline regression model adjusted for age, sex, BMI category, race, smoking status (current/former/never), healthy alcohol intake status, healthy physical activity status, Townsend deprivation index, and prevalent hypertension, CHD, and diabetes. Source data are provided as a Source Data file.

Biological aging and incident depression/anxiety over follow-up

To test if older biological age predisposed to incident depression/anxiety, we analyzed data for the subset of 369,745 participants who were free of depression and anxiety at baseline. Older biological age was associated with increased risk of incident depression/anxiety over a median 8.7 years of follow-up. Effect-sizes were largest for depression and smallest for anxiety; for KDM-BA, each SD change in its acceleration was associated with a 4–7% increase in risk of incident depression, anxiety, or either disorder; for PhenoAge acceleration, risk increments per SD were 6–14% (Table 3 and S2). In dose-response analysis, we found that risk for all outcomes increased monotonically with higher PhenoAge acceleration. Patterns were more mixed for KDM-BA acceleration (Table 3, Fig. 2). Finally, we tested if older biological age was associated with the incidence of comorbid depression and anxiety. It was; however, the association was statistically different from zero only for the PhenoAge acceleration [per SD increment in risk=9.3% (95% CI: 5.4–13.2%); Table 4].

Table 3 Associations of biological ages at baseline with incident depression/anxiety disorders at follow-up (fully adjusted model)a
Fig. 2: Graphs of the best fitting models for relationships of KDM-BA acceleration and PhenoAge acceleration with incident depression/anxiety disorders at follow-up.
figure 2

Panels: KDM-BA acceleration (ac) and PhenoAge acceleration (df). Solid line: Point estimation; Black dash line: Confidence limits; Green dash line: Reference line; Dots: Knots (5th, 50th, and 95th percentiles). Restricted cubic spline regression model adjusted for age, sex, BMI category, race, smoking status (current/former/never), healthy alcohol intake status, healthy physical activity status, Townsend deprivation index, and prevalent hypertension, CHD, and diabetes. Source data are provided as a Source Data file.

Table 4 Associations of biological ages at baseline with co-incident depression and anxiety at follow-upa

We analyzed the associations of the two AAs with symptoms of depression/anxiety in the subset of participants who were free of depression/anxiety at baseline and who participated in the follow-up survey (N = 124,976). Both AAs demonstrated positive associations with the odds of incident depression, anxiety, or either disorder. Participants with older KDM-BA showed a higher incidence of three depression symptoms: psychomotor changes, fatigue, and appetite changes (Fig. 3). The three symptoms were positively correlated with each other (correlation coefficients: 0.17–0.33, Table S3). Higher PhenoAge acceleration was associated with the risk of newly diagnosed depression and with the incidence of the three depression symptoms plus anhedonia. Baseline levels of biological age were not consistently associated with most symptoms of anxiety. They were positively associated with increased symptom scores of either disorder, depression, and anxiety, but associations with the anxiety score were not statistically significant.

Fig. 3: Prospective associations of baseline biological age accelerations with odds of depression/anxiety symptoms and mental health scores at follow-up survey for the 124,976 participants that were free of depression and anxiety at baseline with available online mental health survey data.
figure 3

Dots (centers of error bars): Point estimate; Error bar: 95% confidence limits; Dash line: Reference line; Upper part is the odds ratios of logistic regression, lower part is the coefficients of linear regression; Dots and error bars colored in blue (for odds ratios) or purple (for coefficients) are statistically significant (unadjusted p-values < 0.05), otherwise are colored in grey. The logistic regression model was used in analyses for the odds of depression/anxiety symptoms and the linear regression model was used for the mental health scores. Model adjusted for age, sex, BMI category, race, smoking status (current/former/never), healthy alcohol intake status, healthy physical activity status, Townsend deprivation index, and prevalent hypertension, CHD, and diabetes. The examination center was additionally controlled for a random effect. Two-sided statistical tests were conducted and no adjustments were made for multiple comparisons. Source data are provided as a Source Data file.

We conducted four further sensitivity analyses. First, we tested if associations of biological aging measures with incident depression/anxiety varied between participants according to their chronological age and sex (N = 369,745). We observed no differences in associations between chronologically younger and older participants. However, there was some evidence of a sex difference; for PhenoAge acceleration, associations were somewhat stronger for men as compared with women (Table S4). Second, we repeated the analysis of incidence restricting the sample to participants with >2 years of follow-up. In this sensitivity analysis, both measures of biological aging showed robust associations with incident depression/anxiety (Table S5). Third, we considered whether older biological age might contribute to depression and anxiety through its effects on the incidence of other chronic diseases. People with incident depression/anxiety experienced higher incidence of chronic conditions over follow-up as compared to those who did not have incident depression/anxiety (for diabetes, 5.8% vs. 2.9%; for cardiovascular diseases, 11.6% vs. 5.9%; for cancers, 11.1% vs. 7.9%; all p-values < 0.0001; Table S6). To probe whether the process through which older biological age might contribute to risk of depression/anxiety could be mediated by the psychological burdens of chronic disease, we repeated our original incidence analysis including a covariate for whether the individual diagnosed with incident diabetes, cardiovascular disease, or cancer during the follow-up interval. The effect-sizes were attenuated but remained statistically different from zero at the alpha=0.05 threshold (Table S7). Last, we considered whether childhood adversity might explain associations of older biological age with depression/anxiety. UK Biobank collected reports of childhood adversity as part of the follow-up online survey. Therefore, we repeated the analysis of incident depression/anxiety in the subset of participants who were free of depression/anxiety at baseline and who participated in the follow-up survey (N = 124,976). In models including covariate adjustment for childhood adversity, effect-sizes for biological age measures were similar to effect-sizes from our original analyses of incident depression/anxiety (Table S8).

Joint effects of biological age accelerations and genetic susceptibility

Finally, we tested whether background genetic risk for depression/anxiety disorders combined in additive or synergistic ways with biological aging to influence risk for depression/anxiety. We measured genetic risk using a polygenic risk score (PRS) defined from two genome-wide-association studies. Participants with higher levels of genetic risk as measured by the PRS tended to have poorer mental health at baseline (Table S9) and were more likely to have incident disorder over follow-up (Table S10). However, participants’ genetic risk was not related to their biological aging (p-values>0.05; Table S10). We next evaluated risk synergy between genetic risk and biological age by testing interactions between the PRS and the biological age measures in models predicting prevalent and incident depression/anxiety (Table S11). Genetic risk and biological aging contributed independently and additively to risk for depression/anxiety; there was no robust evidence for risk synergy (p-values for interaction ranges 0.047–0.75). Joint effects of genetic risk and biological age are reported in Table S12 and graphed in Fig. 4. For instance, participants with the highest levels of both genetic risk and biological age were with nearly 2.5 times risk of incident depression/anxiety during follow-up (hazard ratio [HR] = 2.483, 95% CI: 2.321–2.656) as compared with those at the lowest levels of genetic risk and biological age.

Fig. 4: Joint associations of genetic risk and biological age accelerations with the odds of depression/anxiety disorders at baseline and incident depression/anxiety disorders at follow-up.
figure 4

Dots (centers of error bars): Point estimate; Error bar: 95% confidence limits; Dash line: Reference line; Logistic regression model was used in analyses for the odds of depression/anxiety at baseline and Cox regression model was used for the risk of incident depression/anxiety during the follow-up. Model adjusted for age, sex, BMI category, race, smoking status (current/former/never), healthy alcohol intake status, healthy physical activity status, Townsend deprivation index, and prevalent hypertension, CHD, and diabetes. The examination center was additionally controlled for as a random effect. Two-sided statistical tests were conducted and no adjustments were made for multiple comparisons. Source data are provided as a Source Data file.

Discussion

In this study, we tested associations of blood-chemistry measures of biological aging with prevalent and incident depression and anxiety among a half-million midlife and older adults in the UK Biobank. The main findings were that adults with more advanced biological age were more likely to experience depression and anxiety at baseline and were at higher risk of depression/anxiety over eight years of follow-up, as compared with peers who were the same chronological age, but who were tested to be biologically younger. The risk associated with biological age was independent of and additive to genetic risk measured using a PRS. The risk was also independent of self-reported history of childhood adversity. This study contributes evidence from a large biobank cohort to support the hypothesis that biological aging might represent a risk factor for depression/anxiety in midlife and older adults. Findings suggest future directions for depression/anxiety risk assessment in older adults as well as the potential for therapies that target the biology of aging to contribute to the prevention of later-life depression/anxiety.

There is accumulating evidence for a link between mental health problems and biological aging6,7,9,22,23. However, most studies have focused on poor mental health as a risk factor for accelerated aging. The reverse process may also occur. For example, white matter hyperintensities, neuroimaging signatures of small cerebral infarcts, are associated with aging and with the risk of depression24, and recently have been linked to measurements of biological aging25. The same is true of low-grade systemic inflammation and mitochondrial dysfunction26,27,28,29,30. Consistent with this complementary hypothesis of biological aging as a risk factor for depression/anxiety, older adults in the Health, Aging, and Body Composition Study who were tested to have older biological age using the KDM measure tended to report more prevalent and incident symptoms of depression on the Center for Epidemiologic Studies Depression Scale (CES-D)9. The data reported here extend those observations to clinical diagnosis of depression in a very large sample with a broader age range.

Our findings help establish a prospective link connecting older biological age with incident depression/anxiety. But they do not address the mechanisms mediating this link, which could be formed at multiple stages in the progression of aging processes from accumulating molecular alterations to physical impairments and chronic disease. One hypothesis is that molecular changes at the roots of biological aging, including telomere attrition and mitochondrial dysfunction, have direct effects on psychological processes contributing to depression and anxiety31,32. A parallel hypothesis suggests that physiological changes downstream from the molecular roots of aging, including cerebrovascular alterations, could trigger depression or anxiety26. Or, yet further downstream of aging biology, poor physical health may itself impair psychological well-being and contribute to psychiatric disorder33. In our study, individuals with incident depression/anxiety also experienced a higher incidence of diabetes, cardiovascular diseases, and cancers as compared with those who were free of depression/anxiety at baseline and follow-up. Including covariate adjustment for comorbid chronic disease incidence attenuated biological age associations with depression/anxiety, suggesting that the development of physical health problems may partly mediate the link between older biological age and risk for incident depression/anxiety. Additionally, the risk associated with biological age was independent of childhood adversity, which suggesting that the relationship between biological aging and late-life depression/anxiety are not confounded by the common cause of childhood adversity.

The evidence we report for prospective associations between older biological age and incident depression/anxiety do not rule out a parallel casual pathway in the opposite direction. Instead, combined with prospective studies that link poor mental health with older biological age and faster pace of biological aging31,32, our findings suggest the possibility of reciprocal interactions between biological aging and psychiatric morbidity in which each reinforces the other. To address questions of mechanism and to illuminate patterns of reverse causation or reciprocal interaction between biological aging and psychiatric morbidity, data are needed that contain repeated assessments of biological aging and its sequelae at multiple levels (i.e., cellular, tissue/organ, and whole-patient) along with assessments of psychiatric symptoms. Prospective cohort studies are beginning to develop this data architecture, e.g., several cohort studies within the Gateway to Global Aging (https://g2aging.org/) are now incorporating molecular and physiological assessments to complement detailed social and behavioral assessments.

We acknowledge limitations. Foremost, our study is observational. While we can establish a prospective association between older biological age and depression/anxiety, causality remains uncertain. The data reported here do not rule out the possibility that older biological age is associated with risk for depression/anxiety because of unobserved shared causes. We did observe that older biological age was associated with incident depression/anxiety in adults free of both disorders at baseline. And we were able to rule out confounding by genetic risk for both disorders. However, it is possible that signs of more advanced biological aging simply emerge before the symptoms of depression/anxiety. Longitudinal, repeated-measure studies that can measure both biological aging and mental disorder at multiple time points can help to address this limitation by testing if more pronounced increases in biological age with the passage of time are reflected in increases in risk for depression/anxiety. In parallel, analysis of biological age in trials of anti-depressants and other therapies can clarify whether reductions in depression/anxiety can slow biological aging2. As a volunteer cohort, participants in the UK Biobank do not represent the UK population, tending to be healthier and wealthier34,35. Only about 1/3 of enrolled participants participated in the follow-up survey. The sample we analyzed may therefore have younger biological age and exhibit lower levels of depression/anxiety than the general population, and/or reflect a different distribution of causes of these outcomes. We may also lose older individuals who become ill to participate or who die during follow-up. However, we anticipate these selection biases will attenuate association estimates toward the null. Our results are therefore conservative. Depression and anxiety diagnoses were obtained from hospital records and questionnaires. Many individuals affected by either disorder do not seek treatment36, and those with other undiagnosed mental disorders may further lead to depression/anxiety. However, this ascertainment bias and hidden mental disorders are expected to bias our estimates of association toward the null; our effect-size estimates are therefore conservative. The same is true for our analysis of genetic confounding; the GWAS from which the depression polygenic index was derived included UK Biobank, which will bias upward associations between this measure and depression, and could also inflate covariation between the PRS and our measures of bological aging 37. Additionally, our participants were mostly (~95%) middle-aged or older white adults, which limits the generalization of the results to other age and ethnic groups. Finally, our analysis that found early-life adversity did not explain associations between older biological age and increased risk of depression/anxiety relied on retrospective reports of early-life diversity. Recall bias could limit the power of this analysis.

In conclusion, we found that adults with older biological ages showed an increased risk for prevalent and incident depression/anxiety disorders. Under the circumstances of population aging, increased attention to the prevention and treatment of depression/anxiety disorders in older adults is a public health priority26. Interventions to slow biological aging, beginning from midlife, may represent on the path to reducing the burden of disease.

Methods

Study design and population

UK Biobank research has received approval from the North West Multicenter Research Ethical Committee. Written informed consent were provided by all participants. UK Biobank is an ongoing prospective study with 502,536 participants recruited in 2006–2010 at the age of 37–73 years (baseline survey) with multiple follow-ups38. At baseline, participants were asked to provide information on their lifestyle and health, and their biological samples were collected. During 2016–2017, the mental health status of ~1/3 of participants was obtained via an online survey (i.e., follow-up survey). In this study (Figure S1), we included 424,299 participants with available data on mental health status, measures of traits for included in biological age algorithms, potential covariates, and genetic variants at baseline. After excluding 54,554 participants with depression/anxiety at baseline, we conducted another two analyses in the remaining 369,745 participants who were free of depression or anxiety at baseline. A total of 369,745 participants who were free of depression or anxiety at baseline were employed to assess the association between biological aging and the incidence of depression and/or anxiety. A subset of 124,976 of the 369,745 participants reported their mental health status at the follow-up survey were used to evaluate the prospective associations between baseline biological aging and the syndromes of depression or anxiety in between.

Assessment of depression and anxiety symptoms

Assessments of depression and anxiety symptoms were conducted using both linked hospital admission records (UK Biobank Data-Fields: 41202 and 41204) and mental health questionnaires at baseline (for prevalent disorders) and follow-up (for incident disorders). For hospital records, participants were classified as with depression or anxiety symptoms if they had either an ICD-9/10 code of primary or secondary diagnosis for depression (ICD-9: 311; ICD-10: F32-F33) or anxiety (ICD-9: 300; ICD-10: F40-F41).

For mental health questionnaire screening, at baseline, depression, and anxiety symptoms were assessed by Patient Health Questionnaire (PHQ)-4 questionnaire39. Participants were required to rate, on a four-point Likert scale from 0 (not at all) to 3 (nearly every day), their response to four items: 1. “frequency of depressed mood” (Data-Field: 2050), 2. “frequency of unenthusiasm/disinterest” (Data-Field: 2060), 3. “frequency of tenseness/restlessness” (Data-Field: 2070), and 4. “frequency of tiredness/lethargy” (Data-Field: 2080). The total scores ranged from 0 to 12, and a score of ≥6 was considered positive for depression/anxiety disorders. A total score of ≥3 for items 1 and 2 was considered as positive for depression, and a total score of ≥3 for items 3 and 4 was considered as positive for anxiety. At the follow-up survey, mental health status was assessed using PHQ-940 and Generalized Anxiety Disorder (GAD)-741 questionnaires between 2016 and 2017 with the same four-point Likert scale from 0 (not at all) to 3 (nearly every day). PHQ-9 consists of 9 items: 1. “recent thoughts of suicide or self-harm” (Suicidal ideation; Data-Field: 20513), 2, “trouble falling or staying asleep, or sleeping too much” (Sleeping problems; Data-Field: 20517), 3. “recent changes in speed/amount of moving or speaking” (Psychomotor changes; Data-Field: 20518), 4. “recent feelings of inadequacy” (Feelings of inadequacy; Data-Field: 20507). 5. “recent feelings of tiredness or low energy” (Fatigue; Data-Field: 20519), 6. “recent feelings of depression” (Depressed mood; Data-Field: 20510), 7. “recent trouble concentrating on things” (Cognitive problems; Data-Field: 20508), 8. “recent poor appetite or overeating” (Appetite changes; Data-Field: 20511), and 9. “recent lack of interest or pleasure in doing things” (Anhedonia; Data-Field: 20514). GAD-7 consists of 7 items: 1. “recent inability to stop or control worrying” (Worrying control; Data-Field: 20509), 2. “recent restlessness” (Restlessness; Data-Field: 20516), 3. “recent trouble relaxing” (Lack of relaxation; Data-Field: 20515), 4. “recent easy annoyance or irritability” (Irritability; Data-Field: 20505), 5. “recent worrying too much about different things” (Generalized worrying; Data-Field: 20520), 6. “recent feelings of foreboding” (Foreboding; Data-Field: 20512), and 7. “recent feelings of nervousness or anxiety” (Anxiety feeling; Data-Field: 20506). Any item with a score of ≥1 was considered positive for this symptom. A PHQ-9 or GAD-7 total score of ≥10 was considered depression or anxiety symptoms positive. Other available assessments including the Composite International Diagnostic Interview Short Form (CIDI-SF) was not selected42.

Analysis 2 used both the assessments from the online follow-up mental health survey and the hospital records. Analysis 3 included a subset of participants with the data from the online follow-up mental health survey. For participants free of depression and anxiety at baseline, their follow-up time ended on the date of hospital records of incident depression/anxiety disorders, the date of follow-up survey, or the date of censoring (Dec 31st 2018), whichever occurred first.

Assessment of biological ages and age accelerations

We measured biological age using the best-validated algorithms that could be implemented with data available in the UK Biobank, the KDM-BA and the PhenoAge16,17,18, using blood-chemistry-derived measures43. Briefly, KDM-BA was computed from forced expiratory volume in one second (FEV1), systolic blood pressure, and seven blood chemistry parameters (albumin, alkaline phosphatase, blood urea nitrogen, creatinine, C-reactive protein, glycated hemoglobin, and total cholesterol); PhenoAge was computed from nine blood chemistries including four overlapped with KDM-BA (albumin, alkaline phosphatase, creatinine, C-reactive protein, glucose, mean cell volume, red cell distribution width, white blood cell count, and lymphocyte proportion). Included biomarkers and corresponding UK Biobank data-fields are reported in Table 1 and S13. Any observations with missing values were excluded from this analysis (Fig. S1). Computation of biological age values was conducted using the R package ‘BioAge’ (https://github.com/dayoonkwon/BioAge)44.

An individual’s KDM-BA prediction corresponds to the chronological age at which her/his physiology would be approximately normal. The KDM-BA is derived from a series of regressions of individual biomarkers on chronological age in a reference population. The equation takes information from n number of regression lines of chronological age regressed on n biomarkers44. The formula is:

$${{KDM}-{BA}}_{{EC}}=\frac{{\sum }_{{{\mbox{i}}}=1}^{n}\left({x}_{{{\mbox{i}}}}-{q}_{{{\mbox{i}}}}\right)\frac{{k}_{{{\mbox{i}}}}}{{s}_{{{\mbox{i}}}}^{2}}+\frac{{CA}}{{s}_{{BA}}^{2}}}{{\sum }_{{{\mbox{i}}}=1}^{n}{\left(\frac{{k}_{{{\mbox{i}}}}}{{s}_{{{\mbox{i}}}}}\right)}^{2}+\frac{1}{{s}_{{BA}}^{2}}}$$

where x is the value of biomarker i measured for an individual. For each biomarker i, the parameters k, q, and s are estimated from a regression of chronological age on the biomarker in the reference sample. k, q, and s are the regression intercept, slope, and root mean squared error, respectively. sBA is a scaling factor equal to the square root of the variance in chronological age explained by the biomarker set in the reference sample. CA is chronological age. In the BioAge package, the reference sample is NHANES III nonpregnant participants aged 30–75 years. Algorithm parameters are estimated separately for men and women. In our study, we used nine biomarkers including forced expiratory volume in one second (FEV1), systolic blood pressure, albumin, alkaline phosphatase, blood urea nitrogen, creatinine, C-reactive protein, glycated hemoglobin, and total cholesterol.

The PhenoAge algorithm is derived from multivariate analysis of mortality hazards. The original PhenoAge algorithm was constructed from elastic-net Gompertz regression of mortality on 42 biomarkers in the NHANES III. This analysis selected nine biomarkers: albumin, alkaline phosphatase, creatinine, C-reactive protein, glucose, mean cell volume, red cell distribution width, white blood cell count, and lymphocyte proportion, and chronological age. The formula is:

$${{\mbox{PhenoAge}}}=141.50225+\frac{{{{{{\rm{ln}}}}}}\left[-0.00553\times {{{{{\rm{ln}}}}}}(1-{{{{{\rm{mortality}}}}}}\,{{{{{\rm{risk}}}}}})\right]}{0.090165}$$

where

$${{\mbox{mortality}}}\,{{\mbox{risk}}}=1-{e}^{-{e}^{{{xb}}_{\left[\exp ({120}_{x\gamma })-1\right]/\gamma }}}$$
$$\gamma=0{{\mbox{.}}}0076927$$
$$xb= -19.907-0.0336+{{{{{\rm{albumin}}}}}}+0.0095 \times {{{{{\rm{creatinine}}}}}}+0.1953\\ \times {{{{{\rm{glucose}}}}}}+0.0954\times \,{{{{\mathrm{ln}}}}}(C-{{{{{\rm{reactive}}}}}}\,{{{{{\rm{protein}}}}}})-0.012\\ \times {{{{{\rm{lymphocyte}}}}}}\,{{{{{\rm{percentage}}}}}}+0.0268\times {{{{{\rm{mean}}}}}}\,{{{{{\rm{corpuscular}}}}}}\,{{{{{\rm{volume}}}}}}\\ +0.3306 \times {{{{{\rm{red}}}}}}\,{{{{{\rm{cell}}}}}}\,{{{{{\rm{distribution}}}}}}\,{{{{{\rm{width}}}}}}+0.00188\times {{{{{\rm{alkaline}}}}}}\,{{{{{\rm{phosphatase}}}}}}\\ +0.0554\times {{{{{\rm{white}}}}}}\,{{{{{\rm{blood}}}}}}\,{{{{{\rm{cell}}}}}}\,{{{{{\rm{count}}}}}}+0.0804\times {{{{{\rm{chronological}}}}}}\,{{{{{\rm{age}}}}}}$$

To quantify differences between participants in biological aging, we regressed their computed biological age values on their chronological ages at the time of biomarker measurement and computed the residual values. We hereafter refer to these residuals as “age acceleration (AA)” values to gauge biological aging. In order to make effect-sizes for the two measures of biological aging comparable, we standardized the AAs to have a mean value of 0 and standard deviation (SD) of 1 for analysis of a continuous dimension and to quartiles for dose-response analysis.

Measurements of covariates

We included age, sex, body mass index (BMI), race (Whiter, Black, Asian, and other), smoking status (current/former/never), healthy alcohol intake status, healthy physical activity status, Townsend deprivation index (continuous), prevalent hypertension, coronary heart disease (CHD), and diabetes as potential covariates in this study. Height and weight were measured by trained nurses during the baseline assessment center visit, and BMI was calculated by dividing weight in kilograms by the square of height in meters and then was classified into: underweight or normal weight (<25), overweight (25 to <30), and obese (≥30). Healthy alcohol intake status was defined as: male: <28 g/day; female: <14 g/day. Healthy physical activity status was defined as: ≥150 min/week moderate or ≥75 min/week vigorous or 150 min/week mixed (moderate + vigorous) activity. Physical activity was assessed using the Metabolic Equivalent Task minutes based on adopted items from the short International Physical Activity Questionnaire45. Townsend deprivation index is constructed based on four key variables in UK Biobank: unemployment, overcrowded household, non–car ownership, and non–home ownership, a higher index indicates a higher level of deprivation. History of hypertension, CHD, and diabetes was based on self-reported information and medical records at baseline and during the follow-up. Additional participants with ≥140 mmHg SBP and/or ≥90 mmHg SBP at the enrollment were also included as individuals with hypertension at baseline. Observations with any missing values of the covariates were excluded from this study. We also collected their incident diabetes, cardiovascular diseases, and cancer46 to examine whether incident depression/anxiety cases had higher probabilities of having major chronic physical health disorders than the healthy.

Assessment of childhood adversity

Because childhood adversity may affect biological aging and relevant health outcomes47. We tested whether childhood adversity could affect the associations between biological aging and incident depression/anxiety disorders among 124,976 baseline depression/anxiety-free participants with available data. Childhood adversity, sourced from the follow-up survey, was assessed with five questions representing physical neglect, emotional neglect, sexual abuse, physical abuse, and emotional abuse, using the Childhood Trauma Screener, which is a shortened version of the Childhood Trauma Questionnaire and is a cost-efficient, validated, and relatively reliable screening tool in large epidemiological studies48,49: (1) felt hated by a family member (emotional abuse, Data-Field: 20487); (2) physically abused by family as a child (physical abuse, Data-Field: 20488); (3) felt loved as a child (emotional neglect, Data-Field: 20489); (4) sexually molested as a child (sexual abuse, Data-Field: 20490); and (5) someone to take to the doctor when needed as a child (physical neglect, Data-Field: 20491).

For each question, potential responses included never true, rarely true, sometimes true, often true, and very often true. Physical neglect was dichotomized as 1 if participants answered never true, rarely true, sometimes true, or often true; emotional neglect was dichotomized as 1 if participants answered never true, rarely true, or sometimes true; sexual abuse, physical abuse, and emotional abuse were dichotomized as 1 if participants answered rarely true, sometimes true, often true, and very often true. The summary score of 5 items ranged from 0 to 5, with a higher score denoting more childhood adversities.

Polygenic risk scores for depression and anxiety

We measured background genetic risk for depression/anxiety disorders using PRS for depression, anxiety, and a combined depression/anxiety phenotype. PRS were computed based on results from the largest published genome-wide association studies (GWASs) of depression and anxiety37,50. We also conducted a meta-analysis of the two GWASs using METAL software to produce a GWAS of a combined depression/anxiety phenotype51. Detailed information about the genotyping, data imputation, and quality control in the UK Biobank has been reported38,52. Briefly, we excluded SNPs with low minor allele frequency (MAF) (MAF < 1%) or imputation information scores (INFO) (INFO < 0.8). Mismatched, duplicated, and ambiguous SNPs were also excluded. We computed participants PRS by combining the UK Biobank SNP database with summary statistics from the GWAS using the PRSice-2 software V2.3.553. The PRS was adjusted by sex and ten genetic principal components. The best-fitting parameters for the PRS for depression, anxiety, and both disorders were demonstrated in Table S14. The resulting PRSs explained of 7.7%~9.9% of variance in the odds of depression, and anxiety, either disorder, and the PHQ-4 score at baseline (Table S9).

Statistical analysis

We first tested the cross-sectional associations of two AAs with PHQ-4 scores using mixed-effect linear regression models and with the odds of depression/anxiety disorders, depression, and anxiety at baseline using logistic regression (Analysis 1). We fit a series of models adjusting for increasing numbers of covariates: Model 1 adjusted for age and sex; Model 2 additionally adjusted for BMI category, race, smoking status, healthy alcohol intake, and healthy physical activity; Model 3 further adjusted for Townsend deprivation index, hypertension, CHD, and diabetes. Townsend deprivation index ranged from −6.3 to 10.2 is constructed based on four key variables in UK Biobank: unemployment, overcrowded household, non–car ownership, and non–home ownership; a higher index indicates a higher level of deprivation. The examination center was additionally controlled for in all models as a random effect to account for the potential residual bias from health examinations. Dose-response curves for associations with PHQ-4 scores were assessed by restricted cubic spline regression models controlling for all potential covariates54, with the 5th, 50th, and 95th percentiles of each AA selected as knots.

Furthermore, for the total participants free of depression and anxiety at baseline (Analysis 2), we used Cox proportional hazards model to test time-to-event associations of baseline AAs with the incident depression/anxiety over follow-up. Dose-response relationships related to the risk of incident depression/anxiety disorders, depression, and anxiety were assessed by restricted cubic spline regression. For Analysis 3, among participants free of depression and anxiety at baseline, we examined the prospective associations of the baseline AAs with the odds of newly identified depression/anxiety disorders and their symptoms (logistic regression), and the scores of PHQ-9 and GAD-7 (linear regression) in the subset of 124,976 participants with follow-up survey data. Models were adjusted for all covariates described.

Four sensitivity analyses were conducted. First, we tested whether age and sex could interact with both AAs in the prediction of depression/anxiety and the associations between AAs and the risk of comorbid depression and anxiety. Furthermore, we conducted another sensitivity analysis of Analysis 2 by excluding participants with ≤2 years of follow-up to avoid reversal causation. Third, we considered whether older biological age might contribute to depression and anxiety through its effects on the incidence of other chronic diseases. We additionally controlled for whether individuals were diagnosed with incident diabetes, cardiovascular diseases, or cancer during the follow-up in our primary model. Last, since adverse childhood experiences and childhood maltreatment are associated with older biological age in midlife adults and are risk factors for depression/anxiety across the life-course55,56,57, we examined whether childhood adversity could affect the associations between biological aging and incident depression/anxiety disorders among 124,976 baseline depression/anxiety-free participants with available childhood adversity data retrieved from follow-up survey.

Finally, to evaluate whether the genetic predisposition to depression/anxiety disorders may modify the association of biological aging with depression/anxiety disorders, we fitted models including terms of PRS and the interactions between PRS and AAs. In the case that the interaction effect did not meet the criteria for statistical significance (p-values<0.05), we generated a series of the categorical variables based on the quartiles of each AA and dichotomized PRS (by median) to assess the joint association of both factors with depression/anxiety.

SAS version 9.4 TS1M7 (SAS Institute Inc., Cary, NC, USA) was used to conduct data cleaning and analyses. A two-sided p-value of <0.05 was considered statistically significant.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.