Dietary patterns and food systems have important but distinct implications for human health and environmental sustainability(Reference Gaupp, Laderchi and Lotze-Campen1–Reference Kraak and Aschemann-Witzel4). Over the past five decades, global dietary shifts are closely associated with a growing burden of various non-communicable diseases(Reference Willett, Rockstrom and Loken5–Reference Fung, Pan and Hou7). Meanwhile, transformations in food production systems have intensified environmental pressures through greenhouse gas emissions, land-use change, land degradation and water pollution(Reference van Dooren2,Reference Springmann, Godfray and Rayner8,Reference Turner, Ashtree and Lane9) . To better integrate nutritional goals with sustainability objectives, the concept of nutrition-related environmental sustainability has attracted growing scholarly and policy attention(Reference Aydogdu and Karadag10–Reference Rochefort, Paquette and Robitaille12). Unlike traditional dietary patterns that prioritise nutrition while overlooking environmental concerns, the EAT-Lancet Commission introduced the planetary health diet index (PHDI) in 2019 to address both diet-related diseases and the environmental impacts of food production(Reference Willett, Rockstrom and Loken5,Reference Rockström, Stordalen and Horton13) . The PHDI translates the sustainability and health principles of the EAT-Lancet reference diet into a numerical index, promoting a predominantly plant-based diet with reduced intake of animal products and red meat(Reference Albabtain, Weech and Fallaize14,Reference Karavasiloglou, Thompson and Pestoni15) . Recent studies have shown that adherence to the PHDI is associated not only with lower greenhouse gas emissions and reduced environmental pollution but also with improved health outcomes, including decreased all-cause mortality, lower obesity rates and reduced cardiovascular disease risk(Reference Reger, Leitzmann and Rohrmann16–Reference Chen, Wang and Ji18).
Beyond its environmental and health benefits, the PHDI has garnered increasing research attention for its potential association with depression(Reference Santoso, Kerr and Kassim19–Reference Zhao, Sun and Li21). This broader perspective aligns with Nutritional Psychiatry, an emerging evidence-based and transdisciplinary field that examines how diet and nutrients relate to mental and brain health across the life course(Reference Marx, Mueller-Stierlin and Wallace22,Reference Su23) . By positioning diet as a modifiable factor in mental health, Nutritional Psychiatry provides an important framework for advancing evidence-based prevention and treatment strategies. Emerging evidence suggested that higher adherence to the EAT-Lancet diet is linked to a lower risk of depression(Reference Kamrani, Kachouei and Sobhani24–Reference Lu, Wu and Shao26). Given the widespread prevalence and rising global burden of depression(Reference Alaie, Ssegonja and Philipson27,Reference Deng, Sun and Wu28) , clarifying the relationship between PHDI adherence and depression may help inform evidence-based dietary strategies for its prevention and management. Although research on the association between diet and mental disorders has shifted from focusing on individual nutrients or foods to a more holistic analysis of dietary patterns, the predominant approach still involves combining multiple dietary components into a single composite score(Reference Lin, Yang and Lan29,Reference Bayes, Schloss and Sibbritt30) . This method fails to capture the complex interactions and relative contributions of individual dietary components. Similarly, previous research on the link between diet and depression has primarily relied on binary classifications or total symptom scores to assess depression severity(Reference Lu, Wu and Shao26,Reference Jiang, Choi and Gong31) . However, such conventional approaches may obscure the specific associations between dietary factors and particular symptoms, as well as the interactions among symptoms. Therefore, comprehensively understanding the nuanced relationship between PHDI and depressive symptoms remains a considerable challenge.
To address these challenges, employing a combined approach of network analysis and machine learning may provide deeper insights into the relationship between the PHDI and depression. On one hand, network analysis was employed to probe the links between PHDI components and individual depressive symptoms, moving beyond composite dietary scores to reveal complex patterns of association between specific dietary components and depressive symptoms(Reference Hevey32,Reference Yang, Liu and Zhang33) . This approach enables the identification of the dietary network structure within individuals with depression, the components most closely linked to specific symptoms, and the PHDI components or depressive symptoms that may serve as bridge nodes between the two communities(Reference Yang, Xu and Huang34–Reference Huang, Pu and Yang36). On the other hand, machine-learning techniques can help identify the PHDI components most important for predicting depression. XGBoost is a tree-based ensemble learning algorithm that sequentially combines multiple decision trees, enabling it to model nonlinear associations and complex interactions among predictors(Reference Chen and Guestrin37). Because predictions from ensemble models can be difficult to interpret, SHAP quantifies the magnitude and direction of each predictor’s contribution to an individual prediction based on Shapley values(Reference Lundberg and Lee38). Interpreting the XGBoost model using SHAP enables the identification of the most important PHDI components and clarifies how they contribute to the predicted probability of depression.
The present study adopted an integrative approach combining network analysis and machine learning to examine the complex associations between PHDI components and depressive symptoms. First, network analysis was conducted to compare PHDI dietary networks between individuals with and without depression, identifying key dietary components and group differences in network structure. Second, XGBoost and SHAP analyses were employed to assess the predictive value of each PHDI component in mitigating depression risk. Finally, a joint network of PHDI components and depressive symptoms was constructed to identify potential bridging nodes connecting the two communities. This combined approach aims to support the development of targeted dietary interventions and provide a theoretical foundation for diet-based prevention and treatment of depression.
Methods
Study population
The National Health and Nutrition Examination Survey (NHANES), conducted biennially by the USA. Centers for Disease Control and Prevention, is a comprehensive program designed to assess the health and nutritional status of the non-institutionalised USA population(Reference Ahluwalia, Dwyer and Terry39). The survey was approved by the Research Ethics Review Board of the National Center for Health Statistics, and all participants provided written informed consent. This study analysed data from 61 684 participants across seven NHANES survey cycles conducted between 2005 and 2018. Consistent with exclusion criteria used in prior research(Reference Zhan, Bui and Hodge40,Reference Lan, Li and Shen41) , participants were excluded for the following reasons: 24-h dietary recalls classified by NHANES as unreliable (n 987); missing dietary recall data for Day 1 or Day 2 (n 12 953); age under 20 years or missing age information (n 18 771); implausible energy intake (defined as <600 kcal/day or >3500 kcal/day for women, and <800 kcal/day or >4200 kcal/day for men) (n 1792) and missing data on depression (n 1639). Figure 1 illustrates the overall flow chart of participant selection. Therefore, after excluding 36 142 participants who did not meet the inclusion criteria, a total of 25 542 eligible participants were included in the final analysis. As this study utilised publicly available, de-identified data, no ethical approval or additional informed consent was required.
Flowchart for screening the USA. Participants in NHANES 2005–2018.

