Introduction

Understanding dietary factors in managing diabetes and stroke risk is essential due to the significant impact of diet on inflammation and chronic disease progression. Poor dietary habits in diabetic patients can exacerbate inflammation, leading to complications like cardiovascular diseases and stroke1. Modifying these dietary factors can help mitigate risks and improve patient outcomes. Inflammation is a key driver in chronic diseases, marked by elevated levels of markers like C-reactive protein (CRP) and interleukin-6 (IL-6) in individuals with diabetes and cardiovascular conditions. These markers indicate the presence of inflammation and contribute to disease progression by promoting insulin resistance and vascular damage2,3. Chronic low-grade inflammation is associated with both diabetes and stroke, highlighting the need for anti-inflammatory dietary strategies4.

Previous research has established strong links between diet, inflammation, and cardiovascular diseases. Diets high in saturated fats, trans fats, and refined carbohydrates are linked to increased inflammatory markers and a higher risk of cardiovascular events. Conversely, diets rich in fruits, vegetables, whole grains, and omega-3 fatty acids are associated with lower inflammation levels and a reduced risk of cardiovascular diseases5. The Dietary inflammatory index (DII) was developed to quantify the inflammatory potential of a diet, based on the intake of various nutrients and food components known to influence inflammation. Higher DII scores indicate a more inflammatory diet, while lower scores suggest an anti-inflammatory diet6. The DII has been used in health research to explore diet-related health outcomes, with studies showing higher DII scores linked to increased risks of chronic conditions such as cardiovascular disease, diabetes, and cancer7.

Patients with diabetes are at an increased risk of stroke due to factors such as hyperglycemia, insulin resistance, and dyslipidemia, which contribute to vascular damage and atherosclerosis8. This study aims to investigate the association between the DII and stroke risk in diabetic patients. By analyzing comprehensive data from the National Health and Nutrition Examination Survey (NHANES), the study provides robust findings on this important relationship.

Methods

Study population and design

The data for this study were sourced from the NHANES, a representative cross-sectional study conducted by the National Center for Health Statistics (NCHS) and the Centers for Disease Control and Prevention (CDC). From the NHANES dataset spanning 1999 to 2020, which initially included 116,876 participants, we selected 9,914 individuals diagnosed with diabetes based on the criteria outlined in Fig. 1. According to the American Diabetes Association (ADA) diagnostic criteria, diabetes was defined as a self-reported diagnosis, use of insulin or oral hypoglycemic agents, fasting blood glucose (FBG) ≥ 126 mg/dL, or HbA1c levels ≥ 6.5%9. The NHANES research protocol was approved by the Institutional Review Board (IRB) of the CDC, and informed consent was obtained from all participants. All methods were carried out in accordance with relevant guidelines and regulations.

Assessment of dietary inflammatory index

The DII measures the inflammatory potential of an individual’s diet. In this study, we used dietary data from the NHANES, collected through 24-hour dietary recall interviews. The dietary information was analyzed using the United States Department of Agriculture’s (USDA) Food and Nutrient Database for Dietary Studies (FNDDS) to determine the intake of micro and macronutrients. In this study, we included 25 nutrients: carbohydrates, protein, cholesterol, polyunsaturated fats (PUFAs), alcohol, dietary fiber, monounsaturated fats (MUFAs), saturated fat, total fat, energy, magnesium, vitamin B2, niacin, zinc, selenium, vitamin A, folic acid, vitamin B12, vitamin D, vitamin E, caffeine, vitamin C, vitamin B6, vitamin B1, and iron. To standardize the DII calculation, a global database incorporating dietary data from 11 populations was used. For each nutrient, a z-score was calculated by subtracting the individual’s intake from the standard mean and dividing by the standard deviation. These z-scores were then adjusted to a scale between − 1 and + 1, multiplied by the respective inflammatory effect score, and summed to create the overall DII score. Higher DII scores indicate a more pro-inflammatory diet, while lower scores suggest a more anti-inflammatory diet6. To account for variations in total energy intake, DII scores were normalized per 1,000 calories consumed. This adjustment ensures that the DII reflects the inflammatory potential of the diet independently of total energy intake7,10.

