**3. AI and surgical safety: predicting and preventing complications following bariatric metabolic surgery**

Bariatric operations have a favorable safety profile, with an overall morbidity less than 5% and mortality less than 0.5%, as it has been documented over time by different investigators, based on data from large databases and comprehensive meta-analyses [14–20]. Most importantly, this holds true even for special populations, such as patients suffering from diabetes [21] or at the extremes of age [22, 23]. Even during the COVID-19 pandemic, not only has bariatric surgery proven its endurable safety, but it may also have a protective effect for one of the most vulnerable population groups against the adverse sequelae of SARS-CoV-2 [24, 25], as shown in a series of publications by the GENEVA collaborative group regarding 7704 patients from 42 countries [26–30]. Due to the fact that complications and deaths following BMS are rare events, their evaluation from a statistical perspective is challenging. Thanks to artificial intelligence algorithms, it is now possible to incorporate and analyze data from big databases and cohorts of patients, with the advantage of yielding reliable results from imbalanced datasets, as well as having access to real-word conditions rather than idealized simulations, as is the case with randomized controlled trials. Besides, the concept of implementing AI algorithms in order to quantify and predict postoperative outcomes, with the intention to enhance clinical practice and improve decision-making, is gaining popularity within surgical literature [31–33].

Cao et al. pioneered research in prediction of serious complications after BMS by implementing machine learning [34], as well as deep learning methods [35], in a Scandinavian bariatric database (SOReg) comprising more than 40,000 bariatric patients. In their extensive analyses, they compared multiple machine and deep learning algorithms (as well as combinations of algorithms, *aka* ensembles), respectively, and they found that the latter had better predictive accuracy, along with the fact that ensemble algorithms had better performance than baseline ones. Additionally, in order to overcome the obstacle of imbalanced data secondary to the

#### *Current and Potential Applications of Artificial Intelligence in Metabolic Bariatric Surgery DOI: http://dx.doi.org/10.5772/intechopen.106365*

low occurrence of complications, they applied the synthetic minority oversampling technique (SMOTE). SMOTE is a method of artificially augmenting underrepresented groups (such as patients with postoperative complications) and thus yield data eligible for classification. In a similar manner, Razzaghi et al. developed predictive models for bariatric surgery risks with imbalanced data by applying SMOTE on different classification algorithms, such as RF, bagging, and AdaBoost [36]. As a source of data, they utilized the Premier Healthcare Database, which gathers data from more than 700 hospitals across the United States. Again, their work showcased that ensemble classification was superior to isolated ML algorithms. Charles-Nelson followed a different strategy: in order to document the 30-day readmission rate, which is a reflection of short- and intermediate-term complications, they applied Formal Concept Analysis (FCA), a data mining technique, in a cohort of 196,323 bariatric patients according to the main principal diagnoses code at readmission [37]. Their most important finding was heterogeneity of severity of complications across different bariatric procedures.

There are two studies regarding prediction of complications after specific operations. Wise et al. applied a DL algorithm (ANN) on a cohort of 101,721 patients from the Metabolic and Bariatric Surgery Accreditation and Quality Improvement Program (MBSAQIP) who had undergone laparoscopic sleeve gastrectomy (LSG), in order to predict 30-day postoperative morbidity [38]. As compared with logistic regression, the ANN algorithm was more accurate in predicting postoperative complications, based upon easily obtainable demographic and clinical factors. Similarly, Sheikhtaheri et al. applied Clinical Decision Support System (CDSS) to predict morbidity after one-anastomosis gastric bypass (OAGB) across five hospitals over a 4-year period [39]. The predictive performance of the model at the 10-day, 1-month, and 3-months intervals was favorable.

Regarding specific complications, Dang et al. developed the BariClot tool, a forward regression predictive model, in order to stratify individuals undergoing BMS according to their 30-day risk for venous thromboembolic (VTE) events [40]. Their data were retrieved from the MBSAQIP and included patients who had undergone either RYGB or LSG. As compared with established predictive tools for VTE, such as the Michigan Bariatric Surgery Collaborative or the Caprini score, BariClot demonstrated enhanced predictive accuracy, as documented by the relevant AUROCs (0.5817 vs. 0.5533 vs. 0.6023, respectively). Moreover, Nudel et al. developed and validated three different machine/deep learning models (ANN, X-Gradient Boosting, logistic regression) in order to predict not only VTE, but also leaks after BMS, again based on a MBSAQIP cohort of 436,807 patients [41]. AI models outperformed traditional LR in detecting both leak and VTE in a statistically significant manner.