Dietary assessment and planetary health diet index calculation
To evaluate adherence to the EAT-Lancet reference diet for sustainability, we used the PHDI. The PHDI is a detailed dietary assessment tool designed to assess individual adherence to the dietary guidelines developed by the EAT-Lancet Commission(Reference Willett, Rockstrom and Loken5). To accurately assess the PHDI, dietary intake data were first collected using two 24-h dietary recalls administered in each NHANES cycle by trained interviewers employing the USDA’s Automated Multiple-Pass Method. Standardised food group data per 100 g of food were then derived using the USDA’s Food and Nutrient Database for Dietary Studies and the Food Patterns Equivalents Ingredients Database, both released between 2005 and 2018. These individual dietary intake data were matched with the standardised food group data, and PHDI scores were subsequently calculated for each participant using the Dietaryindex R package(Reference Zhan, Hodge and Dunlop42), based on the average intake across the two dietary recalls.
The Planetary Health Diet Index (PHDI) comprises 14 equally weighted components—whole grains, non-starchy vegetables, whole fruits, fish and shellfish, nuts and seeds, unsaturated added fats, legumes, starchy vegetables, dairy, red and processed meat, poultry, eggs, saturated added fats, and added sugars—each scored from 0 to 10. As a result, the total PHDI score ranges from 0 to 140. Detailed scoring criteria are presented in Table S1, and additional information on the derivation of the PHDI were available elsewhere(Reference Bui, Pham and Wang43,Reference Frank, Jaacks and Meyer44) .
Assessment of depression
In the NHANES cohort, depression was assessed using the Patient Health Questionnaire-9 (PHQ-9), a self-report instrument based on the Diagnostic and Statistical Manual of Mental Disorders, Fourth Edition (DSM-IV)(Reference Kroenke, Spitzer and Williams45). The PHQ-9 measures nine depressive symptoms experienced over the past two weeks, including lack of interest, depressed mood, trouble sleeping, fatigue, appetite problems, feelings of worthlessness, difficulty concentrating, psychomotor agitation or retardation, and suicidal thoughts. Each item is rated on a scale from 0 (not at all) to 3 (nearly every day), yielding a total score ranging from 0 to 27, with higher scores indicating greater severity of depressive symptoms.
The PHQ-9 has demonstrated excellent psychometric properties in the USA population and is widely used to screen for depressive symptoms(Reference Yi, Xuan and Zakaly46). It is a standardised, clinically validated instrument with a sensitivity and specificity of 88 % for identifying depression(Reference Kroenke, Spitzer and Williams45). In the present study, participants with a PHQ-9 score below 10 were categorised as non-depression, while those with scores of 10 or higher were categorised as depression(Reference Lan, Li and Shen41,Reference Dadras47) .
Sociodemographic variables
All sociodemographic information was self-reported through standardised questionnaires. The variables included in this study were age, sex, race/ethnicity, educational level, marital status, smoking status, drinking status, and body mass index (BMI). Variable definitions were based on previous studies. Notably, all missing, invalid, or inapplicable values of these sociodemographic variables were uniformly relabeled as ‘Unknown’.
Statistical analysis
All statistical analyses were conducted using R Statistical Software (version 4.4.3). Continuous variables are reported as means ± standard deviations, while categorical variables are presented as frequencies and percentages. Group comparisons and correlation analyses were conducted between non-depression and depression participants for the relevant variables.
To ensure accurate network assessment, we followed standard guidelines(Reference Burger, Isvoranu and Lunansky48). In the analysis, each PHDI component and PHQ-9 symptom was a ‘node,’ with relationships as ‘edges,’ where thicker edges indicate stronger correlations. A partial correlation network was constructed and visualised using the R package qgraph. To obtain a parsimonious and interpretable structure, LASSO with EBIC (tuning parameter 0·5) was applied. Node-wise predictability was estimated using the R package mgm. In the network figures, blue edges represent positive and red edges negative conditional relationships.
We performed inferential analyses to examine local and global network properties. First, expected influence (EI) centrality was calculated to identify the most central PHDI components, quantifying how strongly each node is interconnected(Reference Opsahl, Agneessens and Skvoretz49). Second, modularity analysis using the Infomap algorithm detected and optimised community structures, confirming the two-dimensional structure of PHDI and PHQ-9 variables (Farage et al., 2021). Finally, bridge expected influence (BEI) was calculated to identify bridge nodes by summing the edge weights connecting each node to nodes in the other community. Analyses were conducted using the R packages qgraph, igraph, and networktools.
The accuracy and stability of the network were assessed using bootstrapping in the R package bootnet. First, nonparametric bootstrapping generated 95 % confidence intervals (CI) for edge weights, with narrower CI indicating more reliable estimates. Second, the stability of centrality indices was evaluated using the correlation stability coefficient via case-dropping bootstrap with 1000 samples, where correlation stability should not fall below 0·25, and values above 0·50 are considered preferable. Finally, bootstrapping tested whether paired differences in edge weights and node centrality were significant, with p < 0·05 indicating statistical significance.
To investigate whether the network characteristics of the PHDI differ between individuals with and without depression, we conducted a Network Comparison Test using the R package NetworkComparisonTest. The Network Comparison Test evaluated between-group differences in network structure invariance, global strength invariance, and edge invariance. Test statistics derived from the estimated networks were compared to distributions generated from 1000 permutations under the null hypothesis. A p-value greater than 0·05 for any of the tests indicated no significant difference in the strength of specific edges or the overall connectivity between the two networks, thus supporting the null hypothesis. Additionally, we assessed differences in the strength of each individual edge and applied the Holm–Bonferroni correction to adjust p-values for multiple comparisons.
To evaluate the importance of PHDI components in detecting depressive symptoms, we combined the XGBoost model with SHAP analysis. XGBoost, a tree-based ensemble algorithm, was used to classify depression based on PHDI components due to its minimal parameter tuning requirements and its ability to provide interpretable insights into feature importance(Reference Chen and Guestrin50). Within the field of explainable artificial intelligence, SHAP provides a post-hoc approach for interpreting complex model predictions(Reference Smith and Alvarez51). In the present study, SHAP values were used to quantify the magnitude and direction of each PHDI component’s contribution to the XGBoost model predictions. The XGBoost model was trained on 80 % of the data and tested on 20 %, with synthetic minority over-sampling technique applied to address class imbalance. We used 1000 trees with a low learning rate (0·01) to reduce overfitting. Logistic regression was also applied as a sensitivity analysis to compare results.
Results
A total of 25 542 participants were included in this study, with a mean age of 50·52 ± 17·70 years; 53·3 % were female and 46·7 % male. Based on the PHQ-9 scoring criteria, 2120 individuals (8·3 %) were classified as having depression. Table 1 summarises and compares the general characteristics of participants with and without depression and provides the full names and corresponding labels of the 14 PHDI components (PHDI1–PHDI14) and nine PHQ-9 depressive symptoms (PHQ1–PHQ9). Statistically significant differences were observed across various sociodemographic variables and all PHQ-9 symptoms, including age, BMI, race/ethnicity, education level, marital status, and smoking status (P < 0·05). Significant differences in PHDI dietary components were also found between the depressed and non-depressed groups. Specifically, compared to those with depression, individuals without depression had higher scores in whole grains, non-starchy vegetables, whole fruits, nuts and seeds, legumes, and added sugars, but lower scores in poultry, eggs, and saturated added fats (P < 0·05).
Characteristics of all participants stratified by depression conditions

