Early mortality prediction in upper gastrointestinal bleeding using explainable machine learning: comparison with established clinical risk scores
Abstract
Early risk stratification in upper gastrointestinal bleeding (UGIB) is essential for emergency department (ED) triage, treatment planning, and mortality reduction. Although conventional clinical scores are widely used, they may not fully capture complex nonlinear interactions among physiological, laboratory, and comorbidity-related predictors. This study evaluated whether explainable machine-learning (ML) models could predict 30-day mortality in UGIB and compared their performance with established clinical risk scores. This retrospective single-center cohort study included 719 adult ED presentations with UGIB between January 1, 2015, and January 1, 2026. The primary outcome was all-cause 30-day mortality. ML models were developed using two predictor sets: an early ED predictor set, and a Full model predictor set incorporating transfusion and endoscopic findings. Logistic regression, random forest, gradient boosting, XGBoost, and LightGBM models were evaluated using five-fold stratified group cross-validation. Model performance was assessed using AUROC, AUPRC, F1 score, Brier score, calibration analysis, and decision curve analysis, and compared with the Glasgow-Blatchford Score, Rockall score, AIMS65, and ABC score. Parsimonious models were developed using regularized feature selection, and SHAP analysis was used for model interpretation. Among 719 ED presentations, 53 (7.4%) were associated with 30-day mortality. The ED XGBoost model showed the highest AUROC and AUPRC among the prespecified ED and Full models, with an AUROC of 0.789, AUPRC of 0.294, F1 score of 0.355, and Brier score of 0.061. Its performance was similar to the Full XGBoost model. Among traditional scores, ABC showed the highest AUROC (0.742), but the AUROC difference between ED XGBoost and ABC was not statistically significant. A 15-variable Minimal ED XGBoost model achieved an AUROC of 0.814 in exploratory analysis and 0.765 in fully nested sensitivity analysis. SHAP analysis identified lymphocyte count, lactate, potassium, C-reactive protein, respiratory rate, albumin, platelet count, glucose, hemoglobin, and Glasgow Coma Scale as key predictors. Machine-learning models based on routinely available ED data showed favorable internal-validation performance for predicting 30-day mortality in UGIB, with numerically higher or comparable discrimination and favorable calibration and decision-curve findings relative to established clinical risk scores. A parsimonious explainable ED XGBoost model may warrant further evaluation as an approach to early risk stratification; however, independent external validation is required before clinical implementation.