DOI: 10.1097/js9.0000000000005685 ISSN: 1743-9159

AI-based prediction of gallstone formation after bariatric surgery: insights into BMI thresholds and metabolic risk profiles

Özlem Beydaş, Gülsüm Arı, Abdullah K. Zengin, Pelin Şengüder, Melissa S. Duran, Ahmet M. Dobrucalı

Background:

Gallstone formation is a common postoperative outcome of bariatric surgery, influenced by factors beyond weight loss, such as lipid metabolism and metabolic status. This study aimed to identify predictos of clinically detected postoperative cholelithiasis and develop an artificial intelligence (AI) model integrating clinical and biochemical data.

Methods:

This retrospective study included 383 patients who underwent sleeve gastrectomy, Roux-en-Y gastric bypass, or one-anastomosis gastric bypass between May 2016 and April 2025. Patients with prior or concomitant cholecystectomy were excluded. Clinical, anthropometric, and laboratory parameters were analyzed. Eleven machine learning algorithms were compared, and SHapley Additive exPlanations (SHAP) analysis was used for model explainability and cut-off determination. An additional leakage-free sensitivity analysis was performed using an untouched test set consisting exclusively of original patient records.

Results:

Clinically detected postoperative cholelithiasis was diagnosed in 67 patients (17.5%). Preoperative body mass index (BMI) was higher in patients who developed gallstones ( P = 0.019), whereas postoperative BMI was significantly lower in the gallstone group ( P = 0.047). SHAP identified two critical postoperative BMI cut-offs: 24.7 (95% CI, 23.4–25.0) and 26.2 (95% CI, 25.6–27.6). Values below 24.7 and above 26.2 were associated with greater gallstone risk, suggesting a U-shaped relationship. Preoperative triglyceride levels were significantly higher in patients who developed gallstones ( P = 0.032). Furthermore, among patients with postoperative BMI > 26.2, preoperative triglyceride levels remained significantly higher in the gallstone group ( P = 0.047). The XGBoost model achieved the best predictive performance in the original analysis (area under the receiver operating characteristic curve [AUROC] = 0.89, accuracy = 0.80, F1-score = 0.81). In the leakage-free sensitivity analysis, XGBoost achieved an AUROC of 0.7933 in the untouched test set, with a sensitivity of 76.9%.

Conclusion:

Gallstone formation after bariatric surgery appears to be influenced by both weight-loss dynamics and metabolic complexity. A postoperative BMI > 26.2 kg/m 2 with elevated triglycerides identifies an exploratory high-risk profile, and the AI model provides an exploratory framework for personalized risk stratification.

More from our Archive