Front Med (Lausanne). 2026 ;13
1938429
Objective: This study aimed to develop and temporally validate explainable machine learning models for predicting in-hospital new-onset DFU in hospitalized patients with type 2 diabetes mellitus (T2DM) using routinely available admission variables and inflammatory-nutritional composite indices.
Methods: This retrospective prediction-model study enrolled 550 consecutive hospitalized patients with T2DM admitted between January 2022 and December 2024. Patients admitted during 2022-2023 (n = 400) constituted the development cohort, whereas those admitted in 2024 (n = 150) served as an independent temporal validation cohort. Candidate predictors included demographic characteristics, diabetes duration, routine laboratory biomarkers, ankle-brachial index (ABI), and inflammatory-nutritional composite indices, including neutrophil percentage-to-albumin ratio (NPAR), albumin-to-neutrophil-to-lymphocyte ratio (ANLR), hemoglobin-albumin-lymphocyte-platelet score (HALP), systemic immune-inflammation index (SII), and C-reactive protein-to-albumin ratio (CRP/ALB). Candidate variables were screened using univariable logistic regression followed by least absolute shrinkage and selection operator (LASSO) regression. Logistic regression, random forest, LightGBM, and XGBoost models were developed and evaluated using the area under the receiver operating characteristic curve (AUC), average precision (AP), sensitivity, specificity, F1-score, Brier score, calibration analysis, and decision curve analysis (DCA). Model interpretability was assessed using SHapley Additive exPlanations (SHAP).
Results: During hospitalization, 66 patients (12.0%) developed DFU. Eleven predictors were retained after feature selection, including age, diabetes duration, neutrophil percentage, C-reactive protein, high-density lipoprotein cholesterol, glycated hemoglobin, ABI, NPAR, ANLR, HALP, and SII. In the temporal validation cohort, logistic regression had the highest observed discrimination (AUC = 0.976; bootstrap 95% CI, 0.936-0.992), with a sensitivity of 0.944, specificity of 0.932, and F1-score of 0.773 at the prespecified threshold; however, its Hosmer-Lemeshow test indicated evidence of lack of fit (P = 0.001). LightGBM had the lowest Brier score (0.064), whereas XGBoost achieved an AUC of 0.945, a Brier score of 0.067, and a Hosmer-Lemeshow P value of 0.350. At the prespecified thresholds, LightGBM and XGBoost sensitivities were only 0.056 and 0.389, respectively. SHAP analysis identified ANLR, glycated hemoglobin, HALP, age, and SII as the five most influential XGBoost predictors. Because the temporal validation cohort contained only 18 DFU events, these performance estimates should be interpreted cautiously.
Conclusion: Admission-based machine learning models showed high observed discrimination for in-hospital DFU risk stratification, but no model was uniformly superior across discrimination, calibration, and threshold-dependent sensitivity. The small number of validation events, possible redundancy among mathematically overlapping predictors, omitted established foot-risk variables, and the low sensitivity of LightGBM and XGBoost at their prespecified thresholds preclude direct use as screening tools. Prospective multicenter validation, formal assessment of predictor redundancy, threshold recalibration, and clinical-impact evaluation are required before implementation.
Keywords: diabetic foot ulcer; explainable artificial intelligence; inflammatory biomarkers; machine learning; nutritional status; shapley additive explanations; temporal external validation; type 2 diabetes mellitus