Table 1. Long description
A table with 25 rows and 13 columns comparing characteristics of participants with and without depression. The table includes columns for various characteristics such as age, BMI, sex, race/ethnicity, education level, marital status, smoking status, drinking status, and various PHDI and PHQ-9 scores. Each row provides mean values and standard deviations for participants with and without depression, along with p-values indicating statistical significance. Notable trends include differences in age, BMI, education level, and various dietary components between the two groups.
Prior to conducting the network analyses, we examined the correlations among the 14 PHDI components in the overall sample, as well as within the depressed and non-depressed subgroups (Figures S1 and S2). The results showed that all correlation coefficients between variables were less than or equal to 0·8, indicating that multicollinearity was not a concern in the model(Reference Shrestha52).
PHDI network structure: depression v. non-depression
Figure 2a and b displays the PHDI networks for the depressed and non-depressed subgroups, respectively. The depressed group network contained 36 non-zero edges out of 91 possible connections (mean weight = 0·02), while the non-depressed group network exhibited 78 non-zero edges (mean weight = 0·03). The mean predictability of the nodes was 0·107 in the depressed group and 0·110 in the non-depressed group. The edge weight matrix for the depressed group is shown in Table S2, and the corresponding matrix for the non-depressed group is provided in Table S3. In the depressed group, the strongest correlation was observed between PHDI6 and PHDI7 (edge weight = 0·30), followed by PHDI10 and PHDI11 (edge weight = –0·23), and PHDI12 and PHDI13 (edge weight = 0·20). Similarly, in the non-depressed group, the strongest correlation was also between PHDI6 and PHDI7 (edge weight =0·31), followed by PHDI10 and PHDI11 (edge weight = –0·24), and PHDI12 and PHDI13 (edge weight = 0·23). Interestingly, PHDI1 and PHDI3 exhibited relatively strong edge weights in the non-depressed group, whereas their association was weaker in the depressed group. The bootstrapped confidence intervals of the estimated edges for the two groups are presented in Figure S3, and the bootstrapped difference tests are shown in Figure S4, indicating that the network structure was stable.
(a) The PHDI network structure of depressed groups. (b) The PHDI network structure of non-depressed groups. (c) Expected influence values of the PHDI networks from depressed groups and non-depressed groups. Note. Edges represent associations: blue for positive and red for negative correlations. Edge thickness reflects the strength of the association. Predictability is shown by the filled portion of the circle around each node. Nodes with blue EI values indicate the depressed group, and green EI values indicate the non-depressed group. EI, expected influence; PHDI, planetary health diet index; SHAP, Shapley additive explanation.

