Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Nutr., 12 November 2025

Sec. Nutritional Epidemiology

Volume 12 - 2025 | https://doi.org/10.3389/fnut.2025.1680741

Comparative analysis of dietary patterns and depression risk: significant inverse association with HEI-2015 and mediating role of BMI

Zicheng WangZicheng Wang1Lei Fang&#x;Lei Fang2Fachao Shi&#x;Fachao Shi3Qin Cui
Qin Cui2*Xiaomei Zhou
Xiaomei Zhou1*
  • 1Department of Hyperbaric Oxygen, The Second People's Hospital of Hefei, Hefei Hospital Affiliated to Anhui Medical University, Hefei, Anhui, China
  • 2Department of Geriatrics Center, Tongling People's Hospital, Tongling, Anhui, China
  • 3Department of Cardiology, Maanshan People's Hospital, Maanshan Hospital Affiliated to Wannan Medical College, Maanshan, Anhui, China

Objective: Depression is a severe global mental disorder closely associated with dietary habits. This study aimed to evaluate associations between four dietary patterns [assessed by Dietary Inflammatory Index (DII), Healthy Eating Index-2015 (HEI-2015), Dietary Index for Gut Microbiota (DI-GM), and Composite Dietary Antioxidant Index (CDAI)] and depression risk. For any dietary pattern showing significant association, we further examined whether BMI mediated this relationship.

Methods: Data from the National Health and Nutrition Examination Survey (NHANES, 2007–2018) were analyzed. Four dietary indices were calculated using two 24-h dietary recalls: DII, HEI-2015, DI-GM, and CDAI. Depression severity was assessed via the Patient Health Questionnaire-9 (PHQ-9). Logistic regression and mediation analysis were employed to examine diet-depression associations and BMI’s mediating effect. For any dietary pattern showing significant association with depression, employ SHapley Additive exPlanations (SHAP) analysis to identify which specific dietary components contribute most to this association.

Results: HEI-2015 showed a significant negative correlation with depression (OR = 0.99, 95% CI: 0.98–1.00, p = 0.002). Compared to the lowest HEI-2015 quartile (Q1), the highest quartile (Q4) had significantly reduced depression risk (OR = 0.66, 95% CI: 0.50–0.87, p = 0.003). No significant associations were observed for DII, DI-GM, or CDAI. Mediation analysis revealed BMI partially mediated the HEI-2015–depression relationship (mediation proportion = 6.39%, p < 0.0001). SHAP analysis identified added sugars, whole fruits, and saturated fats as key HEI-2015 components: added sugars and whole fruits reduced depression risk, while saturated fats increased it.

Conclusion: This study confirms a significant inverse association between HEI-2015 and depression risk, with BMI acting as a partial mediator. Reducing intake of added sugars and saturated fats while increasing whole fruits consumption may mitigate depression risk.

1 Introduction

Depression stands as one of the most challenging mental health issues of the 21st century, affecting global populations at an alarming rate. According to the latest WHO data, over 350 million people worldwide suffer from depression, representing a nearly 20% increase over the past decade (1). Depression is not only a leading cause of global disability but also coexists with various chronic diseases, significantly reducing patients’ quality of life, increasing suicide risk, and creating substantial socioeconomic burdens estimated at over $1 trillion annually in economic losses. Facing this growing public health challenge, identifying feasible, economical, and easily implementable prevention strategies has become particularly urgent (2). Research suggests that dietary habits affect mental health through several biological pathways, such as neurotransmitter regulation, gut microbiota balance, and reduced systemic inflammation, all of which play important roles in the development of depression (3, 4).

Different dietary patterns impact depression through a variety of mechanisms. The DII, developed to measure the inflammatory potential of diets, is widely used in research exploring links between diet-induced inflammation and mental health (5). Chronic inflammation is recognized as a key contributor to depression; higher DII scores are associated with elevated inflammatory markers, which may promote depressive symptoms by increasing neuroinflammation or activating central immune pathways (6). On the other hand, the HEI-2015 evaluates overall diet quality, with higher scores reflecting greater adherence to nutritional guidelines (7). Diets with higher HEI-2015 scores rich in fruits, vegetables, and whole grains, and lower in added sugars and sodium have been shown to lower depression risk by reducing systemic inflammation, improving metabolic health, and supporting neural function (8, 9). Recent studies also emphasize the influence of gut microbiota on depression, mediated by dietary habits. The DI-GM assesses intake of prebiotic and probiotic foods, as well as components like fiber and polyphenols that modulate gut bacteria and alleviate depressive symptoms through the gut-brain axis (10, 11). Additionally, the CDAI, which estimates overall dietary antioxidant intake, may protect neural health by reducing oxidative stress—a known factor in the development of depression (12).

Within this nutritional framework, weight status emerges as a critical factor connecting dietary patterns to depression risk. The bidirectional relationship between obesity and depression has attracted increasing research attention as evidence accumulates that these conditions share underlying biological mechanisms and mutually reinforce each other. Research indicates that excess adiposity may increase depression vulnerability through pathways involving chronic low-grade inflammation and metabolic dysregulation (13, 14) processes that notably overlap with the inflammatory and metabolic effects of poor dietary patterns. Simultaneously, depressive symptoms such as diminished motivation, disrupted sleep, and emotional eating can promote unhealthy dietary behaviors and subsequent weight gain, potentially creating a self-perpetuating cycle (15). In this complex interplay, body mass index (BMI) appears to function as a significant mediator in the diet-depression relationship, helping to elucidate mechanistic pathways. For example, dietary patterns scoring high on HEI-2015 may ameliorate depressive symptoms partially by promoting healthy weight maintenance and metabolic homeostasis (8), whereas pro-inflammatory diets with elevated DII scores may exacerbate both systemic inflammation and psychological distress partly through their association with increased BMI (16).

Exploring the effects of various dietary patterns on depression risk has important clinical relevance. Early identification of individuals with poor dietary habits, alongside interventions to improve dietary quality (such as boosting HEI-2015 scores), could serve as an effective strategy for depression prevention (17). The mediation analysis in this study is based on multiple theoretical pathways connecting dietary patterns, BMI, and depression. Dietary patterns may influence BMI through energy balance regulation, metabolic programming, gut-brain axis modulation, and inflammatory pathways (1820). Simultaneously, BMI may affect depression risk through biological mechanisms (chronic inflammation, neuroendocrine alterations) and psychosocial factors (weight stigma, body dissatisfaction) (2123). Therefore, BMI may serve as a mediator in the diet-depression relationship, suggesting that diet quality might partially influence depression risk through its effects on weight status, while we also acknowledge that diet may impact depression through other direct pathways (such as nutrient-specific neural mechanisms) (24, 25).

This study analyzes the associations among dietary patterns, BMI, and depression using the NHANES database. Utilizing machine learning methods such as SHAP analysis, we systematically assessed the influence of specific dietary components on depression outcomes. However, few studies have simultaneously examined multiple dietary patterns in relation to depression, and even fewer have investigated potential mediating mechanisms. Furthermore, the comparative utility of different dietary indices for predicting depression risk remains unclear. This study aims to address these gaps by examining four established dietary patterns and exploring potential mediating pathways.

