Introduction

Nonalcoholic fatty liver disease (NAFLD) is a prevalent chronic liver disorder characterized by excessive fat accumulation in hepatocytes and is closely associated with metabolic dysfunction1. In recent years, the rising prevalence of NAFLD has transformed it into a significant global public health concern2. To more accurately reflect the metabolic characteristics of NAFLD, international expert consensus proposed a new definition and diagnostic criteria under the term β€œmetabolic dysfunction associated steatotic liver disease” (MASLD)3.

Magnesium, an essential trace element, playing a critical role in over 300 enzymatic reactions and physiological processes within the human body. Epidemiological studies have demonstrated a correlation between low magnesium intake and metabolic disorders such as insulin resistance and type 2 diabetes4. Furthermore, animal studies have found that magnesium deficiency may induce hepatic steatosis and inflammation5. Mechanistically, magnesium is essential for maintaining metabolic homeostasis, reducing inflammation, and exerting antioxidant effects. By inhibiting the production and accumulation of reactive oxygen species (ROS), magnesium mitigates oxidative stress, a major contributor to the pathogenesis of MASLD. Magnesium deficiency may exacerbate oxidative damage in the liver, elevate inflammatory cytokine levels, and harm hepatocytes6; Furthermore, low magnesium levels are associated with impaired glucose and fat metabolism, promoting fat accumulation in the liver, and contributing to insulin resistance, a primary driver of MASLD7. Magnesium deficiency may lead to excessive fatty acids accumulation, worsening hepatic steatosis and accelerating the progression of MASLD8. While previous cross-sectional studies have reported an inverse relationship between serum magnesium levels and the incidence of NAFLD9,10, no studies to date have explored the association between magnesium levels and the incidence of MASLD.

The magnesium depletion score (MDS) is a novel metric designed to provide a comprehensive assessment of magnesium status in the body. By incorporating variables such as the use of diuretics and proton pump inhibitors (PPIs), kidney function, and alcohol consumption, MDS offers a more holistic reflection of magnesium levels11. Previous studies have demonstrated a link between MDS and chronic conditions such as cardiovascular disease and osteoporosis12,13, but no studies have yet examined the relationship between MDS and MASLD.

Magnesium deficiency has been shown to activate the innate immune response and increase the production of pro-inflammatory cytokines14, Additionally, magnesium plays a crucial role in protein synthesis15. Common biomarkers such as neutrophils, white blood cells (WBC), and albumin are often used to assess inflammation and nutritional status. Previous studies have found that neutrophils were associated with the severity of NAFLD16, elevated WBC count was a risk factor for NAFLD17, and decreased albumin levels suggested a poor prognosis of NAFLD18. However, the potential roles of these indicators in the relationship between MDS and MASLD have not been fully elucidated.

This study, therefore, aims to utilize data from the National Health and Nutrition Examination Survey (NHANES) to explore the relationship between MDS and the risk of MASLD, while also exploring the potential mediating effects of neutrophils, WBC, and albumin. The findings are expected to offer new insights and evidence for the prevention and treatment of MASLD.

Materials and methods

Study population and design

