Abstract
OBJECTIVE: Urosepsis is a leading cause of perioperative mortality after upper urinary tract stone surgery. This study aimed to develop a simple and accurate predictive model for postoperative sepsis by integrating laboratory parameters using machine learning (ML) and the Shapley Additive Explanations (SHAP) algorithm. METHODS: Data from 7,464 patients were analyzed, including 155 pre- and postoperative features. Key variables were selected using Least Absolute Shrinkage and Selection Operator (LASSO) regression and correlation analysis. Eight ML algorithms were employed to develop the predictive model using 10-fold cross-validation. The model’s performance was assessed using Receiver Operating Characteristic curve, learning curve, calibration plot, and decision curve. The SHAP algorithm was employed to analyze variable importance. Finally, the model was converted into a publicly accessible application. RESULTS: 116 out of 155 variables (74.84%) differed significantly between the urosepsis (n = 622, 8.33%) and non-urosepsis groups (n = 6,842, 91.67%). LASSO regression identified eight predictive variables: postoperative IL-6, SAA, PCT/ALB, NLPR, PT, ALB, HCT, and neutrophil. Light Gradient Boosting Machine achieved the best performance, with AUCs of 1.0, 0.90, and 0.88 for the training, validation, and test cohorts, respectively. A good model fit, strong calibration, and positive clinical utility were confirmed by the learning curve, calibration plot, and decision curve. Postoperative PCT/ALB, neutrophil, IL-6, ALB, and PT were identified as key predictors by the SHAP algorithm. A publicly accessible web application was developed to facilitate both patients and physicians (https://www.xsmartanalysis.com/model/list/predict/model/html?mid=29648&symbol=71lphm763138mj895nd8). CONCLUSIONS: A robust, interpretable model based on postoperative laboratory biomarkers was successfully developed and validated. This model exhibits excellent predictive performance and clinical utility, and the integration of SHAP analysis provides transparent insights into the key drivers of urosepsis, offering a practical tool for early risk stratification and personalized intervention in clinical practice. TRIAL REGISTRATION: Prospective registered in the Chinese Clinical Trial Registry (trial registration number: ChiCTR2400079409, date of registration: 2024-01-03). CLINICAL TRIAL REGISTRATION: This study was registered with the Chinese Clinical Trial Registry on January 3, 2024 (ChiCTR2400079409, http://www.chictr.org.cn/). SUPPLEMENTARY INFORMATION: The online version contains supplementary material available at 10.1186/s12911-025-03314-y.