2 Methods

2.1 Study population

NHANES is a nationwide cross-sectional survey conducted by the Centers for Disease Control and Prevention, systematically collecting health information from U.S. residents using a multi-stage stratified sampling approach. This ongoing project has received approval from the National Center for Health Statistics Ethics Review Board, and all participants provided written informed consent before enrollment. Since this study utilizes de-identified, publicly available data and involves no new interventions, it was exempted from additional ethical review by the Ethics Committee of Anhui Provincial Hospital.

This research draws on data from six NHANES cycles (2007–2018), initially including 31,860 participants aged 18 years or older. Depression was assessed using the Patient Health Questionnaire-9 (PHQ-9), a well-validated self-administered screening tool widely used in both clinical and research settings to measure depression severity. The PHQ-9 consists of nine items corresponding to the nine DSM-IV diagnostic criteria for major depressive disorder. Each item asks respondents to rate the frequency of specific depressive symptoms over the past 2 weeks on a four-point Likert scale: 0 (not at all), 1 (several days), 2 (more than half the days), and 3 (nearly every day). Total scores range from 0 to 27, with higher scores indicating greater depression severity (2629). In accordance with established clinical guidelines and previous NHANES-based studies, we defined depression using the following classification: a PHQ-9 total score ≥10 was classified as clinically significant depression (moderate to severe), while scores <10 were classified as minimal to mild depressive symptoms. This cutoff of ≥10 has been extensively validated, demonstrating a sensitivity of 88% and specificity of 88% for major depressive disorder when compared to structured clinical interviews. Additionally, we conducted sensitivity analyses using alternative PHQ-9 cutoff points (≥5 for mild depression, ≥15 for moderately severe depression) to ensure the robustness of our findings. For the machine learning analysis, we retained the continuous PHQ-9 score to preserve the full spectrum of depressive symptomatology and maximize statistical power. The internal consistency reliability of the PHQ-9 in our study population was excellent (Cronbach’s α = 0.84), confirming the psychometric robustness of this measure in our sample. Rigorous data cleaning was performed, excluding 2,053 participants missing PHQ-9 data, 271 missing BMI, and those lacking complete information on marital status (n = 27), education (n = 13), family income-to-poverty ratio (PIR, n = 2,484), smoking (n = 9), alcohol use (n = 876), COPD (n = 1,006), hypertension (n = 1), diabetes (n = 273), and cardiovascular disease (n = 2). Participants with missing laboratory results were also excluded, encompassing renal function (eGFR, n = 1,144), blood glucose (n = 12,269), HbA1c (n = 23), liver enzymes (ALT/AST, n = 12), and metabolic indicators (uric acid/LDL, n = 306). Ultimately, 11,091 eligible participants were included, as illustrated in the flowchart (Figure 1).

Figure 1
Flowchart from NHANES database (2007-2018) starting with 31,860 participants. Exclusions due to lack of data on PHQ-9 and BMI reduce the number to 29,536. Further exclusions for missing demographic and laboratory data reduce it to 24,845 and finally to 11,091 participants.

Figure 1. Study flow chart.

2.2 Dietary indices

This study collected dietary data using NHANES’s standardized 24-h dietary recall method. The first recall interview was conducted in a Mobile Examination Center, followed by a second assessment by telephone 3 to 10 days later. Dietary intake was calculated as the average of both recalls; if only one was available, the first recall data was used. Nutritional composition for all foods and beverages was determined using USDA Food Patterns Equivalent Database categories, supplemented with the Food and Nutrition Database for Dietary Studies for energy and nutrient estimations (30, 31).

The 24-h dietary recall data were used to calculate four distinct dietary indices, each with unique conceptual frameworks, components, and scoring methodologies: dietary Inflammatory Index (DII) evaluates the inflammatory potential of diets based on 26 nutrients, with positive scores indicating pro-inflammatory effects and negative scores indicating anti-inflammatory effects (32, 33). The DII specifically targets the inflammatory pathway, which is one potential mechanism linking diet and depression. Healthy Eating Index-2015 (HEI-2015) assesses overall diet quality based on adherence to the 2015–2020 Dietary Guidelines for Americans. It consists of 13 components (9 adequacy components: Total Fruits, Whole Fruits, Total Vegetables, Greens and Beans, Whole Grains, Dairy, Total Protein Foods, Seafood and Plant Proteins, and Fatty Acids; and 4 moderation components: Refined Grains, Sodium, Added Sugars, and Saturated Fats). Each component is scored per 1,000 calories, with total scores ranging from 0 to 100. Higher scores indicate greater adherence to dietary guidelines (34, 35). Unlike other indices, HEI-2015 provides a comprehensive evaluation of diet quality that balances both nutrient adequacy and moderation components. Dietary Index for Gut Microbiota (DI-GM) was calculated based on the Kase standard, covering nine beneficial components (including avocados, whole grains, fruits, vegetables, nuts, beans, fish, yogurt, and coffee) and four detrimental components (red meat, processed meat, alcohol, and refined grains) that specifically influence gut microbiota composition. Green tea was excluded due to lack of data (36). This index focuses exclusively on the gut microbiota pathway between diet and health outcomes. Composite Dietary Antioxidant Index (CDAI) measures dietary antioxidant capacity by incorporating six micronutrients with known antioxidant properties: zinc, selenium, carotenoids, and vitamins A, C, and E, following Wright’s methodology (37). The CDAI specifically targets the oxidative stress pathway as a potential mechanism in depression pathophysiology.

2.3 Covariates

Covariates in this study included demographic factors (age, sex, race, education, marital status), medical history (hypertension, diabetes, cardiovascular disease, chronic obstructive pulmonary disease), lifestyle factors (smoking, alcohol use, leisure physical activity), and socioeconomic status (poverty-income ratio, PIR). Variable classifications were as follows: race (Non-Hispanic White, Non-Hispanic Black, Mexican American, Other); PIR (<1.3, 1.3–3.5, >3.5); marital status (Married, Divorced, Unmarried, Other); smoking (Never: <100 cigarettes in a lifetime; Former: ≥100 cigarettes, quit; Current: ≥100 cigarettes, still smoking); alcohol consumption (Never: <12 times ever; Former: ≥12 times/year, quit; Light: less than moderate/heavy; Moderate: women 2 drinks/day or binge drinking on ≥2 days/month, men—3 drinks/day; Heavy: women ≥3 drinks/day or binge ≥5 days/month, men ≥4 drinks/day); BMI (Normal: <25 kg/m2, Overweight: 25–30, Obese: ≥30). Laboratory measures included metabolic indicators (blood glucose, HbA1c, energy intake), kidney function (eGFR, creatinine, uric acid, BUN), liver function (ALT, AST, albumin), and lipid profile (TC, TG, HDL, LDL).

2.4 Statistical analysis

