Abstract
Background: The rising global prevalence and bidirectional relationship between metabolic-associated fatty liver disease (MAFLD) and diabetes mellitus (DM) significantly exacerbate adverse target-organ outcomes. Despite this, non-invasive screening frameworks remain lacking. This study aims to bridge this gap by developing and validating an individualized, machine learning-based risk prediction model for this comorbidity using routine clinical and biochemical phenotypes. Methods: Clinical data of 5,383 adult participants were extracted from the National Health and Nutrition Examination Survey (NHANES 2021-2023) database for retrospective analysis. The cohort was partitioned into a training set and a testing set at a 7:3 ratio. Following feature selection combining LASSO regression and the random forest (RF) algorithm, ten machine learning models were constructed and comparatively evaluated using 10-fold cross-validation. Model discrimination and calibration were comprehensively assessed utilizing the area under the receiver operating characteristic curve (AUC), calibration curves, and Brier scores. The SHAP framework was then applied to quantify feature contributions to the predictive outcomes, culminating in the development of a static web-based tool for individualized risk assessment. Results: Compared to the non-comorbidity group (n = 4,801), the comorbidity group (n = 582) exhibited a significantly heavier metabolic burden, characterized by older age and a higher BMI. Following dual feature dimensionality reduction, 23 candidate variables were identified. Among the 10 machine learning algorithms evaluated, the artificial neural network (ANN) demonstrated the best overall performance. Through SHAP-based feature refinement, an optimized ANN model relying on only 13 routine clinical and biochemical indicators was ultimately established. In the testing set, this model achieved excellent discrimination (AUC = 0.863) and the lowest Brier score (0.073), coupled with an exceptionally high probabilistic goodness-of-fit (Hosmer-Lemeshow P = 0.370). Its discriminative performance showed no statistically significant difference from that of the full-feature model (P = 0.894). SHAP explainability analysis indicated that serum osmolality and serum sodium (Na) were the core indicators with the highest predictive contribution to this comorbidity risk. Finally, the online assessment tool deployed from this model successfully enabled the non-invasive, real-time calculation of comorbidity probabilities. Conclusion: This study developed and validated a robust 13-feature ANN model for predicting MAFLD-DM comorbidity, highlighting the indicative value of systemic homeostasis and electrolyte imbalances. The derived web-based tool offers cost-effective, non-invasive clinical decision support for early risk stratification and "dual metabolic-hepatic management".
References
Le, M. H., Yeo, Y. H., Li, X., et al. (2022). 2019 Global NAFLD Prevalence: A Systematic Review and Meta-analysis. Clinical gastroenterology and hepatology : the official clinical practice journal of the American Gastroenterological Association, 20(12), 2809-2817.e2828.
[2] Lim, G. E. H., Tang, A., Ng, C. H., et al. (2023). An Observational Data Meta-analysis on the Differences in Prevalence and Risk Factors Between MAFLD vs NAFLD. Clinical gastroenterology and hepatology : the official clinical practice journal of the American Gastroenterological Association, 21(3), 619-629.e617.
[3] Miao, L., Targher, G., Byrne, C. D., et al. (2024). Current status and future trends of the global burden of MASLD. Trends in endocrinology and metabolism: TEM, 35(8), 697-707.
[4] Tang, A. S. P., Chan, K. E., Quek, J., et al. (2022). Non-alcoholic fatty liver disease increases risk of carotid atherosclerosis and ischemic stroke: An updated meta-analysis with 135,602 individuals. Clinical and molecular hepatology, 28(3), 483-496.
[5] Lin, H., Zhang, X., Li, G., et al. (2021). Epidemiology and Clinical Outcomes of Metabolic (Dysfunction)-associated Fatty Liver Disease. Journal of clinical and translational hepatology, 9(6), 972-982.
[6] Thomas, J. A., Kendall, B. J., El-Serag, H. B., et al. (2024). Hepatocellular and extrahepatic cancer risk in people with non-alcoholic fatty liver disease. The lancet. Gastroenterology & hepatology, 9(2), 159-169.
[7] Sun, H., Saeedi, P., Karuranga, S., et al. (2022). IDF Diabetes Atlas: Global, regional and country-level diabetes prevalence estimates for 2021 and projections for 2045. Diabetes research and clinical practice, 183, 109119.
[8] Worldwide trends in diabetes prevalence and treatment from 1990 to 2022: a pooled analysis of 1108 population-representative studies with 141 million participants. (2024). Lancet (London, England), 404(10467), 2077-2093.
[9] Global, regional, and national burden of diabetes from 1990 to 2021, with projections of prevalence to 2050: a systematic analysis for the Global Burden of Disease Study 2021. (2023). Lancet (London, England), 402(10397), 203-234.
[10] Yang, T., Qi, F., Guo, F., et al. (2024). An update on chronic complications of diabetes mellitus: from molecular mechanisms to therapeutic strategies with a focus on metabolic memory. Molecular medicine (Cambridge, Mass.), 30(1), 71.
[11] Adams, L. A., Anstee, Q. M., Tilg, H., et al. (2017). Non-alcoholic fatty liver disease and its relationship with cardiovascular disease and other extrahepatic diseases. Gut, 66(6), 1138-1153.
[12] Leite, N. C., Villela-Nogueira, C. A., Cardoso, C. R., et al. (2014). Non-alcoholic fatty liver disease and diabetes: from physiopathological interplay to diagnosis and treatment. World journal of gastroenterology, 20(26), 8377-8392.
[13] Li, Y., Yang, P., Ye, J., et al. (2024). Updated mechanisms of MASLD pathogenesis. Lipids in health and disease, 23(1), 117.
[14] Moretti, V., Romeo, S., & Valenti, L. (2024). The contribution of genetics and epigenetics to MAFLD susceptibility. Hepatology international, 18(Suppl 2), 848-860.
[15] Lee, C. H., Lui, D. T., & Lam, K. S. (2022). Non-alcoholic fatty liver disease and type 2 diabetes: An update. Journal of diabetes investigation, 13(6), 930-940.
[16] Huang, D. Q., Noureddin, N., Ajmera, V., et al. (2023). Type 2 diabetes, hepatic decompensation, and hepatocellular carcinoma in patients with non-alcoholic fatty liver disease: an individual participant-level data meta-analysis. The lancet. Gastroenterology & hepatology, 8(9), 829-836.
[17] Mantovani, A., Csermely, A., Petracca, G., et al. (2021). Non-alcoholic fatty liver disease and risk of fatal and non-fatal cardiovascular events: an updated systematic review and meta-analysis. The lancet. Gastroenterology & hepatology, 6(11), 903-913.
[18] Kapoor, N., & Kalra, S. (2023). Metabolic-Associated Fatty Liver Disease and Diabetes: A Double Whammy. Endocrinology and metabolism clinics of North America, 52(3), 469-484.
[19] Cusi, K., Abdelmalek, M. F., Apovian, C. M., et al. (2025). Metabolic Dysfunction-Associated Steatotic Liver Disease (MASLD) in People With Diabetes: The Need for Screening and Early Intervention. A Consensus Report of the American Diabetes Association. Diabetes care, 48(7), 1057-1082.
[20] Cusi, K., Isaacs, S., Barb, D., et al. (2022). American Association of Clinical Endocrinology Clinical Practice Guideline for the Diagnosis and Management of Nonalcoholic Fatty Liver Disease in Primary Care and Endocrinology Clinical Settings: Co-Sponsored by the American Association for the Study of Liver Diseases (AASLD). Endocrine practice : official journal of the American College of Endocrinology and the American Association of Clinical Endocrinologists, 28(5), 528-562.
[21] Cho, H., She, J., De Marchi, D., et al. (2024). Machine Learning and Health Science Research: Tutorial. Journal of medical Internet research, 26, e50890.
[22] Anthonimuthu, D. J., Hejlesen, O., Zwisler, A. O., et al. (2024). Application of Machine Learning in Multimorbidity Research: Protocol for a Scoping Review. JMIR research protocols, 13, e53761.
[23] Patel, C. J., Pho, N., McDuffie, M., et al. (2016). A database of human exposomes and phenomes from the US National Health and Nutrition Examination Survey. Scientific data, 3, 160096.
[24] Siddiqui, M. S., Vuppalanchi, R., Van Natta, M. L., et al. (2019). Vibration-Controlled Transient Elastography to Assess Fibrosis and Steatosis in Patients With Nonalcoholic Fatty Liver Disease. Clinical gastroenterology and hepatology : the official clinical practice journal of the American Gastroenterological Association, 17(1), 156-163.e152.
[25] Eslam, M., Newsome, P. N., Sarin, S. K., et al. (2020). A new definition for metabolic dysfunction-associated fatty liver disease: An international expert consensus statement. Journal of hepatology, 73(1), 202-209.
[26] Eslam, M., Fan, J. G., Yu, M. L., et al. (2025). The Asian Pacific association for the study of the liver clinical practice guidelines for the diagnosis and management of metabolic dysfunction-associated fatty liver disease. Hepatology international, 19(2), 261-301.
[27] Diagnosis and Classification of Diabetes: Standards of Care in Diabetes-2024. (2024). Diabetes care, 47(Suppl 1), S20-s42.
[28] Peng, L., & Ai, M. (2025). Association of serum osmolality with metabolic dysfunction-associated steatotic liver disease in adults. BMC gastroenterology, 25(1), 693.
[29] Lee, J. H., Song, H., Yoo, E. J., et al. (2026). Hepatocyte TonEBP promotes metabolic stress-induced hepatic fibroinflammation involving transcriptional activation of ELR⁺ CXC chemokines. Cell death discovery, 12(1).
[30] Lee, H. H., Jeong, G. W., Ye, B. J., et al. (2022). TonEBP in Myeloid Cells Promotes Obesity-Induced Insulin Resistance and Inflammation Through Adipose Tissue Remodeling. Diabetes, 71(12), 2557-2571.
[31] Kim, D. H., Kim, K. K., Lee, T. H., et al. (2021). Transcription Factor TonEBP Stimulates Hyperosmolality-Dependent Arginine Vasopressin Gene Expression in the Mouse Hypothalamus. Frontiers in endocrinology, 12, 627343.
[32] Szczepanska-Sadowska, E., Cudnoch-Jędrzejewska, A., & Żera, T. (2024). Molecular Interaction Between Vasopressin and Insulin in Regulation of Metabolism: Impact on Cardiovascular and Metabolic Diseases. International journal of molecular sciences, 25(24).
[33] Student, J., Sowers, J., & Lockette, W. (2022). THIRSTY FOR FRUCTOSE: Arginine Vasopressin, Fructose, and the Pathogenesis of Metabolic and Renal Disease. Frontiers in cardiovascular medicine, 9, 883365.
[34] Andres-Hernando, A., Jensen, T. J., Kuwabara, M., et al. (2021). Vasopressin mediates fructose-induced metabolic syndrome by activating the V1b receptor. JCI insight, 6(1).
[35] Kim, N. H., & Kim, N. H. (2022). Renoprotective Mechanism of Sodium-Glucose Cotransporter 2 Inhibitors: Focusing on Renal Hemodynamics. Diabetes & metabolism journal, 46(4), 543-551.
[36] Umpierrez, G. E., Davis, G. M., ElSayed, N. A., et al. (2024). Hyperglycemic Crises in Adults With Diabetes: A Consensus Report. Diabetes care, 47(8), 1257-1275.
[37] Simons, P., Valkenburg, O., Stehouwer, C. D. A., et al. (2021). Sex hormone-binding globulin: biomarker and hepatokine? Trends in endocrinology and metabolism: TEM, 32(8), 544-553.
[38] Bourebaba, N., Ngo, T., Śmieszek, A., et al. (2022). Sex hormone binding globulin as a potential drug candidate for liver-related metabolic disorders treatment. Biomedicine & pharmacotherapy = Biomedecine & pharmacotherapie, 153, 113261.
[39] Stefan, N., Schick, F., Birkenfeld, A. L., et al. (2023). The role of hepatokines in NAFLD. Cell metabolism, 35(2), 236-252.
[40] Simons, P., Valkenburg, O., van de Waarenburg, M. P. H., et al. (2023). Serum sex hormone-binding globulin is a mediator of the association between intrahepatic lipid content and type 2 diabetes: the Maastricht Study. Diabetologia, 66(1), 213-222.
[41] Brianso-Llort, L., Saéz-Lopez, C., Alvarez-Guaita, A., et al. (2024). Recent Advances on Sex Hormone-Binding Globulin Regulation by Nutritional Factors: Clinical Implications. Molecular nutrition & food research, 68(14), e2400020.
[42] Xing, Y., Chen, J., Liu, J., et al. (2022). Associations Between GGT/HDL and MAFLD: A Cross-Sectional Study. Diabetes, metabolic syndrome and obesity : targets and therapy, 15, 383-394.
[43] Wu, W., Gong, M., Liu, P., et al. (2025). Hypomagnesemia: exploring its multifaceted health impacts and associations with blood pressure regulation and metabolic syndrome. Diabetology & metabolic syndrome, 17(1), 217.
[44] Adetunji, A. G., & Obeng-Gyasi, E. (2024). Investigating the Interplay of Toxic Metals and Essential Elements in Liver Disease. International journal of environmental research and public health, 21(6).
[45] Fenercioglu, A. K. (2024). The Anti-Inflammatory Roles of Vitamin D for Improving Human Health. Current issues in molecular biology, 46(12), 13514-13525.
[46] Piuri, G., Zocchi, M., Della Porta, M., et al. (2021). Magnesium in Obesity, Metabolic Syndrome, and Type 2 Diabetes. Nutrients, 13(2).
[47] Ma, J., Dhiman, P., Qi, C., et al. (2023). Poor handling of continuous predictors in clinical prediction models using logistic regression: a systematic review. Journal of clinical epidemiology, 161, 140-151.

This work is licensed under a Creative Commons Attribution 4.0 International License.
Copyright (c) 2026 Journal of Public Health and Preventive Medicine