Fig. 1
figure 1

Patient selection flowchart.

Diagnosis of stroke

In this study, the diagnosis of stroke was determined based on participants’ responses to a self-administered questionnaire during NHANES data collection. Specifically, participants were asked, “Has a physician or other health professional ever told you that you had a stroke?” Based on their self-reported answers to this question, participants were classified into either the “Stroke” group or the “Non-Stroke” group.

Assessment of covariates

Potential confounders reported by participants included age, race, income, education level, marital status, smoking habits, alcohol consumption, history of hypertension, coronary heart disease, and medication usage. Body mass index (BMI) was computed as weight in kilograms divided by the square of height in meters. Participants were categorized by race/ethnicity into Mexican American, Non-Hispanic Black, Non-Hispanic White, and Other Race. Education levels were divided into less than high school and high school or above. The poverty income ratio (PIR) provided an index of income relative to the federal poverty line, adjusted for inflation and family size. Smoking status was classified as never smoked, former smoker, or current smoker. Alcohol use was categorized as active or non-active alcohol user. NHANES laboratory measurements included Fasting plasma glucose (FPG), alanine aminotransferase (ALT), aspartate aminotransferase (AST), serum creatinine (SCR), triglycerides (TG), total cholesterol (TC), high-density lipoprotein cholesterol (HDL-C), and low-density lipoprotein cholesterol (LDL-C). The estimated glomerular filtration rate (eGFR) was calculated using the Chronic Kidney Disease Epidemiology Collaboration (CKD-EPI) formula11. Venous blood was drawn once during each participant’s visit to the Mobile Examination Center (MEC). To ensure a fasting state, persons aged ≥ 12 years scheduled for the morning session were instructed to fast for at least 8 h (target ≈ 9 h overnight); fasting duration was verified and recorded by certified phlebotomists before sampling. The single fasting sample provided all chemistry analytes used in this study which were assayed in a CDC reference laboratory under NHANES quality-control protocols12.

Statistical analysis

Given the complex sampling design of NHANES, all analyses incorporated sample weights, clustering, and stratification, which are essential for analyzing NHANES data13. Baseline characteristics were compared by stroke status and DII quartiles. Continuous variables were presented as mean ± standard deviation (SD) and compared using Student’s t-tests. Categorical variables were expressed as frequencies (percentages) and compared using chi-square tests. The DII scores were divided into four quartiles (Q1: DII < 0.55; Q2: 0.55 ≤ DII < 2.01; Q3: 2.01 ≤ DII < 3.13; Q4: DII ≥ 3.13), with the first quartile (Q1) serving as the reference group.

