Predicting infected pancreatic necrosis in acute pancreatitis using machine learning models and feature selection
Open Access
- 28 February 2026
- journal article
- research article
- Published by Springer Nature in Scientific Reports
- Vol. 16 (1)
Abstract
Infected pancreatic necrosis (IPN) is a life-threatening complication of acute pancreatitis (AP), and its early prediction remains challenging. This study aimed to develop and externally validate interpretable machine learning models for individualized IPN risk prediction. A total of 728 patients with AP admitted to Xuanwu Hospital, Capital Medical University, between 2017 and 2023 were retrospectively analyzed. Embedded feature selection was incorporated within model training using regularized linear and tree-based algorithms to enhance interpretability and prevent overfitting. Five machine learning algorithms and one neural network model were evaluated through nested cross-validation and an independent temporal external cohort consisting of 166 AP patients admitted to Xuanwu Hospital, Capital Medical University, between 2022 and 2023. Model discrimination, precision–recall, and probability calibration were assessed, and model explainability was analyzed using Shapley Additive Explanations (SHAP). The Random Forest model achieved the best overall performance, achieving an external AUC of 0.764 (95% CI 0.696–0.830, \(P < 0.001\)), precision of 0.893, recall of 0.604, and the lowest Brier score, indicating reliable probability calibration. SHAP analysis identified Fibrinogen, APACHE II score, D-dimer, IL-6, and C-reactive protein as key predictors associated with increased IPN risk, while higher Lymphocyte count, and Hematocrit were protective. These findings are consistent clinical pathophysiology. The interpretable Random Forest model demonstrated robust discrimination and calibration for IPN prediction, providing a transparent and data-driven framework for early risk stratification in acute pancreatitis. Prospective multicenter validation is warranted before clinical implementation.
Keywords
Funding Information
- Natural Science Foundation of Hebei Province (Grant No. H2024112019)
- Program of Xiongan New Area (Grant No. XA202401102001K)
This publication has 28 references indexed in Scilit:
- International Association of Pancreatology Revised Guidelines on Acute Pancreatitis 2025: Supported and Endorsed by the American Pancreatic Association, European Pancreatic Club, Indian Pancreas Club, and Japan Pancreas SocietyPancreatology, 2025
- Explainability enhanced liver disease diagnosis technique using tree selection and stacking ensemble-based random forest modelInformatics and Health, 2025
- Unveiling the black box: A systematic review of Explainable Artificial Intelligence in medical image analysisComputational and Structural Biotechnology Journal, 2024
- Infected pancreatic necrosis—Current trends in managementIndian Journal of Gastroenterology, 2024
- Advances in the management of acute pancreatitisNature Reviews Gastroenterology & Hepatology, 2023
- Explaining Eye Diseases Detected by Machine Learning Using SHAP: A Case Study of Diabetic Retinopathy and Choroidal NevusSN Computer Science, 2023
- Prediction of infected pancreatic necrosis in acute necrotizing pancreatitis by the modified pancreatitis activity scoring systemUnited European Gastroenterology Journal, 2022
- Early prediction of severe acute pancreatitis using machine learningPancreatology, 2022
- A comparison of APACHE II, BISAP, Ranson’s score and modified CTSI in predicting the severity of acute pancreatitis based on the 2012 revised Atlanta ClassificationGastroenterology Report, 2017
- Burden of Gastrointestinal Disease in the United States: 2012 UpdateGastroenterology, 2012