All statistical analyses were conducted using R version 4.3.2, following NHANES analytical guidelines (31) to account for the complex sampling design and appropriate weights (WTMEC2YR/6). Continuous variables were expressed as means (standard error), while categorical variables were reported as proportions (standard error). Group differences were evaluated using analysis of variance or chi-square tests, as appropriate.

Our analytical approach consisted of three sequential steps: First, we evaluated associations between each dietary pattern and depression using multivariable logistic regression. Second, for dietary patterns showing significant associations, we conducted mediation analysis to examine BMI’s potential mediating role. Third, for the most strongly associated dietary pattern, we performed additional component analysis using machine learning approaches. It is worth noting that our mediation analysis of BMI was conducted only after establishing a significant association between HEI-2015 and depression, following appropriate statistical practice for mediation analysis where the independent variable must first show association with the dependent variable.

Dietary patterns were divided into quartiles (Q1–Q4) and their association with depression risk was evaluated using weighted multivariable logistic regression models. Potential confounders were selected based on two complementary approaches: (1) established risk factors for depression identified in prior literature; (2) variables demonstrating associations with both dietary patterns and depression in our preliminary analyses. Based on these methods, we identify three statistical models. Model 1 was unadjusted; Model 2 adjusted for age, race, and gender; and Model 3 further adjusted for metabolic indicators (blood glucose, triglycerides, LDL), comorbidities (hypertension, diabetes, COPD, cardiovascular disease), and PIR. These confounders were consistently applied across all analytical models to ensure comparability of results. A restricted cubic spline (RCS) analysis was performed to assess dose–response relationships, and subgroup analyses were conducted by age (<60/≥60 years), gender, race (Mexican American, non-Hispanic White, non-Hispanic Black, Other), PIR (<1.3, 1.3–3.5, >3.5), and presence of hypertension, diabetes, COPD, or CVD.

To evaluate whether BMI mediates the relationship between dietary patterns and depression, we conducted formal mediation analysis using the counterfactual framework approach. For this analysis, HEI-2015 was treated as continuous exposure variables, BMI as a continuous mediator, and depression as a binary outcome (PHQ-9 ≥ 10). This approach was selected to preserve maximum statistical power while maintaining clinical interpretability of the depression outcome.

We implemented the mediation analysis using the ‘mediation’ package in R, which employs the following sequential models: Mediator model: BMI (continuous) ~ Dietary index (continuous) + Confounders; Outcome model: Depression (binary) ~ Dietary index (continuous) + BMI (continuous) + Confounders. Both models were adjusted for the same set of confounders used in our main analyses: age, race, gender, blood glucose, triglycerides, LDL, hypertension, diabetes, COPD, cardiovascular disease and PIR.

We calculated the following mediation parameters: Natural direct effect: Effect of dietary patterns on depression not mediated through BMI; Natural indirect effect: Effect of dietary patterns on depression mediated through BMI; Total effect: Sum of direct and indirect effects; Proportion mediated: Percentage of the total effect mediated through BMI. Statistical inference was based on 5,000 bootstrap resamples to derive 95% confidence intervals for all mediation parameters. Sensitivity analyses were performed to assess the robustness of our findings to potential unmeasured confounding using the E-value approach.

Five machine learning models were employed to assess the impact of dietary patterns on depression risk: MLP, DT, XGBoost, LR, and RF. For dietary patterns demonstrating significant associations with depression in our primary analysis, we conducted SHAP (SHapley Additive exPlanations) analysis to identify which specific dietary components contributed most substantially to the observed association. This machine learning approach was applied only to significantly associated dietary patterns for two reasons: First, SHAP analysis is most meaningfully applied when a meaningful association exists between the overall index and the outcome. Second, applying complex machine learning methods to non-significant associations would constitute unnecessary data mining without clear theoretical justification and would increase the risk of false positive findings due to multiple testing. The weighted average of all SHAP values reflects the overall importance of features, visualized using global feature importance and bee swarm plots.

3 Results

3.1 Characteristics

A total of 11,091 participants were included in this study (49.34% male), with a mean age of 47.74 ± 0.29 years. Among them, 957 individuals (8.63%) were identified with depression. As summarized in Table 1, compared to the non-depressed group, those with depression were more likely to be unmarried, divorced, or cohabiting (p < 0.05), and had a higher proportion of females. Depressed participants also had lower education levels, lower PIR, and less frequent engagement in recreational activities, while rates of current smoking and moderate to heavy drinking were higher (p < 0.01). Additionally, they exhibited significantly higher rates of comorbidities including hypertension, diabetes, COPD, and cardiovascular disease (p < 0.001).

Table 1
www.frontiersin.org

Table 1. Comparison of general data between depressed and non-depressed patients.

3.2 Association of different dietary patterns with risk of depression

As shown in Table 2. Among the four dietary indices evaluated, after adjusting for confounders, each 1-point increase in HEI-2015 was associated with a 1% reduction in depression risk (OR = 0.99, 95% CI: 0.98–1.00, p = 0.002). Participants in the highest HEI-2015 quartile (Q4) had a 34% lower risk of depression compared to those in the lowest quartile (Q1) (OR = 0.66, 95% CI: 0.50–0.87, p = 0.003). By contrast, no statistically significant associations were observed for DII, DI-GM, or CDAI after full adjustment for covariates (p > 0.05). Consequently, we focused subsequent mediation and component analyses on HEI-2015. Restricted cubic spline analysis with four knots placed at the 5th, 35th, 65th, and 95th percentiles revealed a nonlinear dose–response relationship between HEI-2015 scores and depression risk (P for non-linearity = 0.016) (Figure 2). The association was characterized by a steeper reduction in depression risk at lower HEI-2015 scores, with a plateau effect observed at higher scores, suggesting diminishing marginal benefits of further diet quality improvements beyond this threshold.

Table 2
www.frontiersin.org

Table 2. The analysis of the correlation between different dietary patterns and depression.

Figure 2
Line graph showing odds plotted against HEI 2015 scores. The red line indicates the trend, with a shaded area representing confidence intervals. Odds decrease sharply from approximately 25 to 50 HEI2015, then slightly rise, fluctuating around the odds ratio of 1 beyond 50.

Figure 2. Restricted cubic spline analysis showed a non-linear dose–response relationship between HEI-2015 and risk of depression.

3.3 Mediation analysis and subgroup analysis

In our mediation analysis examining whether BMI mediates the relationship between diet quality and depression, HEI-2015 was modeled as a continuous variable to maximize statistical power and capture the full spectrum of diet quality. The continuous HEI-2015 scores were used in both the mediator model (with BMI as outcome) and the outcome model (with depression as outcome). This approach allowed us to quantify the direct and indirect effects associated with each unit increase in HEI-2015 score. Mediation analysis indicated that BMI partially mediates the relationship between HEI-2015 and depression risk, with the indirect effect accounting for 6.39% of the total effect (β = −0.016, p < 0.0001; Figure 3). Subgroup analyses (Figure 4) showed that the protective association of HEI-2015 is consistent across all age, gender, race, PIR, and comorbidity groups, with no significant interactions observed (p > 0.05).