To examine the interactions among different PHDI components, we conducted a centrality analysis to identify the components that play key roles within the network structure. Figure 2c revealed that overall expected influence (EI) scores were higher in the non-depressed group compared to the depressed group. However, certain components consistently exhibited the highest EI values in both networks. In the depressed group, PHDI3 (whole fruits; EI = 0·60) had the highest EI score, followed by PHDI14 (added sugars; EI = 0·44) and PHDI1 (whole grains; EI = 0·42). In the non-depressed group, PHDI3 (whole fruits; EI = 0·69) showed the highest EI, followed by PHDI7 (legumes; EI = 0·64) and PHDI14 (added sugars; EI = 0·56). Additionally, the correlation stability coefficients for the depressed and non-depressed groups were 0·75 (Figure S5), indicating high network stability.
The Network Comparison Test results presented in Figure S6 indicate that the between-group differences in edge weight distribution (M = 0·10, p = 0·556) and global strength (S = 1·57, p = 0·870) of the network structure were not significant. Interestingly, the edge invariance test revealed that, compared to the depressed group, the non-depressed group exhibited significantly stronger associations between the following PHDI components: PHDI4 and PHDI10 (t = 0·10, p = 0·049), PHDI5 and PHDI9 (t = 0·04, p = 0·002), PHDI3 and PHDI12 (t = 0·02, p = 0·009), PHDI4 and PHDI12 (t = 0·02, p = 0·003), and PHDI11 and PHDI12 (t = 0·01, p = 0·022). Furthermore, several PHDI components showed significantly higher Expected Influence in the non-depressed group compared to the depressed group, including PHDI5 (t = –0·23, p = 0·022), and PHDI10 (t = –0·29, p = 0·021).
Predictive importance of PHDI components
SHAP values were used to assess the importance and direction of each PHDI components in predicting depression. The mean SHAP value bar plot (Figure 3a) ranked features based on their average SHAP values, showing that among all PHDI indicators, PHDI2 (value = 1·05) and PHDI14 (value = 0·75) were the most important predictors of depression. The SHAP summary plot (Figure 3b) further illustrated the direction of these variables’ effects across individuals: higher values of PHDI2 and PHDI14 were generally associated with a lower predicted probability of depression, indicating their potential protective roles. Additionally, logistic regression models conducted as sensitivity analyses similarly supported the protective effects of PHDI2 and PHDI14, consistent with the machine learning findings.
The SHAP value of PHDI components. (a) Mean SHAP value. (b) SHAP value. PHDI, planetary health diet index; SHAP, Shapley additive explanations.

