Application of machine learning to predict postoperative gastrointestinal bleed in bariatric surgery

Surg Endosc. 2023 Sep;37(9):7121-7127. doi: 10.1007/s00464-023-10156-0. Epub 2023 Jun 13.

Abstract

Background: Postoperative gastrointestinal bleeding (GIB) is a rare but serious complication of bariatric surgery. The recent rise in extended venous thromboembolism regimens as well as outpatient bariatric surgery may increase the risk of postoperative GIB or lead to delay in diagnosis. This study seeks to use machine learning (ML) to create a model that predicts postoperative GIB to aid surgeon decision-making and improve patient counseling for postoperative bleeds.

Methods: The Metabolic and Bariatric Surgery Accreditation and Quality Improvement Program (MBSAQIP) database was used to train and validate three types of ML methods: random forest (RF), gradient boosting (XGB), and deep neural networks (NN), and compare them with logistic regression (LR) regarding postoperative GIB. The dataset was split using fivefold cross-validation into training and validation sets, in an 80/20 ratio. The performance of the models was assessed using area under the receiver operating characteristic curve (AUROC) and compared with the DeLong test. Variables with the strongest effect were identified using Shapley additive explanations (SHAP).

Results: The study included 159,959 patients. Postoperative GIB was identified in 632 (0.4%) patients. The three ML methods, RF (AUROC 0.764), XGB (AUROC 0.746), and NN (AUROC 0.741) all outperformed LR (AUROC 0.709). The best ML method, RF, was able to predict postoperative GIB with a specificity and sensitivity of 70.0% and 75.4%, respectively. Using DeLong testing, the difference between RF and LR was determined to be significant with p < 0.01. Type of bariatric surgery, pre-op hematocrit, age, duration of procedure, and pre-op creatinine were the 5 most important features identified by ML retrospectively.

Conclusions: We have developed a ML model that outperformed LR in predicting postoperative GIB. Using ML models for risk prediction can be a helpful tool for both surgeons and patients undergoing bariatric procedures but more interpretable models are needed.

Keywords: Artificial intelligence; Bariatric surgery; MBSAQIP; Machine learning; Postoperative bleeding; Risk calculator.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Bariatric Surgery* / adverse effects
  • Gastrointestinal Hemorrhage / diagnosis
  • Gastrointestinal Hemorrhage / etiology
  • Humans
  • Logistic Models
  • Machine Learning*
  • Postoperative Hemorrhage / diagnosis
  • Postoperative Hemorrhage / etiology
  • Retrospective Studies