Figure 3
Diagram showing mediation analysis with HEI-2015, BMI, and Depression. Arrows indicate relationships: HEI-2015 to Depression, direct effect -0.015 (95% CI: -0.022 to -0.01, p<0.0001); HEI-2015 to BMI, indirect effect -0.001 (95% CI: -0.002 to -0.0004, p<0.0001); BMI to Depression. Total effect -0.016, p<0.0001; proportion of mediation 6.39%.

Figure 3. Mediation effect analysis of BMI between HEI-2015 and risk of depression.

Figure 4
Forest plot showing odds ratios (OR) and 95% confidence intervals (CI) for various variables, including age, sex, race, PIR, and medical conditions like hypertension, diabetes, COPD, and CVD. The ORs are centered around 0.99 with CI ranges noted. P values for trend and interaction are provided, with significant values highlighted, such as Non-Hispanic White race (P for interaction = 0.002) and diabetes (P for trend < 0.001). The plot indicates associations between these variables and risk levels.

Figure 4. Subgroup analysis of the association between dietary patterns and depression by demographic characteristics.

3.4 Machine learning model selection and SHAP analysis

The HEI-2015 components dataset was randomly split into training and test sets at a 7:3 ratio, with the training set used for model development and parameter tuning, and the test set reserved for performance evaluation. As shown in Figure 5, the RF model achieved the highest performance in the training set (AUC = 0.86, accuracy = 0.80, sensitivity = 0.76, specificity = 0.80, F1 = 0.39), followed by the MLP (AUC = 0.62, accuracy = 0.55, sensitivity = 0.65, specificity = 0.54, F1 = 0.20). On the testing set, MLP’s performance remained stable (AUC = 0.60, accuracy = 0.54, sensitivity = 0.63, specificity = 0.54, F1 = 0.20), while RF showed signs of overfitting (AUC = 0.52, accuracy = 0.67, sensitivity = 0.35, specificity = 0.70, F1 = 0.16), making it unsuitable for final model selection. Overall, the MLP model demonstrated robust performance, as illustrated by the ROC curves in Figure 6.

Figure 5
Two heatmaps labeled A and B compare the performance metrics of machine learning models (RF, MLP, Logistic, Xgboost, DT) across various criteria like accuracy and precision. Each cell shows a performance value with a color gradient from red (low) to green (high) to represent performance levels.

Figure 5. Comparison between machine learning training set and validation set; (A) training set, (B) validation set.

Figure 6
Two ROC curves comparing model performance. Panel (A) shows ROC on train data; panel (B) shows ROC on test data. Lines represent different models: Decision Tree, Logistic Regression, MLP, Xgboost, and Random Forest, with associated AUC values noted for each.

Figure 6. Comparison of receiver operating characteristic curves between machine learning training set and validation set;(A)training set,(B) validation set.

Given that HEI-2015 was the only dietary index showing significant association with depression after full adjustment, we focused our SHAP analysis exclusively on its components. This targeted approach allowed us to identify the most influential dietary elements within the context of a meaningful overall association, avoiding unnecessary multiple testing and data mining of non-significant relationships (Figures 7A,B). SHAP values above zero indicated an increased risk, with higher values reflecting greater impact. The analysis identified added sugars, whole fruits, and saturated fats as key factors. Specifically, higher intake of added sugars and whole fruits was linked to a reduced risk of depression, while saturated fat intake was associated with elevated risk. These findings support recommendations to reduce saturated fat and added sugar intake, while promoting consumption of whole fruits to lower depression risk.

Figure 7
Bar chart (A) and violin plot (B) illustrate feature importance and SHAP values, respectively. Added sugars have the highest impact. Violin plot shows value distributions colored by feature value, ranging from low (red) to high (blue).

Figure 7. Feature-ranking plots (A) and summary plots (B) of MLP for predicting depression risk.

4 Discussion

This study examined the relationship between dietary patterns and depression, with particular attention to the mediating role of BMI in the association between HEI-2015 and depression. Four dietary indices were evaluated: DII, HEI-2015, DI-GM, and CDAI. Higher HEI-2015 scores were significantly linked to a lower risk of depression (OR = 0.66, 95% CI: 0.50–0.87), with BMI mediating 6.39% of this effect, suggesting that healthier diets may reduce depression risk by improving obesity-related inflammation and metabolic dysfunction (38, 39). No significant associations were found between depression and DII, DI-GM, or CDAI (40), which may be due to sample characteristics, limitations of dietary assessment methods, or the complex etiology of depression. SHAP analysis highlighted key HEI-2015 components, underscoring the benefits of reducing added sugars and saturated fats while increasing whole fruit intake to lower depression risk (13, 41).

Although there is a theoretical basis supporting the association between DII and depression risk, our analysis did not find a significant relationship. Further examination of the distribution of DII components in our population revealed limited variability in the intake of certain key anti-inflammatory components (such as ω-3 fatty acids and flavonoids). Our subgroup analysis showed that while the total DII score was not significantly associated with depression, specific components such as refined grains and red meat intake were associated with increased depression risk (ORs = 1.24 and 1.31, respectively), while vegetable and fruit intake showed protective effects (ORs = 0.82 and 0.78, respectively). Regarding the null findings for DI-GM and CDAI, these may reflect limitations of these indices when applied without direct gut microbiome data and oxidative stress biomarkers, rather than indicating true biological null associations. Future studies should combine dietary assessment with microbiome sequencing and inflammatory/oxidative stress biomarkers to more comprehensively evaluate these mechanisms.

It is important to note that while our study employed multiple dietary indices to capture different aspects of dietary patterns (inflammatory potential, overall quality, gut microbiota influence, and antioxidant capacity), only HEI-2015 demonstrated significant association with depression risk after comprehensive adjustment. This finding suggests that overall diet quality, as captured by HEI-2015, may be more relevant to depression risk than these other specific dietary dimensions in our study population.

The superior performance of HEI-2015 in predicting depression risk likely stems from several factors. First, HEI-2015 provides the most comprehensive assessment of overall diet quality, incorporating both adequacy and moderation components. Second, HEI-2015 includes specific components such as added sugars and saturated fats (confirmed by our SHAP analysis as key factors), which were introduced in the 2015 version to replace the previous “empty calories” category, potentially capturing aspects of diet particularly relevant to mental health. Third, HEI-2015 evaluates consumption patterns of food groups rather than focusing on single nutrients or specific dietary mechanisms, providing a broader representation of dietary patterns that may affect mental health through multiple pathways simultaneously.

This study and the research by Wang et al. (8), both based on NHANES data, found a negative correlation between HEI-2015 scores and depression risk, though the effect sizes differed, primarily due to methodological variations. First, the two studies included different NHANES cycles, and population characteristics and dietary patterns may have changed over time. Second, this study employed more comprehensive adjustments for confounding factors, including metabolic parameters (blood lipids, glucose) and comorbidities (hypertension, diabetes, etc.), which may have partially attenuated the observed effect size. Third, this study utilized restricted cubic splines, mediation analysis, and machine learning methods to more deeply explore the nonlinear characteristics and mediating mechanisms of the relationship. Finally, differences in sample size may also have affected estimation precision. Despite variations in effect sizes, both studies consistently support a negative association between diet quality and depression risk, demonstrating the robustness of this relationship across different methodologies.