Bridge network structure of the PHDI and depression
The network illustrating the associations between PHDI components and depressive symptoms is shown in Figure 4a. The network comprises 23 nodes, with 119 non-zero edges out of 253 possible cross-community edges (mean weight = 0·02). The average predictability across all nodes was 0·20. In the bridge network model, PHDI components and depressive symptoms exhibited stronger within-community connections. Community detection using the infomap algorithm (Figure 4b) statistically validated this visual observation by revealing that PHDI components and depressive symptoms clustered into two distinct communities. Notably, the edge weight matrix identified several strong cross-community associations, including PHDI14 and PHQ5 (edge weight = –0·02), PHDI3 and PHQ5 (edge weight = –0·02), PHDI1 and PHQ5 (edge weight = –0·02), and PHDI2 and PHQ2 (edge weight = –0·02). The 95 % bootstrap confidence intervals presented in Figure S7 indicate that the accuracy of the identified edges was relatively high and reliable. The results of the bootstrap difference tests for edge weights are shown in Figure S8.
(a) Network structure diagram of PHDI components and depressive symptoms. (b) The outcomes of community detection. (c) Bridge expected influence values for PHDI components and depressive symptoms. Note. Edges represent associations: blue for positive and red for negative correlations. Edge thickness reflects the strength of the association. Predictability is shown by the filled portion of the circle around each node. Nodes with blue BEI values indicate depressive symptoms, and green BEI values indicate PHDI components. BEI, bridge expected influence; PHDI, planetary health diet index.

