Construction and validation of a novel nutrient-based index for risk of aging using an interpretable machine learning framework: results from two population-based studies Authors: Rui Qiang Li, Ting Yu Lu, Jiao Wang, Wei Sen Zhang, Jun Du, Ya Li Jin, Jun Tao Kan, Tai Hing Lam, Kar Keung Cheng, Emma Yun-zhi Huang, Lin Xu Published: 2025 ABSTRACT BackgroundPopulation aging is becoming increasingly prominent. Although various dietary factors have been associated with aging in older people, no dietary score specifically related to phenotypic aging has yet been developed.MethodsWe used data from the Guangzhou Biobank Cohort Study (GBCS) and National Health and Nutrition Examination Survey (NHANES). Interpretable machine learning framework including adaptive elastic-net (AENET), eXtreme Gradient Boosting (XGBoost), and Random Survival Forests (RSF) analysis combined with Shapley additive explanations (SHAP) were used to construct and validate a dietary index related to aging. Accelerated age is defined as the residual from a linear regression of phenotypic age on chronological age, with values greater than 0 indicating the presence of accelerating age.FindingsIn GBCS, of 9512 participants, the mean phenotypic age was 58.8 (standard deviation = 9.2) years. A dietary aging risk index (DARI) was constructed using nutrients and phenotypic age, with median (interquartile range) being 0.03 (0.01, 0.06). During an average follow-up of 16.1 years, after adjusting for twelve potential confounders, higher DARI were associated with older phenotypic age (β = 0.08 years, 95% confidence interval (CI) = 0.06–0.10), higher risks of accelerating age (odds ratio = 1.63, 95% CI = 1.38–1.93) and all-cause mortality (hazards ratio (HR) = 1.10, 95% CI = 1.04–1.17). The association with all-cause mortality was more pronounced in current smoker (HR = 1.29, 95% CI = 1.12–1.50). In NHANES, higher DARI were associated with lower α-Klotho levels (β=-0.020 pg/ml, 95% CI=-0.036 to -0.004).ConclusionsThis study developed and validated a DARI using machine learning methods, offering a comprehensive measure of the impact of multiple nutrients on phenotypic aging. An online tool was created to facilitate its application in population studies.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12937-025-01256-9. Introduction As the global population ages rapidly, understanding factors influencing aging and mortality risk in older adults has become a critical public health priority [1]. Diet, as a modifiable lifestyle factor, plays a critical role in shaping health outcomes in this population [2, 3]. Dietary interventions are widely regarded as safe, cost-effective, and scalable strategies to delay the aging process. Established dietary patterns, such as the Okinawan, Mediterranean, and Dietary Approaches to Stop Hypertension (DASH) diets, as well as caloric restriction (CR) and intermittent fasting (IF), have shown potential in slowing aging. These effects might be mediated through mechanisms such as improved nutrient-sensing, modulation of gut microbiota, enhanced metabolism, and strengthened immunity [4]. In addition to these dietary patterns, individual nutrients also contribute to healthy aging. For example, carbohydrate intake has been shown to exhibit a U-shaped association with longevity, with an optimal intake constituting approximately half of total energy [5–7]. Micronutrients such as folate [8], selenium and vitamin D may also play critical roles in maintaining physiological functions and reducing the risk of age-related diseases [9, 10]. However, the cumulative effects of multiple nutrients and their complex interactions may better reflect the overall dietary influence on aging. A deeper understanding of these combined effects may help to identify dietary-related aging risk factors and informing targeted public health interventions. This study aims to explore the association between multiple dietary nutrients and aging, using phenotypic age as a proxy for biological age. Phenotypic age, which integrates chronological age with biological markers, has been validated as a robust predictor of morbidity, disability and mortality in older populations [11, 12]. To quantify the collective impact of nutrients, we developed and validated a novel dietary aging risk index (DARI). We then assessed the associations of DARI with phenotypic age, accelerating age, all-cause mortality, and serum α-Klotho, a well-established biomarker of aging. This study leverages data from two large, ongoing population-based cohorts, the Guangzhou Biobank Cohort Study (GBCS) [13] and National Health and Nutrition Examination Survey (NHANES). We hypothesizes that DARI will serve as a significant predictor of phenotypic aging and age-relate health outcomes, such as cardiovascular disease [14], depression and anxiety [15]. Materials and methods Study samples The GBCS is a collaborative project involving Guangzhou Twelfth People’s Hospital, the University of Hong Kong, and the University of Birmingham, UK. Detailed information about GBCS has been previously reported [13]. All participants are recruited from the Guangzhou Health and Happiness Association for the Respectable Elders (GHHARE), a large unofficial organization with branches in all ten districts of Guangzhou. The recruitment targets Guangzhou permanent residents aged 50 and above, with a nominal monthly fee of four RMB (approximately 50 US cents per month). Baseline examinations include face-to-face computer-assisted interviews conducted by trained nurses to collect information on demographic characteristics, lifestyle, family, and personal medical history. The study protocol has been approved by the Guangzhou Medical Ethics Committee of the Chinese Medical Association, and all participants provided written informed consent before participation. In this study, we used the baseline data from the first phase of GBCS conducted between 2003 and 2004 (n = 9512). The NHANES, which is one of the most authoritative health survey programs in the United States, is conducted by the Centers for Disease Control and Prevention (CDC). NHANES adopts a complex, multistage sampling design to select participants randomly from various states across the country on an annual basis. The survey includes face-to-face health interviews and clinical examinations, encompassing a wide range of assessments such as physiological measurements and nutrition surveys. All participants provide written informed consent, and the study protocol has approved by the National Center for Health Statistics (NCHS) Institutional Review Board [16]. This study used data from the 2007–2016 NHANES cycles, focusing on serum α-Klotho concentrations in participants aged 50 and above (n = 6945). Detailed information on dietary intake, potential confounders, and serum α-Klotho levels is shown in the supplementary materials. Assessment of dietary intake Dietary intake information was obtained from a validated Food Frequency Questionnaire (FFQ) in the GBCS [17]. According to the Chinese Food Composition Tables, the consumption of each food item was multiplied by the standard portion size (100 g) to calculate the intake of energy and 28 nutrients [18], expressed as follows: energy (kcal), protein (g), fat (g), carbohydrate (g), fiber (g), cholesterol (mg), saturated fatty acid (g), monounsaturated fatty acid (g), polyunsaturated fatty acid (g), Vitamin A (µg RE, Retinol Equivalents), Vitamin B1 (mg), Vitamin B2 (mg), niacin (mg), Vitamin C (mg), Vitamin E (mg), sodium (mg), potassium (mg), phosphorus (mg), calcium (mg), magnesium (mg), iron (mg), copper (mg), zinc (mg), selenium (µg), manganese (mg), folic acid (µg), carotenoid (µg), Vitamin B6 (µg), Vitamin B12 (µg). Potential confounders Based on the directed acyclic graph (Supplementary Fig. 1) and previous literature [19–21], we adjusted for the following variables as potential confounders: age (<65 years, ≥ 65 years), sex (men, women), education (primary or below, middle school, college or above), marital status (manual, non-manual, others), family income (< 10000 RMB/year, 10000–29999 RMB/year, 30000–49999 RMB/year, ≥ 50000 RMB/year or not known), body mass index (BMl) (< 18.5 kg/m2, 18.5–24.9 kg/m2, 25.0–27.4 kg/m2, ≥ 27.5 kg/m2), smoking status (never, former, current), alcohol use (never, former, current), physical activity (inactive, moderate, active), hypertension (no, yes), hyperlipidaemia (no, yes), and self-rated health (poor/very poor, good/very good) at baseline. Study outcomes Phenotypic age was calculated using a weighted linear combination score, comprising chronological age in years and eight biomarkers: albumin, creatinine, glucose, C-reactive protein, lymphocyte percentage, mean corpuscular volume, red cell distribution width, and white blood cell count [12]. Phenotypic age was developed according to the following formula:\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \boldsymbol{Phenotypic\,age}= & \boldsymbol{141.50225}\\ & +\frac{\mathbf{ln}\boldsymbol{(-0.00553}\times\:\mathbf{ln}(\boldsymbol{1}-\boldsymbol{score))}}{\boldsymbol{0.090165}} \end{aligned}$$\end{document} Where:\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\boldsymbol{Score}=\boldsymbol{1}-{\boldsymbol{e}}^{{\boldsymbol{-e}}^{\boldsymbol{x}\boldsymbol{b}}\left(\mathbf{exp}\left(\boldsymbol{120}\times\:\varvec{\gamma\:}\right)-\boldsymbol{1}\right)/\varvec{\gamma\:}}$$\end{document} γ was 0.0076927, and:\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{aligned} \boldsymbol{xb}=& \boldsymbol{-19.9067}-\boldsymbol{0.0036}\times\:\boldsymbol{albumin}\\ & +\boldsymbol{0.0095}\times\:\boldsymbol{creatine}+\boldsymbol{0.1953}\\ & \times\:\boldsymbol{glucose}+\boldsymbol{0.0954}\times\:\mathbf{ln}\left(\boldsymbol{CRP}\right)\\ & -\boldsymbol{0.0120}\times\:\mathbf{lymphocyte}\:\mathbf{percent}\\ & +\boldsymbol{0.0268}\times\:\boldsymbol{mean}\:\boldsymbol{cell}\:\boldsymbol{volume}\\ & +\boldsymbol{0.3306}\times\:\boldsymbol{red}\:\boldsymbol{cell}\:\boldsymbol{distribution}\boldsymbol{width}\\ & +\boldsymbol{0.0554}\times\:\boldsymbol{white}\:\boldsymbol{blood}\:\boldsymbol{cell}\:\boldsymbol{count}\\ & +\boldsymbol{0.0804}\times\:\boldsymbol{chronological}\:\boldsymbol{age}\end{aligned}$$\end{document} Accelerated age was defined as the residual from a linear regression model of phenotypic age on chronological age [12]. It was dichotomized into two categories: the presence and absence of accelerating age (accelerated age>0). Mortality outcomes were assessed using data on causes of death up to July 2022, obtained through record linkage with the Death Registry of the Center for Disease Control and Prevention in Guangzhou, as previously detailed in our studies [22–24]. In the external validation cohort (NHANES), the primary outcome was serum α-Klotho. α-Klotho is a membrane-bound protein encoded by the Klotho gene, which plays a vital role in anti-aging [25]. Blood samples from NHANES participants aged 40 to 79 years were collected and analyzed for serum α-Klotho levels. α-Klotho was quantitatively analyzed using a commercially available Enzyme-Linked Immunosorbent Assay (ELISA) kit from International Biological Laboratories (IBL), Japan, which has been validated through multiple methodologies [26]. Statistical analysis The GBCS data was randomly partitioned into training and testing sets in a 7:3 ratio. Baseline characteristics of the participants were presented as mean (standard deviation (SD)) for continuous variables and as frequency (percentage) for categorical variables. Inter-group comparison of normally distributed continuous variables was conducted using the Student’s t-test, while the Wilcoxon rank-sum test was applied to non-normally distributed data. The chi-square test was used to assess differences in the distribution of categorical variables. Nutrient values were adjusted for total energy intake using the density method (i.e., nutrient (from food) / total energy intake × 1000 kcal) [27] and subsequently log-transformed to stabilize variance. Pearson correlation analysis was conducted to estimate the associations between nutrients. To explore potential non-linear relationships between dietary nutrients and health outcomes, restricted cubic splines (RCS) were applied with four knots placed at the 5th, 35th, 65th, and 95th percentiles of the nutrient distribution. Likelihood ratio tests were used to compare the model including the spline terms with the linear-only model. A significant test result (P < 0.05) indicated evidence of a non-linear association [28, 29]. We randomly divided the participants into a training set (n = 6661) for DARI construction and a test set (n = 2851) for validation. DARI was constructed using Adaptive Elastic Net (AENET) [30], a regression technique that combines Lasso and Ridge methods to address multicollinearity and perform variable selection in training set, with phenotypic age as the modeling target. A total of 434 predictor variables were considered, including 28 main effects, 28 square terms, and 378 pairwise linear interactions among 28 nutrients. AENET applies both L1 and L2 penalties to the regression coefficients, which allows for the selection of relevant predictors while considering correlations among them. The coefficients for DARI were derived from the AENET model. To ensure the model’s robustness, all predictor variables were standardized to z-scores to reduce multicollinearity. Several performance metrics, including Mean Absolute Error (MAE) and Mean Squared Prediction Error (MSPE), were used to assess the model fit in training and testing sets. To further evaluate the predictive ability of DARI, we explored the association of DARI with phenotypic age, accelerating age and all-cause mortality in GBCS participants. DARI was multiplied by 10 to simplify the interpretation of its impact on phenotypic and accelerating age, reflecting a 0.1 unit increase in DARI. The performance was further evaluated using machine learning techniques such as eXtreme Gradient Boosting (XGBoost), Random Survival Forests (RSF) models [31, 32], and Shapley Additive Explanations (SHAP), which helped assess the importance of individual predictors. Additionally, external validation was conducted using NHANES data to explore the association between DARI and the aging biomarker α-Klotho, further validating DARI’s association with aging. To improve the normality of the α-Klotho concentration distribution, a natural logarithm transformation was applied. The detailed construction process of and calculator code for DARI are elaborated in the supplementary materials. We also developed an online tool, which is open to the public, allowing the actual values of nutrient intake to be input into the equation to calculate the DARI values (https://gbcs-dari-2024.shinyapps.io/rsconnectignore/). The nutrients required for the calculation of DARI are listed in Supplementary Table 1. Supplementary Fig. 2 shows the statistical analysis process. All data analyses were conducted using R 4.3.2 with a significance level of P<0.05. Results Demographic characteristics The study included 9512 participants, with a mean phenotypic age of 58.8 (standard deviation = 9.2) years (Table 1), of whom 29.2% were men. The participants were allocated into training (n = 6661) and testing sets (n = 2851) at a 7:3 ratio. No statistically significant differences were found between the training and testing groups in terms of age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia (P from 0.05 to 0.88). The Spearman correlation coefficients among the nutrients range from − 0.89 to 0.85 (Fig. 1). Table 1Characteristics of the total samples, training set and testing set in the GBCS Total samples(n = 9512)Training set(n = 6661)Testing set(n = 2851)P-valueAge groups, years, n (%)0.49 <654957 (52.1)3456 (51.9)1501 (52.6) ≥ 654555 (47.9)3205 (48.1)1350 (47.4)Sex, n (%)0.20 Men2775 (29.2)1917 (28.8)858 (30.1) Women6737 (70.8)4744 (71.2)1993 (69.9)Education, n (%)0.13 Primary or below4769 (50.1)3355 (50.4)1414 (49.6) Middle school3879 (40.8)2727 (40.9)1152 (40.4) College or above864 (9.1)579 (8.7)285 (10.0)Occupation, n (%)0.05 Manual6087 (64.0)4313 (64.8)1774 (62.2) Non-manual2958 (31.1)2007 (30.1)951 (33.4) Others467 (4.9)341 (5.1)126 (4.4)Family income, CNY/year, n (%)0.88 < 10,000662 (7.0)454 (6.8)208 (7.3) 10,000–29,9993209 (33.7)2254 (33.8)955 (33.5) 30,000–49,9991450 (15.2)1020 (15.3)430 (15.1) ≥ 50,000984 (10.3)681 (10.2)303 (10.6) Don’t know3207 (33.8)2252 (33.9)955 (33.5)BMI, kg/m2, n (%)0.14 < 18.5466 (4.9)313 (4.7)153 (5.4) 18.5–24.95778 (60.7)4047 (60.8)1731 (60.7) 25.0–27.42056 (21.6)1471 (22.1)585 (20.5) ≥ 27.51212 (12.8)830 (12.4)382 (13.4)Smoking status, n (%)0.12 Never7149 (75.2)5041 (75.7)2108 (73.9) Former1416 (14.8)960 (14.4)456 (16.0) Current947 (10.0)942 (14.1)423 (14.8)Alcohol use, n (%)0.43 Never7943 (83.5)5582 (83.8)2361 (82.8) Former204 (2.1)137 (2.1)67 (2.4) Current1365 (14.4)942 (14.1)423 (14.8)Physical activity, n (%)0.24 Inactive135 (1.4)93 (1.4)42 (1.5) Moderate3304 (34.7)2279 (34.2)1025 (36.0) Active6073 (63.8)4289 (64.4)1784 (62.6)Self-rated health, n (%)0.53 Poor/ very poor1516 (15.9)1072 (16.1)444 (15.6) Good/very good7996 (84.1)5589 (83.9)2407 (84.4)Hypertension, n (%)0.73 No6489 (68.2)4537 (68.1)1952 (68.5) Yes3023 (31.8)2124 (31.9)899 (31.5)Hyperlipidaemia, n (%)0.12 No8638 (90.8)6029 (90.5)2609 (91.5) Yes874 (9.2)632 (9.5)242 (8.5)Phenotypic age, years, mean (SD)58.8 (9.2)58.7 (9.2)58.8 (9.1)0.51Abbreviation: n number, CNY Chinese yuan, BMI body mass index, SD standard deviation Table 1Characteristics of the total samples, training set and testing set in the GBCS Total samples(n = 9512)Training set(n = 6661)Testing set(n = 2851)P-valueAge groups, years, n (%)0.49 <654957 (52.1)3456 (51.9)1501 (52.6) ≥ 654555 (47.9)3205 (48.1)1350 (47.4)Sex, n (%)0.20 Men2775 (29.2)1917 (28.8)858 (30.1) Women6737 (70.8)4744 (71.2)1993 (69.9)Education, n (%)0.13 Primary or below4769 (50.1)3355 (50.4)1414 (49.6) Middle school3879 (40.8)2727 (40.9)1152 (40.4) College or above864 (9.1)579 (8.7)285 (10.0)Occupation, n (%)0.05 Manual6087 (64.0)4313 (64.8)1774 (62.2) Non-manual2958 (31.1)2007 (30.1)951 (33.4) Others467 (4.9)341 (5.1)126 (4.4)Family income, CNY/year, n (%)0.88 < 10,000662 (7.0)454 (6.8)208 (7.3) 10,000–29,9993209 (33.7)2254 (33.8)955 (33.5) 30,000–49,9991450 (15.2)1020 (15.3)430 (15.1) ≥ 50,000984 (10.3)681 (10.2)303 (10.6) Don’t know3207 (33.8)2252 (33.9)955 (33.5)BMI, kg/m2, n (%)0.14 < 18.5466 (4.9)313 (4.7)153 (5.4) 18.5–24.95778 (60.7)4047 (60.8)1731 (60.7) 25.0–27.42056 (21.6)1471 (22.1)585 (20.5) ≥ 27.51212 (12.8)830 (12.4)382 (13.4)Smoking status, n (%)0.12 Never7149 (75.2)5041 (75.7)2108 (73.9) Former1416 (14.8)960 (14.4)456 (16.0) Current947 (10.0)942 (14.1)423 (14.8)Alcohol use, n (%)0.43 Never7943 (83.5)5582 (83.8)2361 (82.8) Former204 (2.1)137 (2.1)67 (2.4) Current1365 (14.4)942 (14.1)423 (14.8)Physical activity, n (%)0.24 Inactive135 (1.4)93 (1.4)42 (1.5) Moderate3304 (34.7)2279 (34.2)1025 (36.0) Active6073 (63.8)4289 (64.4)1784 (62.6)Self-rated health, n (%)0.53 Poor/ very poor1516 (15.9)1072 (16.1)444 (15.6) Good/very good7996 (84.1)5589 (83.9)2407 (84.4)Hypertension, n (%)0.73 No6489 (68.2)4537 (68.1)1952 (68.5) Yes3023 (31.8)2124 (31.9)899 (31.5)Hyperlipidaemia, n (%)0.12 No8638 (90.8)6029 (90.5)2609 (91.5) Yes874 (9.2)632 (9.5)242 (8.5)Phenotypic age, years, mean (SD)58.8 (9.2)58.7 (9.2)58.8 (9.1)0.51Abbreviation: n number, CNY Chinese yuan, BMI body mass index, SD standard deviation Characteristics of the total samples, training set and testing set in the GBCS Abbreviation: n number, CNY Chinese yuan, BMI body mass index, SD standard deviation Fig. 1Correlation plots for the different nutrients. Heat map showing the Spearman correlation coefficient (r) between each nutrient Correlation plots for the different nutrients. Heat map showing the Spearman correlation coefficient (r) between each nutrient Nutrients identification Table 2 shows that, from a pool of 434 potential predictor variables, 19 variables were selected for inclusion from AENET. These included 4 main effects: fat (weight = 0.00211), carbohydrate (weight=-0.00014), iron (Fe, weight = 0.00102), and carotenoids (weight = 0.00148); 7 squared terms: carbohydrate (weight = 0.00045), saturated fatty acids (weight=-0.00103), niacin (weight = 0.00050), sodium (Na, weight = 0.00076), phosphorus (P, weight = 0.00058), iron (Fe, weight = 0.00073), and vitamin B12 (weight = 0.00025); and 8 pairwise interactions: carbohydrate & potassium (weight=-0.00086), polyunsaturated fatty acids (PUFA) & vitamin E (weight = 0.00167), PUFA & selenium (weight=-0.00138), vitamin A & selenium (weight=-0.00151), vitamin A & folic acid (weight = 0.00116), niacin & phosphorus (weight=-0.00047), vitamin E & carotenoids (weight = 0.00142), and vitamin E & vitamin B12 (weight = 0.00077). A logarithmic transformation using base 10 was applied to both the continuous phenotypic age variable and nutrient levels, which were subsequently standardized into z-scores for analysis. Table 2Selected predictors of main effects, square terms and pairwise interactions of nutrients for phenotypic age in adaptive elastic-net in the training set of the GBCS (n = 6661)β, yearsMain effects Fat, g0.00211 Carbohydrate, g-0.00014 Fe, mg0.00102 Carotenoid, µg0.00148Square terms Carbohydrate, g0.00045 Saturated Fatty Acid, g-0.00103 Niacin, mg0.00050 Na, mg0.00076 P, mg0.00058 Fe, mg0.00073 Vitamin B12, µg0.00025Pairwise interactions Carbohydrate, g & K, mg-0.00086 PUFA, g & Vitamin E, mg0.00167 PUFA, g & Se, µg-0.00138 Vitamin A, µg RE & Se, µg-0.00151 Vitamin A, µg RE & Folic acid, µg0.00116 Niacin, mg & P, mg-0.00047 Vitamin E, mg & Carotenoid, µg0.00142 Vitamin E, mg & Vitamin B12, µg0.00077Abbreviation: PUFA polyunsaturated fatty acid, Fe iron, Na sodium, P phosphorus, K potassium, Se selenium Table 2Selected predictors of main effects, square terms and pairwise interactions of nutrients for phenotypic age in adaptive elastic-net in the training set of the GBCS (n = 6661)β, yearsMain effects Fat, g0.00211 Carbohydrate, g-0.00014 Fe, mg0.00102 Carotenoid, µg0.00148Square terms Carbohydrate, g0.00045 Saturated Fatty Acid, g-0.00103 Niacin, mg0.00050 Na, mg0.00076 P, mg0.00058 Fe, mg0.00073 Vitamin B12, µg0.00025Pairwise interactions Carbohydrate, g & K, mg-0.00086 PUFA, g & Vitamin E, mg0.00167 PUFA, g & Se, µg-0.00138 Vitamin A, µg RE & Se, µg-0.00151 Vitamin A, µg RE & Folic acid, µg0.00116 Niacin, mg & P, mg-0.00047 Vitamin E, mg & Carotenoid, µg0.00142 Vitamin E, mg & Vitamin B12, µg0.00077Abbreviation: PUFA polyunsaturated fatty acid, Fe iron, Na sodium, P phosphorus, K potassium, Se selenium Selected predictors of main effects, square terms and pairwise interactions of nutrients for phenotypic age in adaptive elastic-net in the training set of the GBCS (n = 6661) Abbreviation: PUFA polyunsaturated fatty acid, Fe iron, Na sodium, P phosphorus, K potassium, Se selenium DARI performances The DARI ranged from − 0.69 to 0.75 with a median (IQR) of 0.03 (0.01, 0.06) in the training set (n = 6661), from − 0.34 to 0.53 with a median (IQR) of 0.03 (0.01, 0.06) in the testing set (n = 2851), and from − 0.69 to 0.75 with a median (IQR) of 0.03 (0.01, 0.06) in the entire set (Supplementary Fig. 3). Higher DARI values indicate greater susceptibility to phenotypic age in relation to nutrients. The validation of DARI After adjusting for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia, the training and test sets performed similarly on the data with 0, 5-fold and 10-fold cross-validation (Table 3), with the smallest MAE and MSPE in the incorporated DARI model with no cross-validation (MAE: 0.0376, 0.0371; MSPE: 0.0844, 0.0739), followed by the 10-fold cross-validated model. The input of DARI further improved the generalization of the model, where in no cross-validation, 0.1 unit increase in DARI increased the phenotypic age by 9.5% (7.2%, 11.8%) and 9.5% (7.2%, 11.8%) for the training and testing sets, respectively. Based on the SHAP plot from the XGBoost algorithm model, DARI appeared to be the third most important factor associated with phenotypic age in both the training and testing sets, following age and sex (Fig. 2). Table 3Statistical performance of regression analysis on association between DARI and phenotypic age in both training set and testing set using data from the GBCS Model without DARIaModel with DARIaTraining set(n = 6661)Testing set(n = 2851)Training set(n = 6661)Testing set(n = 2851)Percent change in phenotypic age (95% CI)--9.5% (7.2%, 11.8%) ***5.4% (2.0%, 8.8%) **Model evaluation metrics MAE0.03780.03720.03760.0371 MSPE0.08520.07420.08440.07395-fold Cross Validation MAE0.03790.03740.03770.0373 MSPE0.08570.07490.08490.074710-fold Cross Validation MAE0.03780.03740.03770.0373 MSPE0.08560.07490.08480.0747Abbreviation: DARI Dietary aging risk index, MAE Mean absolute error, MSPE Mean squared percentage errora: All models were adjusted for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia*: The asterisks indicate statistical significance levels. *: P < 0.05; **: P < 0.01; ***: P < 0.001 Table 3Statistical performance of regression analysis on association between DARI and phenotypic age in both training set and testing set using data from the GBCS Model without DARIaModel with DARIaTraining set(n = 6661)Testing set(n = 2851)Training set(n = 6661)Testing set(n = 2851)Percent change in phenotypic age (95% CI)--9.5% (7.2%, 11.8%) ***5.4% (2.0%, 8.8%) **Model evaluation metrics MAE0.03780.03720.03760.0371 MSPE0.08520.07420.08440.07395-fold Cross Validation MAE0.03790.03740.03770.0373 MSPE0.08570.07490.08490.074710-fold Cross Validation MAE0.03780.03740.03770.0373 MSPE0.08560.07490.08480.0747Abbreviation: DARI Dietary aging risk index, MAE Mean absolute error, MSPE Mean squared percentage errora: All models were adjusted for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia*: The asterisks indicate statistical significance levels. *: P < 0.05; **: P < 0.01; ***: P < 0.001 Statistical performance of regression analysis on association between DARI and phenotypic age in both training set and testing set using data from the GBCS Abbreviation: DARI Dietary aging risk index, MAE Mean absolute error, MSPE Mean squared percentage error a: All models were adjusted for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia *: The asterisks indicate statistical significance levels. *: P < 0.05; **: P < 0.01; ***: P < 0.001 Fig. 2Clarification of machine learning models through SHAP summary and dependence plots. A, B Importance matrix and SHAP summary plot displaying the contributions of all variables to the XGBoost model in the training set (n = 6661). C, D Importance matrix and SHAP summary plot displaying the contributions of all variables to the XGBoost model in the testing set (n = 2851). Each line represents a feature variable, with the x-axis corresponding to the SHAP value. Red dots indicate higher feature values, while blue dots indicate lower feature values. SHAP values higher than zero indicate older phenotypic age. All models were adjusted for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia Clarification of machine learning models through SHAP summary and dependence plots. A, B Importance matrix and SHAP summary plot displaying the contributions of all variables to the XGBoost model in the training set (n = 6661). C, D Importance matrix and SHAP summary plot displaying the contributions of all variables to the XGBoost model in the testing set (n = 2851). Each line represents a feature variable, with the x-axis corresponding to the SHAP value. Red dots indicate higher feature values, while blue dots indicate lower feature values. SHAP values higher than zero indicate older phenotypic age. All models were adjusted for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia In all participants, DARI showed significantly positive associations with phenotypic age (β = 0.08 years, 95% CI, 0.06–0.10) and accelerating age (OR = 1.63, 95% CI, 1.38–1.93) (Table 4). Based on the SHAP plot’s importance assessment, DARI ranks third and second among factors associated with phenotypic age and accelerating age, respectively (Fig. 3). As shown in Table 5, during an average follow-up of 16.1 years, DARI was significantly associated with an increased risk of all-cause mortality (HR = 1.10, 95% CI, 1.04–1.17). The predictive capability of DARI on all-cause mortality was satisfactory (C-index: 0.784; C/D AUC: 0.884; Integrated Brier Score: 0.079) (Fig. 4). Similar results were observed across different methods (Fig. 4). Additionally, the time-dependent loss function results showed that DARI was the second most important variable in the dataset based on the Brier score and AUC (Fig. 5). Table 4Associations of DARI with phenotypic age, accelerating age in the GBCS and α-Klotho concentrations in the NHANESCrude modelModel 1aModel 2bβ (95% CI)P-valueβ (95% CI)P-valueβ (95% CI)P-valueGBCS, n = 9512 Phenotypic age, years0.08 (0.06, 0.11)<0.0010.09 (0.07, 0.11)<0.0010.08 (0.06, 0.10)<0.001OR (95% CI)P-valueOR (95% CI)P-valueOR (95% CI)P-value Accelerating age,yes/no1.50 (1.26, 1.80)<0.0011.73 (1.46, 2.06)<0.0011.63 (1.38, 1.93)<0.001NHANES, n = 6945β (95% CI)P-valueβ (95% CI)aP-valueβ (95% CI)cP-value α-Klotho, pg/ml-0.024 (-0.040, -0.009)0.002-0.025 (-0.040, -0.009)0.002-0.020 (-0.036, -0.004)0.015a Model 1 adjusted for age, sex, and educationb Model 2 additionally adjusted for occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemiac Model 2 additionally adjusted for race, poverty-to-income ratio, marital status, BMI, smoking status, alcohol use, diabetes mellitus, hypertension, and cardiovascular disease Table 4Associations of DARI with phenotypic age, accelerating age in the GBCS and α-Klotho concentrations in the NHANESCrude modelModel 1aModel 2bβ (95% CI)P-valueβ (95% CI)P-valueβ (95% CI)P-valueGBCS, n = 9512 Phenotypic age, years0.08 (0.06, 0.11)<0.0010.09 (0.07, 0.11)<0.0010.08 (0.06, 0.10)<0.001OR (95% CI)P-valueOR (95% CI)P-valueOR (95% CI)P-value Accelerating age,yes/no1.50 (1.26, 1.80)<0.0011.73 (1.46, 2.06)<0.0011.63 (1.38, 1.93)<0.001NHANES, n = 6945β (95% CI)P-valueβ (95% CI)aP-valueβ (95% CI)cP-value α-Klotho, pg/ml-0.024 (-0.040, -0.009)0.002-0.025 (-0.040, -0.009)0.002-0.020 (-0.036, -0.004)0.015a Model 1 adjusted for age, sex, and educationb Model 2 additionally adjusted for occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemiac Model 2 additionally adjusted for race, poverty-to-income ratio, marital status, BMI, smoking status, alcohol use, diabetes mellitus, hypertension, and cardiovascular disease Associations of DARI with phenotypic age, accelerating age in the GBCS and α-Klotho concentrations in the NHANES Accelerating age, yes/no a Model 1 adjusted for age, sex, and education b Model 2 additionally adjusted for occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia c Model 2 additionally adjusted for race, poverty-to-income ratio, marital status, BMI, smoking status, alcohol use, diabetes mellitus, hypertension, and cardiovascular disease Fig. 3Clarification of machine learning models through SHAP summary and dependence plots. A, B Importance matrix and SHAP summary plot showing the contribution of all variables to phenotypic age in the XGBoost model (n = 9512). C, D Importance matrix and SHAP summary plot showing the contribution of all variables to acceleratingage in the XGBoost model (n = 9512). Each line represents a feature variable, with the x-axis corresponding to the SHAP value. Red dots indicate higher feature values, while blue dots indicate lower feature values. SHAP value greater than 0 indicates older phenotypic age and higher risk of accelerating age. All models were adjusted for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia Clarification of machine learning models through SHAP summary and dependence plots. A, B Importance matrix and SHAP summary plot showing the contribution of all variables to phenotypic age in the XGBoost model (n = 9512). C, D Importance matrix and SHAP summary plot showing the contribution of all variables to acceleratingage in the XGBoost model (n = 9512). Each line represents a feature variable, with the x-axis corresponding to the SHAP value. Red dots indicate higher feature values, while blue dots indicate lower feature values. SHAP value greater than 0 indicates older phenotypic age and higher risk of accelerating age. All models were adjusted for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia Table 5Association between DARI and all-cause mortality stratified by smoking status in the GBCS from 2003 to 2004 and followed up until July 2022 (n = 9512)Number of deaths (mortality rate, per 100 person-years)Crude modelModel 1aModel 2bHR (95% CI)P-valueHR (95% CI)P-valueHR (95% CI)P-valueTotal samples3197 (33.61)1.09 (1.02, 1.16)0.0081.12 (1.05, 1.19)<0.0011.10 (1.04, 1.17)0.001Stratified by smoking statusc Never2052 (28.70)1.05 (0.97, 1.13)0.2131.05 (0.98, 1.14)0.1721.04 (0.96, 1.12)0.340 Former672 (47.46)1.19 (1.04, 1.36)0.0141.18 (1.03,1.35)0.0161.14 (1.00, 1.31)0.054 Current473 (49.95)1.29 (1.12, 1.50)<0.0011.32 (1.14, 1.52)<0.0011.29 (1.12, 1.50)<0.001a Model 1 adjusted for age, sex and educationb Model 2 additionally adjusted for occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemiac P for interaction for DARI and smoking status: 0.035; age: 0.830; sex: 0.151; education: 0.719; occupation: 0.556; family income: 0.795; BMI: 0.883; alcohol use: 0.365; physical activity: 0.485; self-rated health: 0.563; hypertension: 0.825; hyperlipidaemia: 0.532 Table 5Association between DARI and all-cause mortality stratified by smoking status in the GBCS from 2003 to 2004 and followed up until July 2022 (n = 9512)Number of deaths (mortality rate, per 100 person-years)Crude modelModel 1aModel 2bHR (95% CI)P-valueHR (95% CI)P-valueHR (95% CI)P-valueTotal samples3197 (33.61)1.09 (1.02, 1.16)0.0081.12 (1.05, 1.19)<0.0011.10 (1.04, 1.17)0.001Stratified by smoking statusc Never2052 (28.70)1.05 (0.97, 1.13)0.2131.05 (0.98, 1.14)0.1721.04 (0.96, 1.12)0.340 Former672 (47.46)1.19 (1.04, 1.36)0.0141.18 (1.03,1.35)0.0161.14 (1.00, 1.31)0.054 Current473 (49.95)1.29 (1.12, 1.50)<0.0011.32 (1.14, 1.52)<0.0011.29 (1.12, 1.50)<0.001a Model 1 adjusted for age, sex and educationb Model 2 additionally adjusted for occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemiac P for interaction for DARI and smoking status: 0.035; age: 0.830; sex: 0.151; education: 0.719; occupation: 0.556; family income: 0.795; BMI: 0.883; alcohol use: 0.365; physical activity: 0.485; self-rated health: 0.563; hypertension: 0.825; hyperlipidaemia: 0.532 Association between DARI and all-cause mortality stratified by smoking status in the GBCS from 2003 to 2004 and followed up until July 2022 (n = 9512) a Model 1 adjusted for age, sex and education b Model 2 additionally adjusted for occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia c P for interaction for DARI and smoking status: 0.035; age: 0.830; sex: 0.151; education: 0.719; occupation: 0.556; family income: 0.795; BMI: 0.883; alcohol use: 0.365; physical activity: 0.485; self-rated health: 0.563; hypertension: 0.825; hyperlipidaemia: 0.532 Fig. 4Comparison of model performance between Cox proportional hazards (Coxph) model and Random Survival Forest (RSF) model using three metrics: A Concordance Index (C-index); B Integrated Concordance/Dynamic Area Under the Curve (C/D AUC); and C Integrated Brier Score (n = 9512). All models were adjusted for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia Comparison of model performance between Cox proportional hazards (Coxph) model and Random Survival Forest (RSF) model using three metrics: A Concordance Index (C-index); B Integrated Concordance/Dynamic Area Under the Curve (C/D AUC); and C Integrated Brier Score (n = 9512). All models were adjusted for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia Fig. 5Evaluation of variable importance for the impact of selected variables on survival probability using Random Survival Forest models with a time-dependent loss function. A represents importance based on the Brier score, and B assesses importance based on the Area Under the Curve (AUC). Variable impacts may differ at various time points, with the y-axis values indicating changes in the loss function after permutation (n = 9512). All models were adjusted for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia Evaluation of variable importance for the impact of selected variables on survival probability using Random Survival Forest models with a time-dependent loss function. A represents importance based on the Brier score, and B assesses importance based on the Area Under the Curve (AUC). Variable impacts may differ at various time points, with the y-axis values indicating changes in the loss function after permutation (n = 9512). All models were adjusted for age, sex, education, occupation, family income, BMI, smoking status, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia In the NHANES, after adjusting for age, sex, race, education, poverty income ratio (PIR), marital status, BMI, smoking status, alcohol use, diabetes mellitus, hypertension, and cardiovascular disease, higher DARI were associated with lower α-Klotho levels (β=-0.020 pg/ml, 95% CI: -0.036 to -0.004) (Table 4). Sensitivity analyses Several sensitivity analyses were conducted to evaluate the robustness of the primary findings. First, evaluation of the dose-response association revealed that fat was positively associated with phenotypic age, while Fe, carbohydrates, and carotenes showed a U-shaped association with phenotypic age (Supplementary Figs. 4–5). Second, it was found that there were no significant interactions between DARI and age, sex, education, occupation, family income, BMI, alcohol use, physical activity, self-rated health, hypertension, and hyperlipidemia regarding all-cause mortality (P for interaction from 0.151 to 0.883), except for smoking status (P for interaction = 0.035), with the association being more pronounced in the current smoker (HR = 1.29, 95% CI, 1.12–1.50) than never smoker (HR = 1.04, 95% CI, 0.96–1.12) (Table 5). Third, DARI was positively associated with all-cause mortality in both overall and stratification by smoking status (Supplementary Fig. 6). In the random survival forest model, incorporation of DARI improved the prediction of all-cause mortality, with increases in the C-index (from 0.750 to 0.784, P = 0.001) and integrated C/D AUC (from 0.840 to 0.884, P < 0.001), as well as a reduction in the integrated Brier score (from 0.083 to 0.079, P = 0.029) (Supplementary Table 2). Fourth, all nutrients identified by AENET, including fat, carbohydrate, Fe, and carotenoid, were positively associated with phenotypic age (P from 0.001 to 0.994) (Supplementary Table 3). Fifth, phenotypic age was positively associated with all-cause mortality (HR = 1.062, 95% CI: 1.058–1.066). Additionally, no significant interactions were found between phenotypic age and age, smoking status, education, occupation, family income, BMI, alcohol use, physical activity, self-rated health, hypertension, or hyperlipidemia regarding all-cause mortality (P for interaction from 0.05 to 0.93), except for sex (P for interaction = 0.003), with the association being more pronounced in women (HR = 1.066, 95% CI: 1.060–1.071) than in men (HR = 1.056, 95% CI: 1.049–1.063) (Supplementary Table 4). Sixth, DARI was negatively associated with α-Klotho levels (Supplementary Fig. 7) using data from the NHANES. Seventh, regarding the impact of variables on survival probability in different smoking status groups, DARI remained the second most important variable next to age (Supplementary Figs. 8–10). Eighth, internal validation via a random 50/50 split of the GBCS dataset into training and testing subsets showed consistent performance and robustness of the DARI algorithm (Supplementary Table 5). Discussion In this study, we constructed a novel metric derived through machine learning techniques, the DARI, to quantify the collective influence of dietary nutrients on phenotypic aging. The significant associations of higher DARI values with higher accelerating age and all-cause mortality in GBCS, and lower α-Klotho levels in NHANES highlight the potential of DARI in assessing ageing-related dietary patterns. Importantly, the application of machine learning methods allowed for a nuanced analysis of the dietary data, accommodating the multifaceted nature of nutrient interactions and their impact on aging, thus providing a more comprehensive understanding than traditional dietary assessment methods. Our findings align with the growing body of literature supporting the relationship between diet and aging. Previous studies have shown the importance of dietary patterns, such as the Mediterranean diet, Okinawan diet and Nordic diet, in promoting healthy aging through mechanisms like metabolic regulation, antioxidants and inflammation reduction [33]. Furthermore, dietary pattern related to antioxidant, such as the Composite Dietary Antioxidant Index (CDAI) was also positively associated with delayed biological aging [34], which could be due to dietary antioxidants, including manganese, selenium, zinc, and vitamins A, C, and E. These antioxidants have been associated with lower risks of age-related diseases such as cardiovascular diseases, certain types of cancer, and neurodegenerative diseases [35–37]. CDAI evaluates the cumulative intake of these antioxidants based on dietary data [38]. Dietary Inflammatory Index (DII) is another dietary metric which assess the pro-inflammatory and anti-inflammatory properties of diet by incorporating macronutrients, vitamins, minerals, flavonoids, and special nutrients. A study found a significant and positive association between DII and both biological and phenotypic age [39]. However, previous studies have primarily focused on the inflammatory and antioxidant properties of nutrients without directly evaluating their broader associations with aging [34, 39]. Our work extends this knowledge by creating an index that considers the combined effects of various nutrients on phenotypic aging, thus moving beyond the study of individual nutrients or dietary patterns. The DARI provides a comprehensive framework for assessing the impact of dietary nutrients on the aging process, offering a more direct and nuanced evaluation of nutrient-aging relationships. In the DARI, fat was a nutrient that predominantly associated with increased phenotypic age, which was in accordance with previous studies showing that high-fat diets can lead to fragmentation of mitochondria in white adipocytes, reducing the ability to burn fat and accelerating fat accumulation [40], while higher body weight and high-fat diets are both associated with accelerated epigenetic aging [41]. Additionally, in animal studies, rats received a low-fat diet followed an increased in levels of anti-aging protein klotho and its co-receptor, fibroblast growth factor 23 (FGF23), in the hippocampus and prefrontal cortex, supporting the role of dietary regimens on anti-aging proteins [42]. Our study also showed a positive association between dietary iron with phenotypic age, which was consistent with a previous study [43], although the detailed molecular mechanisms remain unknown. Iron is a pro-oxidant and catalyst that promotes the formation of hydroxyl radicals [44]. Excessive iron storage might lead to an imbalance between compounds the formation of both reactive oxygen species and antioxidants, which causes oxidative stress [45] and may subsequently contribute to accelerated wear and tear of telomeres [46]. An in vitro study showed that high-intensity stress shortened telomere length by inducing high-frequency breaks in the telomeric double-strand [47]. In addition, older people generally had lower endogenous antioxidant function and therefore might be more sensitive or vulnerable to oxidative stress induced by iron overload [48]. Our study showed a U-shaped association between dietary carotene, a key nutrient in the DARI, and phenotypic age, suggesting that the protective effect of carotene against aging is significant only at intakes below a certain dose. This finding aligns with the European Prospective Investigation into Cancer and Nutrition (EPIC) - InterAct study, which reported an L-shaped association between plasma carotene levels and the risk of type 2 diabetes [49]. Additionally, two randomized clinical trials in the United States involving 8171 women and 22,071 men, administered with 50 mg of beta-carotene every other day for duration of 9.2 and 12 years, respectively, did not observe a significant decrease in type 2 diabetes risk [50, 51]. The substantial disparity between the carotene doses used in these trials and typical dietary intakes might lead to the discrepancies between these clinical outcomes and the findings of our study and similar research. Carotene, as an antioxidant, can eliminate free radicals. However, free radicals play a dual role in the pathogenesis of many diseases, and over-elimination of free radicals by increasing intake of beta-carotene may lead to undesirable consequences [52, 53], which may explain the association between excessive intake of carotene and increased aging risk in our analysis. Traditional studies on dietary patterns often rely on hypothesis-driven methodologies anchored in existing knowledge, yet in contexts where information is sparse, data-driven approaches, such as the one employed in this study, might provide more information [54]. Methodologically, this study stands out for its novel application within a Chinese cohort, marking the first attempt to develop an aging assessment index based on dietary nutrients in this demographic. Furthermore, the analytical rigor was bolstered by the adoption of a comprehensive statistical framework, integrating advanced methods. This multifaceted approach not only fortified the validation of DARI but also enriched the interpretative depth of the findings. Additionally, the external validation of DARI using the aging-related biomarker serum α-Klotho from NHANES enhances the robustness of the findings and provides strong support for its applicability and generalizability across different populations. Nonetheless, the study had several limitations. First, although this study validated the association between DARI and α-Klotho using NHANES data, it has not independently validated the association between DARI and accelerating age. Therefore, the generalizability of DARI across different populations requires further validation with additional external data. Second, in nutritional epidemiological studies, measurement errors due to variability in food intake are almost unavoidable, often leading to less precise estimates, despite the use of FFQ previously validated in Chinese cohorts [17]. Lastly, although the analyses adjusted for a wide range of confounders (n = 12), including many that were not adjusted for in previous studies such as self-rated health and hyperlipidaemia, residual confounding cannot be entirely ruled out. Conclusion We developed and validated a DARI using multiple machine learning methods, which represents a comprehensive metric reflecting the cumulative effect of various nutrients on phenotypic aging, exhibiting significant associations with specific aging-related markers, including accelerating age, all-cause mortality and serum α-Klotho. Further studies are warranted to externally validate the index, and dissect the intricate interactions among diverse nutrients and their potential underlying biological mechanisms that contribute to the aging process. Supplementary Information Supplementary Material 1. Supplementary Material 1.