The bidirectional relationship between obesity (measured by BMI) and depression is well established. Obesity can elevate depression risk by promoting chronic low-grade inflammation, metabolic imbalance, and hormonal disruptions (42), leading to neuroimmune activation, neurotransmitter imbalances, and reduced cerebral nutrient supply (24). Conversely, depression can contribute to weight gain through lifestyle changes (such as overeating and inactivity) and neuroendocrine dysfunction, including heightened HPA axis activity (43). Our findings support BMI as a partial mediator in the diet–depression link, indicating that weight management is an important target for dietary strategies to prevent depression. Furthermore, reducing BMI may help relieve depressive symptoms by decreasing pro-inflammatory cytokines from adipose tissue, enhancing insulin sensitivity, and regulating bile acid metabolism, thereby conferring neuroprotective and metabolic benefits (44).

Dietary patterns are increasingly recognized as modifiable factors in depression prevention. In this study, four dietary indices HEI-2015, DII, DI-GM, and CDAI were assessed. Consistent with previous research (45, 46), higher HEI-2015 scores were linked to lower depression risk. Diets rich in vegetables, fruits, legumes, and whole grains may reduce depression risk by supporting endocrine function and neurotransmission through antioxidants (such as vitamin C and flavonoids) and anti-inflammatory fatty acids (e.g., ω-3 PUFAs). While the DII reflects the inflammatory potential of the diet and prior studies have related high-DII diets (high in saturated fats and sugars, low in fiber) to increased depression risk via neuroinflammation, no significant relationship between DII and depression was found here (47). Likewise, although DI-GM and CDAI are thought to influence depression through the gut-brain axis and by mitigating oxidative stress, no independent associations were observed, possibly due to the limitations of single dietary indices or confounding factors related to the multifaceted nature of depression (48).

The observed mediating effect of BMI on the relationship between HEI-2015 and depression suggests that weight management could be a valuable target for dietary interventions. Healthier diets may reduce depression risk both directly by improving metabolism and inflammation—and indirectly by lowering BMI and reducing obesity-related psychological and physiological impacts. Mediation analysis confirmed BMI’s partial mediating role, hinting that specific dietary elements (e.g., low-calorie, high-fiber foods) may impact mental health partly via weight and body fat reduction (49). Additionally, this study enhances mechanistic insights into how diet, BMI, and depression interact, and offers new perspectives for unraveling these complex relationships.

BMI may influence the relationship between HEI-2015 and depression through several pathways. First, healthier diets reduce body fat and chronic low-grade inflammation, a key contributor to depression especially in obese individuals (50). Lower systemic inflammation in turn lessens central nervous system inflammatory responses. Second, weight loss improves insulin sensitivity and increases brain-derived neurotrophic factor, supporting neurotransmitter function and reducing depression risk (51). Weight management can also enhance psychological well-being by boosting self-efficacy and social acceptance, further relieving depressive symptoms (52).

Our RCS analysis revealed a nonlinear relationship between HEI-2015 and depression, with the strongest protective effects observed at lower diet quality levels and a plateau effect at higher scores. This pattern suggests that initial improvements from poor to moderate diet quality may yield the greatest mental health benefits, while additional improvements from moderate to excellent diet quality provide more modest additional protection.

This nonlinearity has important implications for public health interventions. First, it suggests that resource-limited interventions might prioritize moving individuals from low to moderate diet quality, where the steepest reduction in depression risk occurs. Second, the plateau effect beyond approximately 65 points indicates that perfect adherence to dietary guidelines may not be necessary for substantial mental health benefits. Regarding analytical strategies, while the nonlinear relationship justifies consideration of alternative modeling approaches, we maintained linear models for several reasons: (1) the overall trend remained consistently protective across the HEI-2015 spectrum; (2) linear models provide more straightforward interpretation of effect estimates for clinical and public health applications; (3) quartile-based analyses confirmed the dose–response pattern; and (4) sensitivity analyses using fractional polynomial and spline-based models yielded qualitatively similar conclusions about the protective association. However, we acknowledge that future studies with larger sample sizes might benefit from more flexible modeling approaches to capture potential threshold effects more precisely. The observed nonlinearity may reflect biological mechanisms such as nutrient saturation effects or threshold phenomena in neurobiological pathways. Alternatively, it might indicate measurement limitations in capturing additional benefits of very high diet quality using current assessment methods.

SHAP analysis quantitatively identified the dietary components most relevant to depression. Reducing added sugar intake was crucial for lowering depression risk, consistent with prior studies connecting high-sugar diets to inflammation and mood disorders (53). Additionally, higher whole fruit consumption and lower saturated fat intake significantly strengthened the protective effect of HEI-2015. The antioxidants and fiber in fruits may help alleviate depressive symptoms by improving gut microbiota, reducing inflammation, and supporting neurotransmitter balance (54). These findings, quantified by SHAP, offer practical guidance for developing personalized dietary strategies for depression prevention (55). It is important to note that our SHAP analysis was deliberately limited to HEI-2015 components because this was the only dietary index showing significant association with depression. While we acknowledge that exploratory analysis of other indices’ components might have been theoretically possible, we elected to focus our machine learning approach on the significantly associated pattern to maintain methodological rigor and avoid potentially spurious findings from data mining non-significant associations.

This study has some limitations. Firstly, its cross-sectional design restricts the ability to infer causality between dietary patterns, BMI, and depression; longitudinal or interventional studies are needed for confirmation. Secondly, dietary assessment was based on two 24-h recalls, which may not accurately capture long-term habits and could compromise the reliability of DII, HEI-2015, DI-GM, and CDAI scores. Recall bias and subjective reporting may also affect data quality. Future research should use longer-term tools such as food frequency questionnaires or repeated recalls. Thirdly, although we adjusted for key confounders, some psychosocial and environmental factors were not fully considered. Fourth, depression was assessed via the PHQ-9, which measures symptoms rather than clinical diagnosis; future studies should include diagnostic criteria (e.g., DSM-5) or additional psychometric tools (e.g., HAM-D, BDI) for improved validity. Finally, the lack of biological data (e.g., metabolic markers, cytokines) limits insight into the mechanisms connecting BMI, diet, and depression risk.

5 Conclusion

Our mediation analysis indicates that BMI represents one potential pathway through which dietary patterns influence depression risk, highlighting the interconnected nature of nutritional epidemiology and weight management in mental health outcomes. Future interventions should consider evaluating both dietary modification and weight management components to better understand their distinct and shared mechanisms. SHAP analysis pinpointed important dietary components, providing actionable insights for depression prevention. Overall, these findings emphasize the value of combining dietary improvements with weight management to inform more effective and targeted nutritional psychiatry interventions.

Data availability statement

The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.

Ethics statement

The studies involving humans were approved by the Ethics Committee of Tongling People’s Hospital. The studies were conducted in accordance with the local legislation and institutional requirements. Written informed consent for participation was not required from the participants or the participants’ legal guardians/next of kin in accordance with the national legislation and institutional requirements.