To evaluate the association between DII and stroke risk in diabetic patients, we utilized multivariable logistic regression models, adjusting for potential confounders. The analysis accounted for demographic characteristics and traditional risk factors associated with DII and stroke. Three models were developed to calculate odds ratios (ORs): Model 1, an unadjusted model; Model 2, adjusted for age, sex, race, education level, marital status, and PIR; and Model 3, a fully adjusted model that included variables from Model 2 plus smoking status, alcohol consumption, hypertension, coronary heart disease, BMI, ALT, eGFR, TC, TG, LDL-C, HDL-C, and the use of antihypertensive, antidiabetic, lipid-lowering, and antiplatelet medications. Additionally, restricted cubic spline (RCS) regression with three knots was applied to investigate the nonlinear relationship between DII and stroke in diabetic patients. Subgroup analyses were conducted based on clinical characteristics such as sex, age, race, BMI, smoking status, alcohol consumption, diabetes, and coronary heart disease, with interaction P-values calculated for these groups. All statistical analyses were performed using R software version 4.4.1 (http://www.R-project.org, R Foundation, Vienna, Austria). Missing covariate data were handled using multiple imputation methods specifically designed for survey datasets14. Statistical significance was defined by a two-tailed P-value of less than 0.05.

Results

Baseline characteristics of the study participants

In this diabetic cohort (n = 9914), 909 participants (9.17%) reported a history of stroke. Compared with non-stroke peers, stroke cases were markedly older and consumed a more pro-inflammatory diet (mean DII 2.13 ± 0.09 vs. 1.58 ± 0.03; both p < 0.001). They exhibited a heavier cardiometabolic burden—hypertension 87.7% vs. 68.8% and coronary heart disease 26.3% vs. 10.1%—and poorer renal function. Stroke prevalence was also linked to lower socio-economic status, more current smoking and less active alcohol use, whereas BMI, triglycerides and HDL-C showed no meaningful differences (Table 1).

As shown in Table 2, higher DII quartiles were accompanied by a coherent pattern of demographic, socio-economic, and clinical deterioration. First, participants became modestly older (58.98 ± 0.46 y in Q1 vs. 60.36 ± 0.41 y in Q4; p = 0.05) and the sex ratio shifted markedly toward women (33.5–64.5%). Concurrently, racial composition changed: the proportion of non-Hispanic Black adults rose, whereas non-Hispanic Whites declined (p < 0.001). Second, clear socio-economic gradients emerged—high-school education fell from 81.2 to 66.8%, and median PIR dropped from 3.06 to 2.30 (both p < 0.001). Third, lifestyle profiles worsened: current smoking increased while active alcohol use decreased. Fourth, renal function deteriorated and liver enzymes (ALT, AST) declined modestly (both p < 0.05). Finally, clinical burden intensified—hypertension prevalence rose from 66.7 to 75.8% (p < 0.001) and prior stroke more than doubled (5.5%→12.6%, p < 0.001), whereas coronary heart disease remained unchanged.

Table 1 Weighted baseline characteristics of diabetic participants stratified by stroke status.
Table 2 Weighted baseline characteristics of diabetic participants across quartiles of the DII.

Relationship between DII and stroke

Logistic regression analysis revealed a significant link between higher DII levels and an increased prevalence of stroke among diabetic patients (Table 3). Compared to the Q1 group, the odds ratios (ORs, 95% CIs) for stroke in the Q4 group were 2.26 (1.72, 2.98), 1.97 (1.50, 2.58), and 1.78 (1.35, 2.36) in models 1, 2, and 3, respectively, with trend P-values in all models being less than 0.001. Furthermore, in the continuous model, each one-unit increase in DII, after adjusting for confounders, was associated with a 13% rise in stroke prevalence (OR, 95% CI 1.13 (1.06, 1.20), p < 0.001).

Table 3 Weighted logistic regression of DII and stroke prevalence in diabetes mellitus patients.

Nonlinear correlation analysis of DII and stroke prevalence

We further investigated the relationship between DII and stroke prevalence in diabetic patients using logistic regression models with RCS functions. A linear positive association between DII and stroke was noted (nonlinear p > 0.05, Fig. 2A). Additionally, we examined potential gender differences in the effect of DII on stroke, finding a consistent linear positive relationship between DII and stroke for both males and females (nonlinear p > 0.05, Fig. 2B).

Fig. 2
figure 2

(A) RCS analysis of the relationship between DII and stroke in all participants. (B) RCS analysis of the relationship between DII and stroke in females (red) and males (blue). RCS, restricted cubic splines; adjusted for covariates in model 3.

Stratified analyses

This study employed multivariable logistic regression analysis to investigate the relationship between the DII and stroke, while adjusting for potential confounders. The analysis focused on subgroups categorized by age, sex, BMI, race, smoking status, alcohol consumption, hypertension, and coronary heart disease (CHD) (Fig. 3). In the majority of subgroups, higher DII levels were linked to increased ORs for stroke, with each unit increase in DII ranging from 1.034 to 1.349. However, this association was not statistically significant (p > 0.05) in the subgroups of females, Mexican Americans, Non-Hispanic Whites, never smokers, and those with CHD. Moreover, no significant interactions were found across any subgroup (p > 0.05). These results indicate that a higher DII is a significant risk factor for stroke, regardless of age, sex, BMI, race, smoking status, alcohol consumption, diabetes, and CHD.

Fig. 3
figure 3

Stratified analysis of the link between DII and stroke risk in diabetes mellitus participants, with adjustments for model 3 covariates.

Discussion

In our analysis of 9,914 diabetic participants from NHANES, stroke patients had a significantly higher mean DII score compared to those without stroke. This finding prompted us to use RCS regression, confirming a linear positive relationship between DII and stroke risk in U.S. diabetic patients, independent of various confounding factors. This association was further validated through multivariable logistic regression models. Subgroup analyses showed that this relationship remained consistent across most subgroups, even after adjusting for multiple covariates.

As shown by our stratified models, the positive association between DII and stroke was limited to women, suggesting that pro-inflammatory diets interact with female-specific vascular biology. First, hormonal milieu: oestrogen down-regulates IL-6, TNF-α and preserves endothelial nitric-oxide signalling; its abrupt fall after menopause removes this anti-inflammatory brake and heightens cerebrovascular sensitivity to a pro-inflammatory diet, thereby amplifying stroke risk in women but not men15,16. Second, adiposity pattern: at any given BMI, women—especially those with diabetes—accumulate proportionally more visceral and subcutaneous fat, depots that release IL-6, CRP and other cytokines, magnifying systemic inflammation triggered by a high-DII diet17,18. Third, immune responsiveness: controlled meal-challenge studies show that the post-prandial rise in IL-6 and related innate-immune mediators is significantly greater in females, indicating stronger inflammatory activation to identical nutrient loads and providing a physiological basis for the female-specific diet–stroke link19. Epidemiological evidence is concordant: large cohort analyses have reported that higher dietary inflammatory potential predicts incident cardiovascular events, including stroke, more robustly in women than in men20,21. Together, accumulating data on sex hormones, fat distribution, and immune reactivity offer a coherent biological rationale for the female-specific association we observed and underscore the need for sex-tailored dietary strategies to prevent stroke in diabetic patients.

Our study found that higher DII scores are significantly associated with an increased incidence of stroke among diabetic patients. This finding is consistent with many studies in the existing literature. For example, a study based on NHANES data from 1999 to 2018 also found a significant association between higher DII scores and stroke risk in the general population, further supporting the notion that an inflammatory diet significantly increases the risk of stroke22. Other studies have found that higher DII scores are significantly associated with the severity of diabetes, including higher HbA1c levels23. Additionally, a 20-year follow-up study involving 70,991 women found that higher DII scores were significantly associated with an increased risk of type 2 diabetes, with BMI mediating this relationship24. These findings suggest that an inflammatory diet increases the risk of metabolic diseases through weight gain and low-grade chronic inflammation. Furthermore, an Italian study found that higher DII scores were associated with adverse cardiovascular risk factors in type 2 diabetes patients, such as increased waist circumference, higher triglyceride levels, and lower HDL cholesterol levels, further supporting the negative impact of an inflammatory diet on cardiovascular health25. Conversely, a prospective cohort study did not find a significant association between DII and stroke risk but did find an increased risk of myocardial infarction. This suggests that the association between DII and specific cardiovascular events may vary across studies due to differences in study design, population characteristics, and dietary assessment methods26. Overall, these studies consistently indicate that higher DII scores are associated with increased risks of cardiovascular and metabolic diseases, supporting our finding that an inflammatory diet significantly increases the risk of stroke in diabetic patients.

Chronic inflammation is a key mechanism in the development of atherosclerosis, a primary cause of stroke. Diets high in pro-inflammatory components can elevate levels of systemic inflammation markers like CRP, IL-6, and tumor necrosis factor-alpha (TNF-α), contributing to the development and progression of atherosclerotic plaques, which can rupture and cause ischemic strokes27. Inflammatory diets can also impair endothelial function, promoting vasoconstriction, platelet aggregation, and thrombosis, which are all pathways to stroke28. Higher DII scores have been associated with greater plaque vulnerability and increased risk of stroke events29. Chronic inflammation can also lead to hypertension and other cardiovascular conditions that increase stroke risk30. Furthermore, high DII scores are linked to increased levels of inflammatory markers like homocysteine, which further contributes to vascular inflammation and stroke risk31.

In diabetic patients, elevated DII scores contribute to a higher risk of stroke through several mechanisms. Saturated fats elevate inflammation markers like CRP and IL-6, promoting plaque formation and instability, which can lead to ischemic strokes27. Total fat disrupts lipid profiles by increasing LDL-C and decreasing HDL-C, fostering atherosclerosis32. High dietary cholesterol further contributes to plaque formation33, while excessive protein intake raises homocysteine levels, increasing inflammation and endothelial damage34. Vitamin A, despite its antioxidant properties, can have pro-oxidant effects at high levels, leading to increased oxidative stress and inflammation35. Conversely, adequate vitamin C reduces CRP levels and improves endothelial function, lowering stroke risk36. Beta-carotene, a type of carotene, acts as an antioxidant and reduces oxidative stress, which can protect against the formation of atherosclerotic plaques and lower stroke risk37. High intake of refined carbohydrates leads to rapid spikes in blood sugar and insulin levels, promoting insulin resistance and systemic inflammation, which are risk factors for stroke. In contrast, complex carbohydrates, such as those found in whole grains, help regulate blood sugar levels and reduce inflammation38. Dietary fiber, particularly from fruits, vegetables, and whole grains, is associated with lower levels of inflammatory markers and improved lipid profiles. Fiber also supports gut health by promoting beneficial gut bacteria that produce anti-inflammatory compounds, thus reducing the risk of stroke39,40. Magnesium intake is associated with improved blood pressure control and reduced inflammation, contributing to lower stroke risk41.

The findings of this study have significant practical implications for managing stroke risk in diabetic patients. By identifying specific dietary factors that contribute to inflammation and increased stroke risk, healthcare providers can offer targeted nutritional guidance to their patients. Recommendations should include reducing the intake of saturated fats, refined carbohydrates, and excessive protein from animal sources. Emphasizing the consumption of anti-inflammatory foods such as fruits, vegetables, whole grains, and sources of vitamins A, C, B6, B12, folate, and magnesium can help lower systemic inflammation. These dietary modifications can serve as a preventive strategy, potentially reducing the incidence of stroke in this high-risk population. Implementing these recommendations in clinical practice and public health policies can enhance overall cardiovascular health and improve outcomes for diabetic patients.

This study’s strengths include a large, diverse sample size and the use of comprehensive dietary data, which enhances the generalizability of the findings. The focus on diabetic patients, a high-risk group for stroke, provides valuable insights into specific dietary factors that can be targeted for intervention. The use of established inflammatory markers and well-defined dietary indices adds robustness to the analysis. However, the study has limitations. The observational design cannot establish causality between dietary factors and stroke risk. Self-reported dietary data may be subject to recall bias. Additionally, other confounding variables, such as medication use and physical activity, were not fully controlled. Future research should focus on longitudinal studies to confirm these findings and explore the mechanisms underlying the relationship between diet, inflammation, and stroke. Interventional studies are also needed to test the efficacy of specific dietary modifications in reducing stroke risk among diabetic patients.

The DII can be calculated from a single 24-h dietary recall during a routine clinic visit. In our data, a score ≥ 3.13 marked a 78% higher stroke prevalence and can therefore act as a quick triage cut-off. Patients with high scores should receive targeted advice to cut saturated/trans fats and refined carbohydrates while increasing whole grains, fruits, vegetables and marine ω-3 fats. Recording the DII alongside blood pressure, lipids and HbA1c in follow-up notes provides a simple, quantifiable way to monitor dietary change and its effect on cerebrovascular risk.

Conclusions

This study shows a linear positive association between the DII and stroke risk in diabetic patients, emphasizing the importance of dietary monitoring in stroke prevention. Future research should focus on longitudinal studies to establish causality and explore other confounding factors, enhancing our understanding of the relationship between diet, inflammation, and stroke risk.