Finally, AI has also been implemented for predicting long-term morbidity after BMS, including the development of gallbladder disease and formation of gallstones [42], nutritional deficiencies [43], nonalcoholic fatty liver disease (NAFLD) [44], and fractures [45]. The implemented AI algorithms were ANN [42], SVM [44], and Bayesian networks [43, 45].

### **4. AI as a tool for predicting effectiveness of bariatric surgery**

Undoubtedly, the main and utmost priority of any bariatric operation is weight loss. It has been long established that any bariatric intervention is more effective and durable in maintaining weight loss than optimal conservative treatment and lifestyle modifications [46–53]. Data that support this statement stem from both observational and randomized controlled studies. Although the latter are prospective in nature and thus can establish causality, they may be accompanied by publication bias. On the contrary, observational studies contain raw data as they are collected according to healthcare providers' registrations and patient testimonials. As such, they can serve as an invaluable source of prediction, provided they undergo appropriate analysis with AI tools. Nevertheless, despite the accumulated experience and evidence with bariatric surgery and its effectiveness, to date there is no accurate tool for weight loss prediction, and most clinical models tend to overestimate the bariatric outcome of the most commonly performed procedures [54].

In one of the first relevant attempts, Lee et al. developed a predictive model back in 2007 with the use of a data mining technology through LR and ANN [55]. They found that ANN yields a better predictive accuracy for weight reduction at 2 years as compared with traditional methods, with the best predictors of successful weight loss being OAGB (vs. LAGB), high preoperative triglyceride level, and low glycated hemoglobin (HbA1c) level. Similarly, Giraud-Carrier et al. developed a predictive model with the use of a data-mining-based software available online [56]. The data mining process included problem formulation (prediction of the type of bariatric procedure and quality of its outcome); domain and data understanding (71,849 patients with >350,000 visits across 125 centers); data preparation and preprocessing (aka determination of input or predictors, i.e., physician ID, gender, age, ethnicity, employment status, smoking behavior, state of origin, BMI prior to surgery, surgery performed, and BMI at 12 months postoperatively); model building (multinomial logistic regression and decision tree C4.5); prediction of surgical procedure; prediction of success (classification into poor, fair, good, very good, and excellent if BMI reduction at 12 months was ≤5, 5–10, 10–15, 15–20, and >20, respectively). Although these studies were performed at an era when experience on bariatric surgery was more limited, the armamentarium of procedures was significantly different, benchmarking was inadequate, and definition of weight loss was not according to current standards (%TWL or %EBMIL or %EBMIL), the study designs showed a dynamic potential. More recent attempts have implemented different methodology (i.e., a rule-based semantic approach, [57]) or different input data (i.e., preoperative patient liking for sweet beverages, [58]) in order to predict bariatric surgery outcomes in general.

Other studies have focused on specific bariatric operations. For instance, Piaggi et al. found that ANN models could successfully predict weight loss in women treated with laparoscopic adjustable gastric banding (LAGB), although this method tends to be abandoned nowadays [59]. On the other hand, Celik et al. in a very recent study applied neural network Bayesian regularization, a DL algorithm, in patients who had undergone LSG and predicted excess and total weight loss (%EWL and %TWL, respectively) based on gastric remnant volumes (antrum and body were deemed as different compartments) [60]. Regarding RYGB, Wise ES *et al.* implemented an ANN model to predict excess weight loss by means of % reduction in BMI loss (%EBMIL) at 3 months and 1 year postoperatively [61]. On a more advanced level, Choudhury et al. implemented a Markov model so as to predict which modality of weight loss was more effective for patients with end-stage renal disease awaiting renal transplant [62]. Not surprisingly, RYGB was found to be more effective than aggressive diet and exercise with this regard.

*Current and Potential Applications of Artificial Intelligence in Metabolic Bariatric Surgery DOI: http://dx.doi.org/10.5772/intechopen.106365*
