Hospitalized patients with type 2 diabetes face a quiet but dangerous threat: the sudden appearance of a diabetic foot ulcer during a stay that was meant to address something else entirely. A new retrospective study from the Sixth Affiliated Hospital of Xinjiang Medical University in Urumqi, China, reports that routinely collected admission blood tests, when fed into machine learning models, showed high observed discrimination for identifying which patients would develop a new foot ulcer in the hospital. The work, published in Frontiers in Medicine, combined conventional laboratory markers with a family of inexpensive inflammatory–nutritional composite indices and then subjected the resulting models to a temporal validation strategy that many prediction studies still skip.
The clinical stakes are considerable. Diabetic foot ulcer affects an estimated 18.6 million people with diabetes worldwide each year, with a lifetime risk between 19 and 34 percent. Ulcers heal slowly, recur in up to 65 percent of cases within three to five years, and carry a five-year mortality rate of roughly 30 percent, which climbs above 70 percent after amputation. Among hospitalized patients, new-onset ulcer incidence has been reported between 6 and 16.8 percent. Because the International Working Group on the Diabetic Foot emphasizes risk-stratified screening, education, offloading, and vascular assessment as the backbone of prevention, any tool that flags high-risk patients at the moment of admission could, in principle, sharpen the timing of those interventions.
The research team enrolled 550 consecutive hospitalized patients with type 2 diabetes admitted between January 2022 and December 2024, all of whom were free of active foot ulcers on arrival and had laboratory results available within 48 hours of admission. Rather than splitting patients randomly, a practice the authors note can leak temporal information and inflate performance estimates, they assigned the 400 patients admitted in 2022 and 2023 to a development cohort and reserved the 150 patients admitted in 2024 as an independent temporal validation cohort. During hospitalization, 66 patients, or 12.0 percent, developed a new diabetic foot ulcer, with the event rate matching exactly at 12.0 percent in both cohorts.
The candidate predictors went well beyond the usual suspects. Alongside age, sex, diabetes duration, blood pressure, smoking, and alcohol history, the team gathered neutrophil percentage, lymphocyte count, platelet count, hemoglobin, serum albumin, C-reactive protein, high-density lipoprotein cholesterol, glycated hemoglobin, serum creatinine, and the ankle–brachial index, a bedside measure of peripheral arterial perfusion. They then calculated five composite indices from these same raw values: the neutrophil percentage-to-albumin ratio (NPAR), the albumin-to-neutrophil-to-lymphocyte ratio (ANLR), the hemoglobin–albumin–lymphocyte–platelet (HALP) score, the systemic immune-inflammation index (SII), and the C-reactive protein-to-albumin ratio. Each index compresses information about immune activation, nutritional reserve, and systemic inflammation into a single number that costs nothing extra to compute.
Feature selection proceeded in two stages within the development cohort only. Univariable logistic regression with a permissive threshold of P < 0.20 retained thirteen variables, which then passed through least absolute shrinkage and selection operator (LASSO) regression with eight-fold stratified cross-validation. Eleven predictors survived with non-zero coefficients: age, diabetes duration, neutrophil percentage, C-reactive protein, HDL cholesterol, HbA1c, ankle–brachial index, NPAR, ANLR, HALP, and SII. Notably, lymphocyte count and albumin alone were shrunk to zero, and the CRP/ALB ratio never cleared the initial screen. In the multivariable logistic model, age, diabetes duration, HbA1c, and ANLR remained statistically significant, with HbA1c showing a particularly strong adjusted association.
Four models were then trained on the eleven retained predictors: logistic regression, random forest, LightGBM, and XGBoost. The classification threshold for each was fixed in the development cohort before any validation data were touched, a detail that matters enormously for real-world deployment. In the 2024 validation cohort, logistic regression delivered the highest observed discrimination, with an area under the receiver operating characteristic curve of 0.976 (bootstrap 95 percent confidence interval, 0.936–0.992) and an average precision of 0.762. At its prespecified threshold of 0.593, it caught 17 of the 18 patients who developed ulcers, with a sensitivity of 0.944, specificity of 0.932, and F1 score of 0.773, producing nine false positives and a single false negative.
The gradient-boosting models told a more complicated story. XGBoost achieved an AUC of 0.945 and a Brier score of 0.067 with a non-significant Hosmer–Lemeshow test (P = 0.350), but its sensitivity at the fixed threshold of 0.829 was only 0.389, missing 11 of 18 ulcer cases. LightGBM posted the lowest Brier score of all four models at 0.064, yet its sensitivity collapsed to just 0.056, correctly identifying a single ulcer patient. Random forest landed in between, with an AUC of 0.943, sensitivity of 0.889, and specificity of 0.879. Meanwhile, logistic regression, despite its stellar discrimination, showed statistically significant calibration lack of fit on the Hosmer–Lemeshow test (P = 0.001). The authors conclude that no model was uniformly superior across discrimination, calibration, and threshold-dependent sensitivity, a candid assessment that departs from the usual habit of crowning a single winner.
To open the black box, the team applied SHAP (SHapley Additive exPlanations) analysis to the XGBoost model. The five most influential predictors by mean absolute SHAP value were ANLR (1.787), HbA1c (0.900), HALP (0.473), age (0.297), and SII (0.271), followed by the ankle–brachial index, diabetes duration, NPAR, neutrophil percentage, CRP, and HDL cholesterol. Higher HbA1c and SII values generally pushed predictions toward greater risk, while ANLR and HALP showed more complex, nonlinear patterns in partial dependence analysis. The authors are careful to stress that these attributions are model-specific: because ANLR, HALP, SII, and NPAR are mathematically built from overlapping neutrophil, lymphocyte, albumin, hemoglobin, and platelet components, their apparent importance may reflect shared information rather than independent biological effects, and SHAP rankings in the presence of correlated features should never be read as causal statements.
The limitations are laid out with unusual thoroughness. The study was single-center and retrospective, so generalizability across hospitals, laboratory platforms, and populations remains untested. The validation cohort contained only 18 ulcer events, making every performance estimate fragile; the classification of a handful of patients could shift the numbers substantially. Established foot-risk variables such as prior ulcers, neuropathy severity, foot deformity, plantar pressure, skin condition, and infection status were not incorporated, meaning the models may partly be detecting an already-evident high-risk inflammatory, nutritional, or vascular state rather than providing genuinely early prediction. Reverse causation also cannot be excluded, since admission blood drawn within 48 hours could have been influenced by subclinical, unrecognized foot pathology. An exploratory Youden-index analysis in the validation data suggested logistic regression could reach 94.4 percent sensitivity and 94.7 percent specificity at a threshold near 0.542, but the authors flag that this optimization used validation data and is therefore not externally generalizable.
The bottom line is a study that demonstrates promise while refusing to overclaim. Admission-based models built from cheap, routinely available blood work did show high observed discrimination for in-hospital diabetic foot ulcer risk in this cohort, and the inflammatory–nutritional composite indices, particularly ANLR and HALP, emerged as central to the model’s reasoning. But the authors explicitly state that the models are not ready for clinical deployment: LightGBM and XGBoost should not be treated as screening tools at their current thresholds, prospective multicenter validation with complete foot-risk phenotyping, formal assessment of predictor redundancy, threshold and probability recalibration, and clinical-impact trials are all required first. Until then, the study stands as a methodological template, showing how temporal splitting, fixed thresholds, calibration analysis, and explainability can be combined to evaluate a prediction model honestly, and as a reminder that in clinical prediction, a high AUC is only the beginning of the conversation, not the end.
Subject of Research: Machine learning prediction of in-hospital diabetic foot ulcer in type 2 diabetes using inflammatory–nutritional composite indices
Article Title: Development and temporal validation of an explainable machine learning model for predicting in-hospital diabetic foot ulcer in patients with type 2 diabetes using inflammatory–nutritional composite indices
Article References: Wang, X., Li, C., Tuo, Y., Zhao, B., Xiahati, A., Fan, L., & Wahafu, P. (2026). Development and temporal validation of an explainable machine learning model for predicting in-hospital diabetic foot ulcer in patients with type 2 diabetes using inflammatory–nutritional composite indices. Frontiers in Medicine, 13, 1938429. https://doi.org/10.3389/fmed.2026.1938429
Image Credits: AI Generated
DOI: 10.3389/fmed.2026.1938429
Keywords: diabetic foot ulcer, type 2 diabetes, machine learning, inflammatory biomarkers, nutritional status, SHAP, temporal validation, XGBoost, LightGBM, logistic regression, risk prediction, hospitalized patients
Cite Scienmag News
Teresa Odom. (October 23, 2026). Simple Blood Ratios and Machine Learning Flag Hospital Diabetic Foot Ulcer Risk. Scienmag. https://scienmag.com/simple-blood-ratios-and-machine-learning-flag-hospital-diabetic-foot-ulcer-risk/
Teresa Odom. "Simple Blood Ratios and Machine Learning Flag Hospital Diabetic Foot Ulcer Risk." Scienmag, 23 October 2026, https://scienmag.com/simple-blood-ratios-and-machine-learning-flag-hospital-diabetic-foot-ulcer-risk/. Accessed 23 October 2026.
Teresa Odom. "Simple Blood Ratios and Machine Learning Flag Hospital Diabetic Foot Ulcer Risk." Scienmag. October 23, 2026. https://scienmag.com/simple-blood-ratios-and-machine-learning-flag-hospital-diabetic-foot-ulcer-risk/