Author contributions

ZW: Formal analysis, Methodology, Writing – original draft, Writing – review & editing. LF: Conceptualization, Formal analysis, Writing – original draft, Writing – review & editing. FS: Data curation, Writing – review & editing. QC: Conceptualization, Writing – review & editing. XZ: Conceptualization, Writing – review & editing.

Funding

The author(s) declare that no financial support was received for the research and/or publication of this article.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The authors declare that no Gen AI was used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

1. GBD 2019 Mental Disorders Collaborators. Global, regional, and national burden of 12 mental disorders in 204 countries and territories, 1990-2019: a systematic analysis for the global burden of disease study 2019. Lancet Psychiatry. (2022) 9:137–50. doi: 10.1016/S2215-0366(21)00395-3

Crossref Full Text | Google Scholar

2. Li, Y, Lv, MR, Wei, YJ, Sun, L, Zhang, JX, Zhang, HG, et al. Dietary patterns and depression risk: a meta-analysis. Psychiatry Res. (2017) 253:373–82. doi: 10.1016/j.psychres.2017.04.020

PubMed Abstract | Crossref Full Text | Google Scholar

3. Lassale, C, Batty, GD, Baghdadli, A, Jacka, F, Sánchez-Villegas, A, Kivimäki, M, et al. Healthy dietary indices and risk of depressive outcomes: a systematic review and meta-analysis of observational studies. Mol Psychiatry. (2019) 24:965–86. doi: 10.1038/s41380-018-0237-8

PubMed Abstract | Crossref Full Text | Google Scholar

4. Hariharan, R, Odjidja, EN, Scott, D, Shivappa, N, Hébert, JR, Hodge, A, et al. The dietary inflammatory index, obesity, type 2 diabetes, and cardiovascular risk factors and diseases. Obes Rev. (2022) 23:e13349. doi: 10.1111/obr.13349

PubMed Abstract | Crossref Full Text | Google Scholar

5. Nasab, MG, Heidari, A, Sedighi, M, Shakerian, N, Mirbeyk, M, Saghazadeh, A, et al. Dietary inflammatory index and neuropsychiatric disorders. Rev Neurosci. (2024) 35:21–33. doi: 10.1515/revneuro-2023-0047

PubMed Abstract | Crossref Full Text | Google Scholar

6. Marx, W, Veronese, N, Kelly, JT, Smith, L, Hockey, M, Collins, S, et al. The dietary inflammatory index and human health: an umbrella review of Meta-analyses of observational studies. Adv Nutr. (2021) 12:1681–90. doi: 10.1093/advances/nmab037

PubMed Abstract | Crossref Full Text | Google Scholar

7. Hao, X, and Li, D. The healthy eating Index-2015 and all-cause/cause-specific mortality: a systematic review and dose–response Meta-analysis. Adv Nutr. (2024) 15:100166. doi: 10.1016/j.advnut.2023.100166

PubMed Abstract | Crossref Full Text | Google Scholar

8. Wang, K, Zhao, Y, Nie, J, Xu, H, Yu, C, and Wang, S. Higher HEI-2015 score is associated with reduced risk of depression: result from NHANES 2005-2016. Nutrients. (2021) 13:348. doi: 10.3390/nu13020348

PubMed Abstract | Crossref Full Text | Google Scholar

9. Liang, J, Huang, S, Jiang, N, Kakaer, A, Chen, Y, Liu, M, et al. Association between joint physical activity and dietary quality and lower risk of depression symptoms in US adults: cross-sectional NHANES study. JMIR Public Health Surveill. (2023) 9:e45776. doi: 10.2196/45776

PubMed Abstract | Crossref Full Text | Google Scholar

10. Zhang, X, Yang, Q, Huang, J, Lin, H, Luo, N, and Tang, H. Association of the newly proposed dietary index for gut microbiota and depression: the mediation effect of phenotypic age and body mass index. Eur Arch Psychiatry Clin Neurosci. (2024) 275:1037–48. doi: 10.1007/s00406-024-01912-x

PubMed Abstract | Crossref Full Text | Google Scholar

11. Paiva, IHR, Maciel, LM, Silva, RSD, Mendonça, IP, Souza, JRB, and Peixoto, CA. Prebiotics modulate the microbiota-gut-brain axis and ameliorate anxiety and depression-like behavior in HFD-fed mice. Food Res Int. (2024) 182:114153. doi: 10.1016/j.foodres.2024.114153

PubMed Abstract | Crossref Full Text | Google Scholar

12. Sipahi, H, Mat, AF, Ozhan, Y, and Aydin, A. The interrelation between oxidative stress, depression and inflammation through the kynurenine pathway. Curr Top Med Chem. (2023) 23:415–25. doi: 10.2174/1568026623666221223111309

PubMed Abstract | Crossref Full Text | Google Scholar

13. Milaneschi, Y, Simmons, WK, van Rossum, EFC, and Penninx, BW. Depression and obesity: evidence of shared biological mechanisms. Mol Psychiatry. (2019) 24:18–33. doi: 10.1038/s41380-018-0017-5

PubMed Abstract | Crossref Full Text | Google Scholar

14. Kiecolt-Glaser, JK, Derry, HM, and Fagundes, CP. Inflammation: depression fans the flames and feasts on the heat. Am J Psychiatry. (2015) 172:1075–91. doi: 10.1176/appi.ajp.2015.15020152

PubMed Abstract | Crossref Full Text | Google Scholar

15. Stunkard, AJ, Faith, MS, and Allison, KC. Depression and obesity. Biol Psychiatry. (2003) 54:330–7. doi: 10.1016/S0006-3223(03)00608-5

PubMed Abstract | Crossref Full Text | Google Scholar

16. Ma, Y, Li, R, Zhan, W, Huang, X, Zhang, Z, Lv, S, et al. Role of BMI in the relationship between dietary inflammatory index and depression: an intermediary analysis. Front Med. (2021) 8:748788. doi: 10.3389/fmed.2021.748788

PubMed Abstract | Crossref Full Text | Google Scholar

17. Vaghef-Mehrabani, E, Bell, RC, Field, CJ, Jarman, M, Evanchuk, JL, Letourneau, N, et al. Maternal pre-pregnancy diet and prenatal depression: the mediating role of pre-pregnancy weight status and prenatal inflammation. Br J Nutr. (2024) 132:115–29. doi: 10.1017/S0007114524001028

PubMed Abstract | Crossref Full Text | Google Scholar

18. Hall, KD, Heymsfield, SB, Kemnitz, JW, Klein, S, Schoeller, DA, and Speakman, JR. Energy balance and its components: implications for body weight regulation. Am J Clin Nutr. (2012) 95:989–94. doi: 10.3945/ajcn.112.036350

PubMed Abstract | Crossref Full Text | Google Scholar

19. Cryan, JF, and Dinan, TG. Mind-altering microorganisms: the impact of the gut microbiota on brain and behaviour. Nat Rev. Neurosci. (2012) 13:701–12. doi: 10.1038/nrn3346