The NHANES is a population-based, cross-sectional survey designed to collect data on the health and nutrition of the U.S. household population. The project began in the early 1960s and is undertaken every two years, visiting 15 counties in the United States with a complicated, multistage, probability sampling method to select a nationally representative sample of around 5,000 individuals. The NHANES website collected information regarding the research design, interviews, demographics, dietary assessment, physical examination, and laboratory data design (https://www.cdc.gov/nchs/nhanes/about_nhanes.htm ). This NHANES study was approved by the NCHS (National Center for Health Statistics) Ethics Review Board. Informed consent forms were signed by participants. All methods were performed in accordance with the relevant guidelines and regulations. Data for 70,190 participants from NHANES cycles 2005–2018 were initially included. Participants lacking MASLD diagnostic information (n = 55,090) or for whom MDS could not be calculated (n = 781) were excluded. Additionally, participants with missing covariate values (n = 2,295) were further excluded. Ultimately, the final analysis included 12,023 individuals, consisting of 6,219 females and 5,804 males (Fig.Β 1).

Fig. 1
figure 1

Flowchart of the study. NHANES, National Health and Nutrition Examination Survey; MASLD, metabolic dysfunction-Β­associated fatty liver disease; MDS, magnesium depletion score.

Definition of MASLD

The initial stage of MASLD is characterized by abnormal accumulation of fat in liver tissue. While liver biopsy has historically been considered the β€œgold standard” for diagnosing MASLD and assessing its severity, the limitations of histological staging, particularly in evaluating fibrosis, have restricted its widespread use in MASLD management19. Noninvasive methods, such as serum biomarker testing and imaging techniques like vibration-controlled transient elastography (VCTE) and magnetic resonance elastography (MRE) are now more commonly used to evaluate hepatic steatosis20. The fatty Liver Index (FLI), developed by CE Ruhl et al., has been validated in various studies and shown to exhibit good sensitivity and specificity21,22,23. In large-scale epidemiologic studies, FLI is often preferred over imaging due to its convenience.

In this study, MASLD status was primarily assessed using the FLI score. An FLI β‰₯ 30 demonstrated a sensitivity of 71.2% for diagnosing MASLD, while an FLI β‰₯ 60 had a positive predictive value of 69.7% 24. To maximize diagnostic sensitivity and include as large a population as possible, a cut-off value of 30 was used for MASLD diagnosis25.

The specific calculation formula for FLI was as follows:

$$\:FLI=\frac{{e}^{0.953\times\:\text{ln}\left(triglycerides\right)+0.139\times\:BMI+0.718\times\:\text{ln}\left(gamma-glutamyltransferase\right)+0.053\times\:waist\:circum\:ference-15.745}}{1+{e}^{0.953\times\:\text{ln}\left(triglycerides\right)+0.139\times\:BMI+0.718\times\:\text{ln}\left(gamma-glutamyltransferase\right)+0.053\times\:waist\:circum\:ference-15.745}}$$

MASLD was defined as FLI β‰₯ 30, and excluded other liver diseases associated with the aforementioned factors including: (1) excessive alcohol use; (2) hepatitis B/C virus infection; (3) pharmacological agents associated with steatosis (e.g.: amiodarone, methotrexate, tamoxifen, aspirin, ibuprofen, nrtis (nucleoside reverse transcriptase inhibitors), protease inhibitors, valproic acid, carbamazepine, fluorouracil, irinotecan, glucocorticoids); (4) iron overload.

Calculation of the magnesium depletion score

Magnesium depletion was assessed using the MDS, which ranges from 0 to 5. The MDS was calculated by summing the points assigned for four factors: (1) diuretic use (current use for 1 point), (2) proton pump inhibitors (PPI) use (current use for 1 point), (3) kidney function [60 mL/ (minΒ·1.73 m2) ≀ estimated glomerular filtration rate (eGFR) < 90 mL/(min Β· 1.73 m2) for 1 point; eGFR < 60 mL/(minΒ·1.73 m2) for 2 points], and (4) alcohol drinking (heavy drinker for 1 point). In the NHANES, current use of diuretics and PPIs was defined as self-reported use over the past 30 days. Heavy drinkers were defined as > 1 drink/d for women and > 2 drinks/d for men26. The Food Patterns Equivalents Database defines alcoholic drinks as beers, wines, distilled spirits (such as brandy, gin, rum, vodka, and whiskey), cordials, and liqueurs. A standard drink was defined as a drink with 14Β g (0.6 fluid ounces) of ethanol27.

Covariates

In addition, demographic and serologic indicators were included in the analysis, such as age, sex, race, education, poverty status, marital status, smoking status, white blood cell (WBC) count, neutrophil count, and albumin levels. NHANES collects data via questionnaires and examinations on people’s personal information, lifestyles, and physical conditions of health. Education level was categorized as β€œlower than high school”, β€œhigh school” and β€œhigher than high school”. Ethnicity was classified into β€œMexican American”, β€œNon-Hispanic Black”, β€œNon-Hispanic White”, β€œother Hispanic” and β€œother race”. Marital was divided into β€œDivorced”, β€œLiving with partner”, β€œMarried”, β€œNever married”, β€œSeparated”, and β€œWidowed”.

Statistical analyses

Given that the NHANES used a complicated, multistage probability sampling methodology to choose representative individuals, sample weights were applied in all analyses to generate nationally representative estimates. Clinical information consists of continuous variables and categorical variables. Continuous variables with normal distributions were provided as mean (interquartile range [Standard Deviation, SD]); categorical variables were presented as percentages and standard error (SE). The Shapiro-Wilk test was used as the normality test. Independent t tests, Welch t tests, and White non-parametric t tests were used for continuous variables. Pearson’s X2 test and Fisher’s exact test of independence were used to compare the proportions of dichotomous variables.

We constructed multivariate logistic regression models to analyze the correlation between MDS and MASLD based on clinical experience and with reference to relevant literature. Multivariable model was adjusted for sex, age, race/ethnicity, education attainment, poverty income ratio and smoking, and an additional model was adjusted for BMI (≀ 18.5Β kg/m2, 18.5–25Β kg/m2, > 25Β kg/m2) based on multivariable model. Restricted cubic spline (RCS) analysis was conducted to characterize dose-response relation-ships. Considering the potential interactions between WBC, neutrophils, albumin and MASLD, we conducted a causal mediation analysis to obtain a rationalization of the causal assumptions between the MDS and MASLD. Subgroup and multiplicative interaction tests were conducted according to sex, age, race/ethnicity, education attainment, poverty income ratio and smoking.

All statistical analyses were performed using the Survey package in R Statistical Software (Version 4.2.2, R Foundation for Statistical Computing, Vienna, Austria). A two-sided P < 0.05 was considered to be statistically significant.

Result

Basic characteristic of participants

A total of 12,024 participants were included in the study (Fig.Β 1). As shown in TableΒ 1, in the overall population, there was a higher percentage of non-Hispanic White ethnicity, and the majority of participants received a higher than high school education. The proportion of MASLD and non-MASLD patients with an MDS of 0 was 36.26% and 47.05%, respectively, and the proportion of patients with an MDS of 5 was the least, at 0.01% and 0.02%, respectively. Compared with non-MASLD participants, MASLD patients had a higher proportion of males, senior age (β‰₯ 65years), lower WBC and albumin, and higher Neutrophils (all p < 0.001).

Table 1 Baseline characteristics of participants with or without MASLD.

The association between the MDS and MASLD

TableΒ 2 shows the relationship between MDS and MASLD. In the univariable model, elevated MDS were positively associated with the risk of MASLD, with patients with MDS of 1, 2, 3, and 4 having a 1.25, 1.97, 3.19, and 2.40 times risk of MASLD compared to those with MDS of 0, respectively (all p ≀ 0.001). In the multivariable model, adjusted for sex, age, race/ethnicity, education attainment, poverty income ratio, and smoking, MDS remained associated with MASLD risk, though the strength of the association was slightly reduced. When further adjusted for BMI, MDS continued to show a positive correlation with MASLD (MDS = 2: OR = 1.41, 95% CI [1.13, 1.77], p = 0.07; MDS = 3: OR = 2.00, 95% CI [1.47, 2.74], p < 0.001). Notably, in both the univariable and multivariable models, no statistically significant association was observed between an MDS of 5 and MASLD risk (TableΒ 2).

Table 2 Univariable and multivariable logistics regression analysis of the association between MDS and MASLD.

To further clarify the dose-response relationship between MDS and MASLD, we constructed a RCS model. MDS were positively associated with MASLD risk, with the highest risk observed at an MDS of 3 when no covariates were adjusted (p-overall < 0.001, p-non-linear = 0.035) (Fig.Β 2A). In the multivariable model, increased MDS showed a linear relationship with MASLD risk (p-overall < 0.001, p-nonlinear = 0.193) (Fig.Β 2B).

Fig. 2
figure 2

RCS model between MDS and the risk of MASLD. (A) was unadjusted; (B) was adjusted for sex, age, race/ethnicity, education attainment, poverty income ratio and smoking, Abbreviations: RCS, Restricted cubic spline; MDS, magnesium depletion score; MASLD, Metabolic Dysfunction associated Steatotic Liver Disease; OR, Odds ratio.

Analysis of potential causal mediators between MDS and MASLD

We further analyzed potential causal mediators of MDS and MASLD. In Univariable and multivariable logistics regression models, elevated neutrophils and WBC were associated with an increased MASLD risk, whereas elevated albumin was a protective factor for MASLD (TableΒ 3).

Table 3 Univariable and multivariable logistics regression analysis of the association between neutrophils, albumin, WBC and MASLD.

Further mediation analyses were performed to assess the role of neutrophils, albumin, and WBC in association with MDS and MASLD. Neutrophils, albumin, and WBC can all mediate the association between MDS and MASLD, with albumin mediating the highest proportion of the association (14.05%), while neutrophils and WBC had a mediating effect of 12.27% and 12.44%, respectively (Fig.Β 3).

Fig. 3
figure 3

Mediation analysis between MDS and the risk of MASLD. MDS, magnesium depletion score; MASLD, Metabolic dysfunction associated steatotic liver disease.

Subgroup and interaction analysis between MDS and MASLD

In subgroup analyses, elevated MDS remained consistently associated with the risk of MASLD, and this result remained stable across age, sex, race/ethnicity, education attainment, poverty income ratio, and smoking. However, there was no statistically significant association observed between MDS and the risk of MASLD in patients who were currently smoking (Fig.Β 4).

Fig. 4
figure 4

Subgroup and interaction analysis between MDS and MASLD. MDS, Magnesium depletion score; MASLD, Metabolic dysfunction associated steatotic liver disease; OR, Odds ratio.

Interaction analyses showed an interaction between age and MDS, with a 1-point increase in MDS associated with a 12% increased risk of developing MASLD among participants aged β‰₯ 65 years (OR = 1.12, 95%CI [1.02, 1.22], p = 0.0196); Among participants aged < 65 years, patients with elevated MDS have higher risk of MASLD (OR = 1.34, 95%CI [1.22, 1.49], p < 0.0001). No interaction of MDS with gender, race, education, income was observed (Fig.Β 4).

Discussion

In this large, nationally representative study of the U.S. adult population, it was found that higher MDS were significantly associated with an increased risk of MASLD. Compared to participants with an MDS of 0, those with MDS of 1, 2, 3, and 4 had a 1.19-, 1.63-, 2.33-, and 1.79-fold higher risk of MASLD, respectively. In a multivariable model, when further adjusted for BMI, a positive trend can be seen despite the decline in the correlation between MDS and MASLD, which might be attributed to data bias, as the small number of participants with MDS scores of 4 and 5 resulted in a lack of statistical significance. The restricted cubic spline analysis revealed a linear dose-response relationship between MDS and MASLD risk (p-nonlinear = 0.13). Mediation analyses showed that neutrophils, albumin, and WBC partially mediated the association between MDS and MASLD, with albumin having the highest mediating effect (14.05%). Subgroup analyses demonstrated that the positive association between MDS and MASLD remained consistent across age, sex, race/ethnicity, education attainment, poverty income ratio, and smoking status, with the exception of current smokers. Additionally, a significant interaction was observed between age and MDS (p-interaction = 0.03), with a 1-point increase in MDS associated with a 12% and 34% higher risk of MASLD among participants aged β‰₯ 65 years and < 65 years, respectively.

Our findings are consistent with previous epidemiological studies that have reported an inverse association between magnesium intake or serum magnesium levels and the risk of NAFLD9,10. The observed association between higher MDS and increased MASLD risk in our study is biologically plausible. Magnesium deficiency may contribute to the development and progression of MASLD through several potential mechanisms, including inflammation, insulin resistance, and dysregulation of lipid metabolism28. Magnesium is recognized for its anti-inflammatory properties, and deficiency has been linked to increased production of pro-inflammatory cytokines, such as tumor necrosis factor-Ξ± (TNF-Ξ±) and interleukin-6 (IL-6), both of which play crucial roles in the pathogenesis of MASLD29,30. Additionally, magnesium is essential for maintaining insulin sensitivity, and its deficiency may lead to insulin resistance, a key factor in the development of MASLD31. Furthermore, magnesium deficiency may impair lipid metabolism by increasing triglyceride synthesis and reducing fatty acid oxidation, thereby contributing to hepatic steatosis32.

Our mediation analyses revealed that neutrophils and WBC partially mediated the association between MDS and MASLD, highlighting the importance of inflammation in the relationship between magnesium deficiency and MASLD. Magnesium deficiency has been shown to activate the innate immune response, leading to increased production of pro-inflammatory cytokines, which can result in neutrophil infiltration and activation in the liver14,33. Once activated, neutrophils release reactive oxygen species and proteolytic enzymes, causing hepatocellular damage and exacerbating liver injury34. Additionally, magnesium deficiency may enhance the recruitment and activation of other inflammatory cells, such as macrophages and lymphocytes, contributing to the overall inflammatory milieu in the liver33. The chronic low-grade inflammation induced by magnesium deficiency may accelerate the progression of MASLD and increase the risk of advanced liver fibrosis35.

Albumin, synthesized by the liver, is a crucial marker of hepatic synthetic function. Our mediation analysis showed that albumin had the highest mediating effect (14.05%) in the association between MDS and MASLD. This suggests that magnesium deficiency may influence risk of MASLD by affecting albumin synthesis, which reflects the extent of liver damage. Magnesium plays a key role in protein synthesis15, and its deficiency may hinder the liver’s ability to produce albumin. As MASLD progresses, liver damage and dysfunction become more pronounced, leading to a decline in albumin levels. The reduced albumin synthesis in the setting of magnesium deficiency may serve as an indicator of the severity of liver injury and contribute to the progression of MASLD. Moreover, albumin possesses antioxidant and anti-inflammatory properties, and its decrease could exacerbate oxidative stress and inflammation within the liver, creating a vicious cycle that promotes MASLD development36.

The subgroup and interaction analyses provide further insights into the intricate relationship between MDS and MASLD. Notably, the association between MDS and MASLD was not statistically significant among current smokers, suggesting that smoking may confound the relationship. Smoking has been identified as a risk factor for MASLD, and may contribute to disease development and progression through various mechanisms, such as insulin resistance, oxidative stress, and inflammation37,38. Moreover, smoking has been shown to deplete magnesium levels, possibly due to increased urinary excretion of magnesium39. The interaction between smoking and magnesium deficiency in the pathogenesis of MASLD requires further investigation, as these factors may have synergistic effects on the development and progression of the disease.

Age was found to be a significant effect modifier in the association between MDS and MASLD. The weakened association among participants aged β‰₯ 65 years suggests that age is a crucial modulating factor. This finding may be attributed to the unique physiological state and nutritional status of the elderly population. Aging is associated with a decline in magnesium absorption and an increase in urinary magnesium excretion, leading to a higher risk of magnesium deficiency40. Additionally, older adults often have multiple comorbidities and take medications that can affect magnesium homeostasis41. The complex interplay between age-related factors and magnesium status may contribute to the attenuated association between MDS and MASLD in the elderly population.

Furthermore, the nutritional status of older adults may influence the relationship between MDS and MASLD. Malnutrition is prevalent among the elderly, and may lead to deficiencies in various micronutrients, including magnesium42,43. Poor nutritional status may further contribute to the development and progression of MASLD through mechanisms, such as increased oxidative stress and inflammation44. The potential interaction between magnesium deficiency and malnutrition in the context of MASLD in the elderly population requires further exploration.

The present study has several strengths and innovations. First, we utilized data from the NHANES, a nationally representative survey of the US population with a large sample size, which enhances the generalizability of our findings45. Second, we applied the MDS, a novel and comprehensive indicator of magnesium depletion that integrates multiple clinical factors, offering a more holistic assessment of magnesium deficiency compared to single measures like serum magnesium levels46. Third, adjustments were made for a broad range of covariates, including demographic characteristics and biochemical parameters thereby improving the robustness of our results. Fourth, mediation analyses were conducted to explore the potential mediating effects of inflammation and albumin on the association between MDS and MASLD, alongside interaction analyses to investigate the modulating roles of age and smoking. These analyses provide valuable insights into mechanisms linking MDS and MASLD47.

However, our study has several limitations that should be acknowledged. The cross-sectional design precludes the establishment of a causal relationship between MDS and MASLD48. Future prospective cohort studies are necessary to validate these findings and clarify the temporal sequence of the association. Additionally, the absences of liver biopsy data, which is the gold standard for assessing liver histology, is a notable limitation49. Future research should incorporate both imaging and histological evaluations for a comprehensive assessment of MASLD. Moreover, we lacked direct measures of magnesium status, such as serum magnesium concentration, which is an important indicator of magnesium nutritional status50. Including serum magnesium measurements in future studies would provide valuable insights into the relationship between MDS and MASLD. Furthermore, MASLD diagnosis in our study was based on a FLI threshold of β‰₯ 30, which increases diagnostic sensitivity but reduced specificity. In an effort to maximize the inclusion of high-risk individuals for MASLD in this large epidemiologic analysis, this cut-off was employed.

Future research should also aim to elucidate the molecular mechanisms through which MDS contributes to the development and progression of MASLD. Understanding these pathways could guide the creation of more targeted prevention and treatment strategies51. Furthermore, clinical trials investigating the effects and safety of magnesium supplementation in the prevention and management of MASLD are warranted52. Such studies would provide valuable evidence to guide clinical practice and public health interventions aimed at reducing the burden of MASLD.

Conclusion

In conclusion, this study demonstrates a significant association between higher MDS and increased risk of MASLD in a large, nationally representative sample of U.S. adults. These findings highlight the potential role of magnesium deficiency in the pathogenesis of MASLD and suggest that addressing magnesium depletion may be a promising strategy for the prevention and management of this increasingly prevalent condition. Further research is needed to confirm our findings, elucidate the underlying mechanisms, and explore the therapeutic potential of magnesium supplementation in the context of MASLD.