Cardiovascular

Prediction of venous thromboembolism after metabolic and bariatric surgery using machine learning approach: a MBSAQIP study.

TL;DR

Machine learning models predicting venous thromboembolism after metabolic and bariatric surgery showed improved performance when incorporating time-aware postoperative complication variables, with reoperation identified as the strongest postoperative predictor of VTE.

Key Findings

The study included 2,198 VTE cases and 698,284 non-VTE cases from the MBSAQIP database from 2020 to 2023.

  • Data were drawn from the MBSAQIP (Metabolic and Bariatric Surgery Accreditation and Quality Improvement Program) database spanning 2020 to 2023.
  • VTE cases numbered 2,198 compared to 698,284 non-VTE cases, indicating a highly imbalanced dataset.
  • Five machine learning algorithms were applied: XGBoost, random forest classifiers, support vector machines (SVMs), artificial neural networks (ANNs), and logistic regression.

All machine learning models excluding postoperative complications showed moderate predictive performance for VTE after metabolic and bariatric surgery, with AUC values ranging from 0.649 to 0.669.

  • XGBoost achieved an AUC of 0.668 in the model excluding complications.
  • Random forest classifier achieved an AUC of 0.660 in the model excluding complications.
  • SVM achieved the lowest AUC of 0.649 in the model excluding complications.
  • ANN achieved an AUC of 0.657 and logistic regression achieved an AUC of 0.669 in the model excluding complications.

Including time-adjusted postoperative complication variables improved predictive performance across all machine learning models.

  • XGBoost AUC improved from 0.668 to 0.680 when including time-adjusted complications.
  • ANN showed the largest improvement, with AUC increasing from 0.657 to 0.697.
  • Logistic regression AUC improved from 0.669 to 0.690.
  • SVM AUC improved from 0.649 to 0.666 and random forest improved from 0.660 to 0.664.
  • The time-aware complication variables were engineered to include only complications that occurred before the VTE event.

The need for reoperation was identified as the strongest postoperative predictor of VTE after metabolic and bariatric surgery.

  • Reoperation was ranked as the strongest postoperative predictor of VTE across models that included time-adjusted complication variables.
  • Other significant postoperative predictors included prolonged length of stay, ICU admission, reintervention, organ-space surgical site infection, sepsis, and anastomotic leak.
  • These variables were engineered to be time-aware, meaning only complications occurring prior to VTE were included to avoid data leakage.

Postoperative complications and prolonged length of stay were strongly associated with VTE after metabolic and bariatric surgery.

  • Prolonged length of stay was identified as one of the key postoperative predictors of VTE.
  • ICU admission, reintervention, organ-space surgical site infection, sepsis, and anastomotic leak were also identified as postoperative predictors.
  • The authors suggest that 'patients with these risk factors may benefit from enhanced prophylactic strategies.'

Prior predictive models for VTE after metabolic and bariatric surgery had not incorporated complications that increase VTE risk, which this study addressed through time-aware feature engineering.

  • The authors noted that 'none have incorporated complications that increase VTE risk' in previously developed predictive models.
  • The study engineered time-aware postoperative complication variables specifically designed to include only complications that occurred before the VTE event.
  • This methodological innovation was applied to distinguish causal postoperative factors from concurrent or subsequent events.

What This Means

This research suggests that machine learning models can be used to predict blood clots in the veins (venous thromboembolism, or VTE) after weight loss surgery, and that these models work better when they account for complications that happen after surgery but before the clot occurs. Using data from over 700,000 patients who underwent bariatric or metabolic surgery between 2020 and 2023, the researchers tested five different types of computer-based prediction algorithms. They found that all models performed moderately well, but their accuracy improved when post-surgical complications — such as the need for a repeat operation, ICU admission, infection, sepsis, and anastomotic leak — were factored in. The most important finding was that needing a reoperation after bariatric surgery was the strongest predictor of developing a dangerous blood clot. Other important risk factors included a longer-than-expected hospital stay, admission to the intensive care unit, and serious infections. These findings highlight that patients who experience a rocky recovery after weight loss surgery may be at substantially higher risk for VTE and might need more aggressive preventive treatments, such as blood thinners or compression devices. This research matters because VTE — which includes deep vein thrombosis and pulmonary embolism — can be life-threatening, and identifying who is most at risk could help doctors intervene earlier. The novel approach of using time-aware complication variables (only counting complications that happened before the clot formed) is a methodological improvement over prior models and may help clinicians better tailor preventive strategies to individual patients following bariatric surgery.

Have a question about this study?

Citation

Esparham A, Babaei R, Cheng S, Zhao S, Khorgami Z. (2026). Prediction of venous thromboembolism after metabolic and bariatric surgery using machine learning approach: a MBSAQIP study.. Surgical endoscopy. https://doi.org/10.1007/s00464-026-12799-1