PubMed Abstract | Crossref Full Text | Google Scholar

20. Gregor, MF, and Hotamisligil, GS. Inflammatory mechanisms in obesity. Annu Rev. Immunol. (2011) 29:415–45. doi: 10.1146/annurev-immunol-031210-101322

PubMed Abstract | Crossref Full Text | Google Scholar

21. Miller, AH, and Raison, CL. The role of inflammation in depression: from evolutionary imperative to modern treatment target. Nat Rev. Immunol. (2016) 16:22–34. doi: 10.1038/nri.2015.5

PubMed Abstract | Crossref Full Text | Google Scholar

22. Pearl, RL, and Puhl, RM. Weight bias internalization and health: a systematic review. Obes Rev. (2018) 19:1141–63. doi: 10.1111/obr.12701

PubMed Abstract | Crossref Full Text | Google Scholar

23. Luppino, FS, de Wit, LM, Bouvy, PF, Stijnen, T, Cuijpers, P, Penninx, BWJH, et al. Overweight, obesity, and depression: a systematic review and meta-analysis of longitudinal studies. Arch Gen Psychiatry. (2010) 67:220–9. doi: 10.1001/archgenpsychiatry.2010.2

PubMed Abstract | Crossref Full Text | Google Scholar

24. Sánchez-Villegas, A, and Martínez-González, MA. Diet, a new target to prevent depression? BMC Med. (2013) 11:3. doi: 10.1186/1741-7015-11-3

PubMed Abstract | Crossref Full Text | Google Scholar

25. Marx, W, Lane, M, Hockey, M, Aslam, H, Berk, M, Walder, K, et al. Diet and depression: exploring the biological mechanisms of action. Mol Psychiatry. (2021) 26:134–50. doi: 10.1038/s41380-020-00925-x

PubMed Abstract | Crossref Full Text | Google Scholar

26. Battle, DE. Diagnostic and statistical manual of mental disorders (DSM). Codas. (2013) 25:191–2. doi: 10.1590/s2317-17822013000200017

PubMed Abstract | Crossref Full Text | Google Scholar

27. Kroenke, K, Spitzer, RL, and Williams, JB. The PHQ-9: validity of a brief depression severity measure. J Gen Intern Med. (2001) 16:606–13. doi: 10.1046/j.1525-1497.2001.016009606.x

PubMed Abstract | Crossref Full Text | Google Scholar

28. Levis, B, Benedetti, A, and Thombs, BD. Accuracy of patient health questionnaire-9 (PHQ-9) for screening to detect major depression: individual participant data meta-analysis. BMJ (Clinical research ed). (2019) 365:l1476. doi: 10.1136/bmj.l1476

PubMed Abstract | Crossref Full Text | Google Scholar

29. Hua, J, Shen, R, Guo, X, Yu, L, Qiu, M, Ma, L, et al. The mediating role of depression in the association between socioeconomic status and cardiovascular disease: a nationwide cross-sectional study from NHANES 2005-2018. J Affect Disord. (2024) 366:466–73. doi: 10.1016/j.jad.2024.08.145

PubMed Abstract | Crossref Full Text | Google Scholar

30. Fan, Y, Zhang, Y, Li, J, Liu, Y, Zhou, L, and Yu, Y. Association between healthy eating Index-2015 and physical frailty among the United States elderly adults: the National Health and nutrition examination survey (NHANES) 2011-2014. Aging Clin Exp Res. (2021) 33:3245–55. doi: 10.1007/s40520-021-01874-3

PubMed Abstract | Crossref Full Text | Google Scholar

31. Li, J, Wu, Z, Xin, S, Xu, Y, Wang, F, Liu, Y, et al. Body mass index mediates the association between four dietary indices and phenotypic age acceleration in adults: a cross-sectional study. Food Funct. (2024) 15:7828–36. doi: 10.1039/D4FO01088D

PubMed Abstract | Crossref Full Text | Google Scholar

32. Yuan, Y, Ye, W, and Fang, X. Dietary inflammatory index and all-cause mortality among asthma patients: a population-based cohort study. Ann Palliat Med. (2022) 11:2061–70. doi: 10.21037/apm-22-615

PubMed Abstract | Crossref Full Text | Google Scholar

33. Shivappa, N, Steck, SE, Hurley, TG, Hussey, JR, and Hébert, JR. Designing and developing a literature-derived, population-based dietary inflammatory index. Public Health Nutr. (2014) 17:1689–96. doi: 10.1017/S1368980013002115

PubMed Abstract | Crossref Full Text | Google Scholar

34. Krebs-Smith, SM, Pannucci, TE, Subar, AF, Kirkpatrick, SI, Lerman, JL, Tooze, JA, et al. Update of the healthy eating index: HEI-2015. J Acad Nutr Diet. (2018) 118:1591–602. doi: 10.1016/j.jand.2018.05.021

PubMed Abstract | Crossref Full Text | Google Scholar

35. Shams-White, MM, Pannucci, TE, Lerman, JL, Herrick, KA, Zimmer, M, Meyers Mathieu, K, et al. Healthy eating index-2020: review and update process to reflect the dietary guidelines for Americans, 2020-2025. J Acad Nutr Diet. (2023) 123:1280–8. doi: 10.1016/j.jand.2023.05.015

PubMed Abstract | Crossref Full Text | Google Scholar

36. Kase, BE, Liese, AD, Zhang, J, Murphy, EA, Zhao, L, and Steck, SE. The development and evaluation of a literature-based dietary index for gut microbiota. Nutrients. (2024) 16:1045. doi: 10.3390/nu16071045

PubMed Abstract | Crossref Full Text | Google Scholar

37. Wright, ME, Mayne, ST, Stolzenberg-Solomon, RZ, Li, Z, Pietinen, P, Taylor, PR, et al. Development of a comprehensive dietary antioxidant index and application to lung cancer risk in a cohort of male smokers. Am J Epidemiol. (2004) 160:68–76. doi: 10.1093/aje/kwh173

PubMed Abstract | Crossref Full Text | Google Scholar

38. Zang, E, and Bardo, AR. Objective and subjective socioeconomic status, their discrepancy, and health: evidence from East Asia. Soc Indic Res. (2019) 143:765–94. doi: 10.1007/s11205-018-1991-3

PubMed Abstract | Crossref Full Text | Google Scholar

39. Jacka, FN, O'Neil, A, Opie, R, Itsiopoulos, C, Cotton, S, Mohebbi, M, et al. A randomised controlled trial of dietary improvement for adults with major depression (the ‘SMILES’ trial). BMC Med. (2017) 15:23. doi: 10.1186/s12916-017-0791-y

Crossref Full Text | Google Scholar

40. Phillips, CM, Chen, LW, Heude, B, Bernard, JY, Harvey, NC, Duijts, L, et al. Dietary inflammatory index and non-communicable disease risk: a narrative review. Nutrients. (2019) 11:1873. doi: 10.3390/nu11081873

PubMed Abstract | Crossref Full Text | Google Scholar

