Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Aug 12:12:1638097.
doi: 10.3389/fmed.2025.1638097. eCollection 2025.

Machine learning-based predictive model for acute pancreatitis-associated lung injury: a retrospective analysis

Affiliations

Machine learning-based predictive model for acute pancreatitis-associated lung injury: a retrospective analysis

Zhaohui Du et al. Front Med (Lausanne). .

Abstract

Background: Acute Pancreatitis-Associated Lung Injury (APALI) is one of the most severe and life-threatening systemic complications in acute pancreatitis patients, with high rates of morbidity and mortality. This study aims to develop a prediction model for the diagnosis of APALI based on machine learning algorithms.

Methods: This study included data from the First Affiliated Hospital of Bengbu Medical College (July 2012 to June 2022), which were randomly categorized into the training and testing set. And data from the Second Affiliated Hospital of Zhejiang University (January 2018 to April 2023) served as the external validation set. LASSO regression was applied to eliminate irrelevant or highly collinear independent variables. Six machine learning models were constructed, with evaluation metrics including Area Under Curve (AUC), accuracy, sensitivity, specificity, F1 score, and recall. The impact of model features was analyzed using SHapley Additive exPlanations (SHAP).

Results: A total of 1,975 patients with acute pancreatitis were randomly assigned to a training set (1,480 patients) and a testing set (495 patients). In the training set, 480 cases (32.43%) were diagnosed with APALI. The eXtreme Gradient Boosting (XGBoost) and Random Forest (RF) models demonstrated the best predictive performance, achieving the highest AUC (0.92 and 0.914, respectively), along with higher accuracy, F1 score, and recall in the testing set. Six particularly influential factors were identified and ranked as follows: CRP, BMI, neutrophil, calcium, lactate, and neutrophil-to-albumin ratio (NAR). The global interpretability of the XGBoost and RF models, along with these six features, is shown in the SHAP summary plot. These two models were selected as the optimal models for the development of an online calculator for clinical applications and risk stratification.

Conclusion: We developed and internally validated a machine learning model to predict APALI, showing strong performance in our study population. To support further research and clinical use, we created an open-access web-based risk calculator. Prospective multicenter validation is needed to confirm generalizability. If successful, the tool may support early risk identification and guide interventions to prevent APALI.

Keywords: SHAP; acute pancreatitis (AP); lung injury; machine learning; prediction model.

PubMed Disclaimer

Conflict of interest statement

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Figures

Figure 1
Figure 1
Screening and research process for acute pancreatitis-related lung injury.
Figure 2
Figure 2
(a) LASSO coefficient profiles for texture features. (b) Selection of tuning parameter λ via 10-fold cross-validation in LASSO penalized logistic regression.
Figure 3
Figure 3
Performance comparison of machine learning models. (a–f) Bar plots or metrics distributions (AUC, accuracy, F1 score, recall, sensitivity, specificity) across models. (g) Receiver operating characteristic (ROC) curves for each model in the testing set.
Figure 4
Figure 4
(a–c) Global interpretability of top-performing models (XGBoost, RF, LR) via SHAP. Summary plots rank the top 10 clinical features by mean absolute SHAP values, indicating their predictive contribution to APALI. Key features are CRP, neutrophil count, NAR, BMI, calcium ions, lactate, age, CT grade, lymphocytes (Lym), blood amylase, and pleural effusion.
Figure 5
Figure 5
Performance evaluation of simplified models (XGBoost, RF, LR) using six key predictors (CRP, BMI, neutrophil count, calcium ions, lactate, NAR). (a) ROC curves demonstrating maintained predictive accuracy for XGBoost, RF, LR model despite feature reduction. (b–d) Calibration curves assessing agreement between predicted probabilities and observed outcomes, with closer-to-diagonal curves indicating better reliability.
Figure 6
Figure 6
Global interpretability of the simplified XGBoost (a) and RF (b) models using SHAP summary plots.
Figure 7
Figure 7
Case examples demonstrating model interpretability and clinical correlation. (a,b) SHAP force plots showing low-risk prediction scores for a non-APALI case. (c–e) Corresponding abdominal (c) and chest (d,e) CT images demonstrating absence of pulmonary abnormalities. (f,g) SHAP force plots of an APALI case with high-risk prediction. (h–j) Confirmatory CT findings showing abdominal (h) and chest (i,j) imaging with characteristic lung consolidation and pleural effusion, validating the model’s predictive accuracy.
Figure 8
Figure 8
Web-based clinical decision support tool for APALI risk prediction. Screenshot of the interactive interface showing input parameters (CRP, BMI, neutrophil count/albumin, calcium, lactate) and real-time risk calculation. Example output displaying predicted APALI probability with interpretative guidance. The tool is publicly available at: https://yyiyis.shinyapps.io/APALI/.

Similar articles

References

    1. Avery B, Nathens J, Randall C, Richard J. Management of the critically ill patient with severe acute pancreatitis – ScienceDirect. Reanimation. (2005) 14:148–50. doi: 10.1097/01.ccm.0000148222.09869.92 - DOI
    1. Li XY, He C, Zhu Y, Lu NH. Role of gut microbiota on intestinal barrier function in acute pancreatitis. World J Gastroenterol. (2020) 26:2187–93. doi: 10.3748/wjg.v26.i18.2187, PMID: - DOI - PMC - PubMed
    1. Petrov MS, Yadav D. Global epidemiology and holistic prevention of pancreatitis. Nat Rev Gastroenterol Hepatol. (2019) 16:175–84. doi: 10.1038/s41575-018-0087-5, PMID: - DOI - PMC - PubMed
    1. Schepers NJ, Bakker OJ, Besselink MG, Ahmed Ali U, Bollen TL, Gooszen HG, et al. Impact of characteristics of organ failure and infected necrosis on mortality in necrotising pancreatitis. Gut. (2019) 68:1044–51. doi: 10.1136/gutjnl-2017-314657, PMID: - DOI - PubMed
    1. Sousa MARD, Teixeira GDS, Marquesa RB, Sousa LMRD, Ramos RM, Bento RRDF, et al. Therapeutic actions of methyl eugenol in acute lung inflammation induced in rats. S Afr J Bot. (2024) 169:341–9. doi: 10.1016/j.sajb.2024.04.023 - DOI

LinkOut - more resources