The BEI results for the network of PHDI components and depressive symptoms are presented in Figure 4c, highlighting key bridge nodes between the two communities. According to the BEI results, PHQ5 (BEI = –2·91) exhibited the highest BEI in the network, followed by PHQ2 (BEI = –1·54). Additionally, the correlation stability coefficient for BEI was 0·44, indicating acceptable network stability (Figure S9).
Discussion
To the best of our knowledge, this is the first study to investigate the relationship between the planetary health diet index (PHDI) and depression using both network analysis and machine learning in a nationally representative sample. First, we explored the network structures of PHDI components among individuals with and without depression, offering novel insights into how dietary behaviours are organised and interrelated across different depressive states. Second, we determined the predictive value of specific dietary components by integrating the XGBoost model with SHAP value analysis, identifying PHDI2 (non-starchy vegetables) and PHDI14 (added sugars) as the most influential predictors of depression. Third, by constructing a bridge network, we revealed the complex associations between PHDI components and specific depressive symptoms, highlighting PHQ5 (appetite disturbance) and PHQ2 (depressed mood) as critical bridge nodes. Taken together, these findings advance our understanding of the diet-depression nexus and provide a solid theoretical foundation for optimising dietary interventions.
Although the global strength and overall edge weight distribution of the PHDI networks were generally similar between individuals with and without depression, several notable differences emerged. Most prominently, the dietary network of the non-depressed group exhibited substantially higher connectivity, with more than twice as many non-zero edges (78 v. 36) compared with the depressed group. Moreover, the edge invariance test revealed that the non-depressed group exhibited significantly stronger associations between several pairs of PHDI components compared with the depressed group. These findings indicated a greater degree of integration in the dietary patterns of non-depressed individuals, characterised by more frequent and stronger associations among different PHDI dietary components. Such a pattern might have reflected more diverse, balanced and structured eating behaviours. In contrast, the dietary network of depressed individuals appeared more fragmented, with weaker interconnections among food components, potentially indicating a more disorganised dietary pattern. Although previous studies have associated greater dietary diversity and food-group variety with a lower risk of depression(Reference Dong, Li and Wang53–Reference Santos, Von Schusterschitz Soares Schiatti and Muniz55), our findings extend this evidence by showing that the non-depressed group had a more densely connected PHDI network. These findings extend the relevance of dietary diversity by showing that individuals with and without depression also differ in the interconnections among dietary components.
The centrality analysis further clarified the differences in key drivers within the PHDI networks of individuals with and without depression. Overall, the non-depressed group exhibited higher EI scores across most PHDI components, suggesting a more interconnected and potentially integrated dietary pattern. Despite this overall difference, whole fruits (PHDI3) emerged as the component with the highest EI in both groups, establishing them as a core structural element of diet irrespective of depressive status. This finding aligned with established nutritional science and global dietary guidelines, which consistently identify fruit as a cornerstone of a healthy diet(Reference Cara, Goldman and Kollman56,Reference Agostoni, Boccia and Graffigna57) . Similarly, added sugars (PHDI14) also ranked highly in EI in both networks, reflecting their ubiquitous presence across a wide range of foods and their potential impact on overall dietary quality. Previous studies have likewise emphasised the central role of added sugars in dietary patterns, demonstrating strong associations with other food groups such as processed meats, oils and fats(Reference Hoang, Lee and Kim58,Reference Schwedhelm, Lipsky and Shearrer59) .
However, in the non-depressed group, legumes (PHDI7) showed the second-highest expected influence (EI) score, suggesting a central organising role within the dietary network. A substantial body of epidemiological research has consistently identified legumes as a foundational component of recognised healthy dietary patterns(Reference Opie, Itsiopoulos and Parletta60). These dietary models emphasise not individual food items but rather the holistic and synergistic interplay of multiple food groups(Reference Gardner, Vadiveloo and Petersen61,Reference Vajdi and Farhangi62) . Accordingly, individuals with high legume intake tend to consume more vegetables, whole grains and olive oil, while consuming less red meat – together forming a dietary network that may offer greater protection against depression(Reference Kunugi63). Notably, within the dietary network of the non-depressed group, the EI for nuts and seeds (PHDI5) and red and processed meats (PHDI10) were markedly higher than those in the depressed group, indicating their greater centrality in the overall dietary structure. This pattern highlights the potentially pivotal role of these food groups in shaping dietary regulation and nutritional adequacy, which may buffer against the onset or persistence of depressive symptoms. While previous studies have linked higher intake of nuts and seeds and lower intake of red and processed meats to better mental health outcomes(Reference Fernández-Rodríguez, Ortolá and Martínez-Vizcaíno64–Reference Davison, Stewart-Knox and Connolly66), our findings extend this evidence by showing their greater centrality in the dietary network of individuals without depression.
In addition to analysing the PHDI dietary network, the application of SHAP values enabled a detailed evaluation of the relative importance and directional influence of individual PHDI components on depression risk. The results indicated that non-starchy vegetables (PHDI2) and added sugars (PHDI14) were the most influential dietary factors in predicting depression. Specifically, higher consumption of non-starchy vegetables and stricter limitation of added sugars were consistently associated with a lower predicted probability of depression, underscoring their potential protective roles. Non-starchy vegetables are rich in antioxidant and anti-inflammatory compounds, including vitamin C, carotenoids and polyphenols. Greater intake of these compounds may help reduce reactive oxygen species and proinflammatory signalling, potentially attenuating the oxidative stress and neuroinflammation implicated in depression(Reference Huang, Liu and Suzuki67,Reference Gao and Zhou68) . Likewise, the protective association of limiting added sugars is consistent with prior evidence(Reference Lane, Travica and Gamage69,Reference Paans, Gibson-Smith and Bot70) , as long-term excessive sugar intake has been shown to increase oxidative stress and alter endorphin levels, thereby contributing to depression onset(Reference Christ, Lauterbach and Latz71,Reference Shahinfar, Shab-Bidar and Effatpanah72) . Overall, our findings highlighted the importance of dietary patterns that emphasise increased intake of non-starchy vegetables and reduced consumption of added sugars as potentially effective nutritional strategies for the prevention and management of depression.
The bridge network analysis revealed several significant cross-community associations, identifying specific links between PHDI components and depressive symptoms. Stronger negative edges were observed between the restriction of added sugars (PHDI14), whole fruit (PHDI3), and whole grains (PHDI1) with appetite problems (PHQ5), as well as between non-starchy vegetables (PHDI2) and depressed mood (PHQ2). These patterns align with the SHAP value analysis, which reaffirmed the protective effects of increased non-starchy vegetable intake and reduced added sugar consumption against depression within the framework of cross-community associations. Additionally, consistent with prior literature, whole fruits and whole grains have been recognised as critical dietary components for maintaining mental health, largely attributed to their antioxidant and anti-inflammatory properties(Reference Lan, Chen and Lin25,Reference Kunugi63) . By ranking the relative predictive contributions of all fourteen PHDI components, our analysis extends prior food-specific evidence and identifies non-starchy vegetables and added sugars as priority components for developing and evaluating dietary strategies for depression prevention and management.
Interestingly, the BEI analysis identified PHQ5 (appetite problems) as strongest bridge node between the PHDI and depressive symptom communities. This finding suggested that the influence of diet on overall depressive severity may, to a considerable extent, operate through the modulation of appetite, which can subsequently propagate and activate other depressive symptoms. Appetite problems is not only a core diagnostic criterion for depression but also a physiological sensation directly shaped by dietary composition. Previous studies have shown that nutritionally balanced diets help stabilise appetite, whereas nutrient-poor or highly processed diets can trigger extreme fluctuations(Reference Ni, Smyth and Cozzolino73–Reference da Costa, Severo and Oliveira75). Identifying appetite problems as a central bridge node provides a potential network-based explanation for how ‘what one eats’ may relate to ‘how one feels.’ In addition, PHQ2 (depressed mood) demonstrated the second-highest bridge expected influence, suggesting that PHDI components may also directly influence the core experiential component of depression. This finding extends prior evidence on overall diet–depression associations by identifying depressed mood as a specific symptom-level bridge between PHDI components and the broader depressive symptom network(Reference Lu, Wu and Shao26,Reference Bayes, Schloss and Sibbritt76) . As such, these findings suggest that interventions targeting appetite problems and depressed mood could be pivotal in breaking the vicious cycle between diet and depression.
While this study offers valuable insights into the association between the PHDI and depression, several limitations must be acknowledged. First, the cross-sectional design precludes conclusions regarding temporal ordering or causality. Longitudinal studies with repeated assessments are needed to determine whether changes in PHDI adherence precede changes in depressive symptoms and whether the identified network connections and bridge nodes remain stable over time. Randomised dietary interventions could further examine whether modifying key PHDI components, particularly non-starchy vegetables and added sugars, improves depressive outcomes. Second, both the PHDI and depression were assessed using self-report measures (24-h dietary recalls and the PHQ-9), which are susceptible to recall and subjective biases. Future studies should combine repeated dietary assessments with objective biomarkers of dietary intake and complement the PHQ-9 with clinician-administered diagnostic assessments. Third, the use of a USA-based adult sample limits the generalisability of the findings. Replication in diverse, multi-regional and multi-ethnic populations is therefore needed to determine whether the identified network structure, predictor rankings and bridge nodes are consistent across populations. Finally, the observed effect sizes were modest, warranting caution when interpreting their clinical significance. Although modest effects may still be meaningful given the complex aetiology of depression(Reference Lin, Yang and Pu77,Reference Prentice, Miller and Kazdin78) , future research should replicate these findings and evaluate their incremental predictive value and clinical utility.
Conclusions
Using network analysis and machine learning in a large USA sample, we found distinct differences in PHDI patterns between individuals with and without depression. Greater adherence to a diverse and balanced diet was linked to lower depression prevalence, with higher intake of non-starchy vegetables and lower intake of added sugars emerging as key protective factors. We also identified appetite problems and depressed mood as main bridge nodes between the PHDI and depressive symptom communities. These findings provide robust evidence for the role of the PHDI in supporting mental health and underscore the significance of dietary quality and structure.
Supplementary material
For supplementary material/s referred to in this article, please visit https://doi.org/10.1017/S0007114526108617
Data availability statement
The data described in the manuscript are publicly available without restriction at https://wwwn.cdc.gov/nchs/nhanes/continuousnhanes/. The analytic code is also available upon reasonable request from the corresponding authors.
Acknowledgements
We thank all NHANES participants and staff for their contributions.
The study described in this paper was supported by the National Social Science Foundation of China (No. 25BSH110). The funders had no role in study design, collection, analysis and interpretation of data, writing of the report or decision to submit the article for publication.
Jiaci Lin: Conceptualisation-Equal, Formal analysis-Equal, Investigation-Equal, Methodology-Equal, Writing – original draft-Lead, Writing – review & editing-Equal; Bo Hu: Formal analysis-Equal, Validation-Equal, Writing – review & editing-Supporting; Liuna Geng: Conceptualisation-Equal, Investigation-Equal, Methodology-Equal, Supervision-Lead, Writing – review & editing-Equal. All authors read and approved the final manuscript.
The authors declare that they have no competing financial or personal relationships that could have influenced the work reported in this paper.
Declaration of Generative AI and AI-assisted technologies in the writing process. During the preparation of this manuscript, the authors used ChatGPT to optimise the English language. After employing this tool, the authors carefully reviewed and edited the content as necessary and assume full responsibility for the final publication.