Machine learning prediction of adverse events during minutes 15–30 of recovery in patients event-free at 15 min after sedated gastrointestinal endoscopy - Siyuan Huang; Jiayao Zhang; Lu Yin; Meiyuan Luo; Anna Jia; Dihong Chen (Frontiers in Medicine, 2026)
Background Sedated gastrointestinal (GI) endoscopy is widely used for diagnosis and treatment but may be complicated by respiratory and hemodynamic adverse events (AEs) during post-anaesthesia recovery. Early risk identification may support targeted monitoring and efficient allocation of recovery-care resources. This study aimed to develop and internally evaluate machine-learning (ML) models for identifying respiratory and hemodynamic AEs occurring during 15–30 min after awakening following sedated GI endoscopy. Methods Consecutive patients undergoing sedated GI endoscopy at West China Hospital, Sichuan University, between September 2023 and April 2024 were enrolled. Predictors were selected using the Boruta algorithm. Six supervised ML models—decision tree (DT), random forest (RF), multilayer perceptron (MLP), support-vector machine (SVM), extreme gradient boosting (XGBoost), and light gradient boosting machine (LightGBM)—were trained and evaluated. Performance was assessed using the area under the receiver operating characteristic curve (ROC-AUC), area under the precision-recall curve (PR-AUC), Brier score, calibration intercept and slope, calibration plots, classification metrics, and decision-curve analysis (DCA). SHapley Additive exPlanations (SHAP) were used to interpret the final model. Results Among 1,070 included patients, 103 (9.6%) experienced the prespecified AE outcome. XGBoost achieved the highest cross-validated training ROC-AUC of 0.971 (95% CI, 0.956–0.986) and a ROC-AUC of 0.910 (95% CI, 0.834–0.987) in the independent validation set. The validation PR-AUC and Brier score were 0.815 and 0.076, respectively; the calibration intercept was −1.760 and the slope was 1.480. The final model included heart-rate change, SpO 2 change, baseline mean arterial pressure, sufentanil dose, and intra-procedural metaraminol use. SHAP analysis quantified each predictor's contribution to model output but was not interpreted as evidence of causality or clinical modifiability. Conclusions XGBoost showed promising discrimination for identifying respiratory and hemodynamic AEs during early recovery. However, prospective studies with temporally separated predictor and outcome windows and external validation are required before clinical implementation.