Clear Sky Science · en

Predicting infected pancreatic necrosis in acute pancreatitis using machine learning models and feature selection

· Back to index

Why this matters for patients and families

Severe attacks of inflammation in the pancreas can suddenly turn life-threatening when parts of the organ die and become infected. Doctors know this danger well, but today they still struggle to spot, in the first days of illness, which patients are heading toward this complication. This study shows how carefully designed computer models, trained on routine hospital data, can help doctors estimate that risk earlier and more accurately, potentially guiding treatment before infection takes hold.

Figure 1
Figure 1.

The hidden danger in a common emergency

Acute pancreatitis is one of the most frequent digestive emergencies worldwide. Many patients recover with supportive care, but a substantial minority develop serious problems such as fluid collections and areas of dead tissue in and around the pancreas. When these dead areas become infected – a condition called infected pancreatic necrosis – the risk of organ failure, long hospital stays, and death rises sharply. Because infection usually appears days after hospital admission, clinicians are searching for ways to recognize high-risk patients early, using information available in the first hours and days.

Old scoring charts versus new smart tools

Hospitals already use several scoring charts to judge how sick a pancreatitis patient is, such as APACHE II, BISAP, and CT-based severity indexes. These tools combine vital signs, lab tests, and imaging findings into a single number. While helpful, they were not built specifically to predict infected necrosis and often miss patients who later deteriorate. In contrast, modern machine learning can sift through many more variables at once, capturing subtle patterns and interactions that human-designed scores overlook. Earlier research applied such techniques to overall disease severity but rarely to infection of necrotic tissue, and often lacked rigorous testing on separate patient groups or clear explanations of how the models made their predictions.

Building a data-driven early warning system

The authors analyzed records from 728 adults admitted with a first episode of acute pancreatitis at a major Chinese hospital between 2017 and 2023, after excluding patients without early imaging or blood tests and those with other complicating conditions. Most measurements, including blood counts, markers of inflammation and clotting, and clinical scores, were collected within 24 hours of admission and always before any diagnosis of infected necrosis. The researchers trained six different prediction models, including several tree-based methods, a neural network, and traditional linear approaches. To avoid overfitting, they used a strict form of cross-checking in which each model repeatedly trained on one slice of the data and was tested on another, while automatically selecting only the most informative features. They then froze the best versions of each model and evaluated them on a completely separate, later group of 166 patients admitted in 2022–2023.

Figure 2
Figure 2.

What the computer learned about infection risk

Across models, the tree-based approaches – especially random forests – delivered the strongest and most reliable predictions for who would develop infected necrosis. The best random forest model clearly outperformed the widely used APACHE II score, distinguishing high- from low-risk patients with higher accuracy and better-calibrated risk probabilities. To open the “black box,” the team used a technique called SHAP that assigns each patient’s prediction to specific input features. This analysis highlighted certain blood markers of clotting and inflammation – including fibrinogen, D-dimer, interleukin-6, and C-reactive protein – alongside the APACHE II score itself as strong warning signs. In contrast, higher lymphocyte counts and healthier blood concentration and kidney markers appeared protective. These patterns matched existing medical knowledge about how severe inflammation, disturbed blood flow, and weakened immunity pave the way for infection in damaged pancreatic tissue.

From research tool to bedside support

The study suggests that an interpretable random forest model, built from lab tests and clinical information that hospitals already collect, could serve as an early warning tool for infected pancreatic necrosis. Such a system would not replace clinical judgment, but could flag patients who might benefit from closer monitoring, repeat imaging, early transfer to intensive care, or more cautious use of antibiotics and procedures. Because the work comes from a single referral center and relies on past data, it still needs to be confirmed and fine-tuned across multiple hospitals and patient populations. If those future studies are successful, this kind of transparent, data-driven risk calculator could become part of everyday care for people admitted with acute pancreatitis, helping doctors act sooner and more precisely when the stakes are highest.

Citation: Xin, L., Yixuan, D., Bohan, H. et al. Predicting infected pancreatic necrosis in acute pancreatitis using machine learning models and feature selection. Sci Rep 16, 11338 (2026). https://doi.org/10.1038/s41598-026-38410-0

Keywords: acute pancreatitis, infected pancreatic necrosis, machine learning, clinical risk prediction, random forest