41. Ataei Kachouei, A, Kamrani, F, Haghighatdoost, F, Mohammadifard, N, Najafi, F, Farshidi, H, et al. Relationship of the prime diet quality score (PDQS) and healthy eating index (HEI-2015) with depression and anxiety: a cross-sectional study. BMC Public Health. (2024) 24:2919. doi: 10.1186/s12889-024-20369-0

PubMed Abstract | Crossref Full Text | Google Scholar

42. Fulton, S, Décarie-Spain, L, Fioramonti, X, Guiard, B, and Nakajima, S. The menace of obesity to depression and anxiety prevalence. Trends Endocrinol Metab. (2022) 33:18–35. doi: 10.1016/j.tem.2021.10.005

PubMed Abstract | Crossref Full Text | Google Scholar

43. Binnewies, J, Nawijn, L, van Tol, MJ, van der Wee, NJA, Veltman, DJ, and Penninx, B. Associations between depression, lifestyle and brain structure: a longitudinal MRI study. NeuroImage. (2021) 231:117834. doi: 10.1016/j.neuroimage.2021.117834

Crossref Full Text | Google Scholar

44. Malmir, H, Mirzababaei, A, Moradi, S, Rezaei, S, Mirzaei, K, and Dadfarma, A. Metabolically healthy status and BMI in relation to depression: a systematic review of observational studies. Diabetes Metab Syndr. (2019) 13:1099–103. doi: 10.1016/j.dsx.2019.01.027

PubMed Abstract | Crossref Full Text | Google Scholar

45. Anderson, E, McCurley, JL, Sonnenblick, R, McGovern, S, Fung, V, Levy, DE, et al. Food insecurity and diet quality among adults on Medicaid with and without a mental illness diagnosis. J Acad Nutr Diet. (2023) 123:1470–1478.e2. doi: 10.1016/j.jand.2023.05.017

Crossref Full Text | Google Scholar

46. Wang, Y, Sun, M, Liu, Y, Yao, N, Wang, F, Guo, R, et al. Interaction between nutrition-related parameters and sexual orientation on depression. Public Health. (2024) 237:7–13. doi: 10.1016/j.puhe.2024.08.023

PubMed Abstract | Crossref Full Text | Google Scholar

47. Shakya, PR, Melaku, YA, Shivappa, N, Hébert, JR, Adams, RJ, Page, AJ, et al. Dietary inflammatory index (DII®) and the risk of depression symptoms in adults. Clin Nutr. (2021) 40:3631–42. doi: 10.1016/j.clnu.2020.12.031

PubMed Abstract | Crossref Full Text | Google Scholar

48. Shivappa, N, Hébert, JR, Veronese, N, Caruso, MG, Notarnicola, M, Maggi, S, et al. The relationship between the dietary inflammatory index (DII(®)) and incident depressive symptoms: a longitudinal cohort study. J Affect Disord. (2018) 235:39–44. doi: 10.1016/j.jad.2018.04.014

PubMed Abstract | Crossref Full Text | Google Scholar

49. Hryhorczuk, C, Sharma, S, and Fulton, SE. Metabolic disturbances connecting obesity and depression. Front Neurosci. (2013) 7:177. doi: 10.3389/fnins.2013.00177

PubMed Abstract | Crossref Full Text | Google Scholar

50. Beurel, E, Toups, M, and Nemeroff, CB. The bidirectional relationship of depression and inflammation: double trouble. Neuron. (2020) 107:234–56. doi: 10.1016/j.neuron.2020.06.002

PubMed Abstract | Crossref Full Text | Google Scholar

51. Wu, A, and Zhang, J. Neuroinflammation, memory, and depression: new approaches to hippocampal neurogenesis. J Neuroinflammation. (2023) 20:283. doi: 10.1186/s12974-023-02964-x

PubMed Abstract | Crossref Full Text | Google Scholar

52. Murck, H, Lehr, L, and Jezova, D. A viewpoint on aldosterone and BMI related brain morphology in relation to treatment outcome in patients with major depression. J Neuroendocrinol. (2023) 35:e13219. doi: 10.1111/jne.13219

PubMed Abstract | Crossref Full Text | Google Scholar

53. Hu, D, Cheng, L, and Jiang, W. Sugar-sweetened beverages consumption and the risk of depression: a meta-analysis of observational studies. J Affect Disord. (2019) 245:348–55. doi: 10.1016/j.jad.2018.11.015

PubMed Abstract | Crossref Full Text | Google Scholar

54. O'Neil, A, Quirk, SE, Housden, S, Brennan, SL, Williams, LJ, Pasco, JA, et al. Relationship between diet and mental health in children and adolescents: a systematic review. Am J Public Health. (2014) 104:e31–42. doi: 10.2105/AJPH.2014.302110

Crossref Full Text | Google Scholar

55. Willett, W, Rockström, J, Loken, B, Springmann, M, Lang, T, Vermeulen, S, et al. Food in the Anthropocene: the EAT-lancet commission on healthy diets from sustainable food systems. Lancet (London, England). (2019) 393:447–92. doi: 10.1016/S0140-6736(18)31788-4

PubMed Abstract | Crossref Full Text | Google Scholar

Glossary

NHANES - National Health and Nutrition Examination Survey

PHQ-9 - Patient Health Questionnaire-9

DII - Dietary Inflammatory Index

HEI-2015 - Healthy Eating Index-2015

DIGM - Dietary Index for Gut Microbiota

CDAI - Composite Dietary Antioxidant Index

SHAP - SHapley Additive exPlanations

PIR - Poverty income ratio

BMI - Body mass index

HbA1c - Glycosylated hemoglobin

UA - Uric acid

BUN - Blood urea nitrogen

TG - Triglyceride

TC - Total cholesterol

HDL - High density lipoprotein

LDL - Low density lipoprotein

eGFR - Estimated glomerular filtration rate

ALT - Alanine aminotransferase

AST - Aspartate aminotransferase

CVD - Cardiovascular disorders

COPD - Chronic obstructive pulmonary disease

MLP - Multi-layer perceptron

DT - Decision tree

XgBoost - Extreme gradient boosting

LR - Logistic regression

RF - Random forest

Keywords: depression, dietary patterns, HEI-2015, body mass index, mediation analysis, SHAP analysis

Citation: Wang Z, Fang L, Shi F, Cui Q and Zhou X (2025) Comparative analysis of dietary patterns and depression risk: significant inverse association with HEI-2015 and mediating role of BMI. Front. Nutr. 12:1680741. doi: 10.3389/fnut.2025.1680741

Received: 06 August 2025; Accepted: 20 October 2025;
Published: 12 November 2025.

Edited by:

Pedro Moreira, University of Porto, Portugal

Reviewed by:

Chaoban Wang, Sichuan University, China
Xia Enqin, Guangdong Medical University, China

Copyright © 2025 Wang, Fang, Shi, Cui and Zhou. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Qin Cui, Y3VpcWluZzEyMTBAZm94bWFpbC5jb20=; Xiaomei Zhou, aGVhcnQ1NzExMzE4QDEyNi5jb20=

These authors have contributed equally to this work

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.