Machine learning-based prediction model for post-ERCP cholangitis in patients with malignant biliary obstruction: a
Hengwei Jin1, Xu Sun1,2, Chang Fu1
1Department of Hepatobiliary and Pancreatic Surgery, General Surgery Center, First Hospital of Jilin University, No. 71, Xinmin Street, Changchun, Jilin Province, China.
Surgical Endoscopy
|July 9, 2025
Summary
This study developed an interpretable machine learning model to predict post-ERCP cholangitis (PEC) risk in patients with malignant biliary obstruction (MBO). The XGBoost model accurately identifies high-risk patients, aiding in personalized treatment and improved outcomes.
Area of Science:
- Gastroenterology and Hepatology
- Medical Informatics
- Oncology
Background:
- Endoscopic retrograde cholangiopancreatography (ERCP) is a key palliative treatment for unresectable malignant biliary obstruction (MBO).
- Post-ERCP cholangitis (PEC) significantly impacts MBO patient survival.
- Accurate prediction of PEC risk is vital for individualized treatment and improved prognosis, yet no clinical predictive models currently exist.
Purpose of the Study:
- To develop and validate an interpretable machine learning (ML) prediction model for post-ERCP cholangitis (PEC) risk.
- To utilize multicenter cohorts for robust model development and validation.
- To provide a tool for early identification of high-risk MBO patients.
Main Methods:
- Data from 1026 MBO patients (training/internal test) and 395 (external validation) were analyzed.
- Six ML methods were employed to construct prediction models, with XGBoost selected for its superior performance.
- The SHapley Additive exPlanation (SHAP) method was used for model interpretability.
Main Results:
- The incidence of PEC was 9.5% (135/1421) among MBO patients.
- Independent risk factors for PEC included radiofrequency ablation, elevated white blood cell count, moderate jaundice, and abnormal serum amylase.
- The XGBoost model demonstrated strong predictive performance (AUC: 0.9654 training, 0.7670 internal, 0.7270 external) with good calibration and clinical net benefit.
Conclusions:
- An interpretable XGBoost model was successfully developed and validated using multicenter data to predict PEC risk in MBO patients.
- The model enables clinicians to identify high-risk patients preoperatively.
- This facilitates individualized treatment strategies, ultimately aiming to improve patient prognosis.
Keywords:
InterpretabilityMachine learningMalignant biliary obstructionPost-ERCP cholangitisPrediction model

