**5. AI as a tool for diagnosing and predicting resolution of obesity-associated medical problems after bariatric metabolic surgery**

Apart from weight loss, MBS is associated with the alleviation of the long-term effects of associated medical problems (or comorbidity, as they were collectively referred to until recently), namely type 2 diabetes mellitus (T2DM), hypertension (HTN), nonalcoholic fatty liver disease (NAFLD), and nonalcoholic steatohepatitis (NASH), obstructive sleep apnea (OSA), dyslipidemia, end-stage renal disease (ESRD), depression, etc. Most importantly, some of these health problems have been recognized as dedicated indications for MBS, irrespective of BMI [63]. The rationale of this is supported by high-quality evidence on the superiority of surgical management vs. intensive medical therapy [64, 65]. Regarding T2DM in particular, the evidence is solid and stems from cohorts with long-term perspective surveillance [66–69], to the point that they have substantially contributed to the establishment of the concept of metabolic surgery in clinical practice [70, 71].

The advent of AI has introduced novel methods of predicting long-term remission of obesity-associated medical problems based on real-world data. In a recent comprehensive relevant study, Cao et al. compared three different AI models (Gaussian Bayesian Network – GBN, CNN, and traditional linear regression) in predicting 5-year remission of T2DM, dyslipidemia, HTN, OSA, and depression from data extracted from the large SOReg database concerning 6542 patients [72]. Among the examined algorithms, GBN showed excellent performance in predicting long-term remission of T2DM (AUC 0.942) and dyslipidemia (AUC 0.917), good performance for HTN (AUC 0.891) and OSA (AUC 0.843), and fair performance in predicting depression (AUC 0.750). On the other hand, van Loon et al. devised the Metabolic Health Index (MHI) to objectively quantify metabolic health, in analogy to BMI as an index for quantifying weight, and consequently developed an ordinal logistic regression model in order to quantify severity of comorbidity in a 6-grade scale [73]. As a scaffold, they used 4778 data records from 1595 patients and highyield predictors included age, estimated glomerular filtration rate (eGFR), HbA1c, triglycerides, and potassium.

Regarding specific conditions, T2DM has been the most studied obesity-associated health problem with regard to AI algorithms so far. Lee et al. ran a series of multi-centric studies with the aim to investigate the effectiveness of BMS in T2DM resolution, as well as to predict short- and long-term T2DM remission after BMS [74–76]. Their analysis was performed by means of back propagation neural networks (BPN), a type of ANN, and important predictors of T2DM remission included younger patient age, shorter T2DM duration, higher weight, wider waist, higher C-peptide levels, and bypass operation (vs. restrictive one). A few years later, another group investigated the role of the advanced-Diabetes Remission (ad-DiaRem) score in improving the prediction of T2DM remission following RYGB [77, 78]. DiaRem is a valid prediction score for T2DM remission that relies on variables such as age, HbA1c, treatment with insulin, treatment with oral hypoglycemics other than metformin and classifies patients into five subgroups according to their probability of remission [79–81]. Ad-DiaRem has two additional parameters (diabetes duration and number of glucoselowering agents). The group of Aron-Wisnewsky, Debédat et al. analyzed Ad-DiaRem with the use of machine learning and devised a 1-year algorithm with enhanced predictive accuracy as compared with the original score, which yielded a corrected classification for 8% of those misclassified with DiaRem [77]. The same team used

ML methods to extend the predictive accuracy to 5 years post-RYGB, with the correct re-classification rate reaching 33% [78]. Consequently, AI can be implemented not only as a novel method, but also in order to improve established clinical tools.

At a more advanced level, Aminian et al. utilized ML in order to predict long-term end-organ complications owing to T2DM (in particular all cause-mortality, coronary artery events, heart failure, and nephropathy) in patients who did or did not undergo metabolic surgery [82]. A total of 2287 T2DM patients who had undergone metabolic operations were matched with 11,435 non-surgical diabetic patients. Analysis was performed by means of multivariable regression and random forest and data were uploaded by patients through user-friendly web-based and smartphone applications in an Individualized Diabetes Complications (IDC) risk score environment for clinical use. This is one of the most useful applications of ML in clinical practice so far. In another sophisticated study, Pedersen et al. combined clinical data (treatment with insulin, use of insulin-sensitizing agents, baseline HbA1c levels, and baseline serum insulin levels) with eight single-nucleotide polymorphisms (SNPs) and processed the data with ANN [83]. The addition of the SNPs significantly improved the predictive ability of the algorithm.

Nonalcoholic fatty liver disease (NAFLD)/nonalcoholic steatohepatitis (NASH) constitutes another entity of particular interest in the context of obesity. NAFLD/ NASH represents the most common chronic liver disease worldwide nowadays, for the treatment of which BMS seems to play a pivotal role as it seems to offer sustainable resolution [84–86]. Back in 2013, Sowa et al. examined several ML algorithms (among which LR, knn, SVM, decision trees, RF) to determine noninvasive assessment of fibrosis in NAFLD based on serum parameters (transaminases, hyaluronic acid, and cell death markers) and compared their combined effect with the gold standard of liver biopsy, which was performed intraoperatively during BMS [87]. The combination of these parameters with RF had a better diagnostic accuracy than each single parameter. More recently, Uehara et al. constructed a noninvasive algorithm for predicting NASH in a Japanese population of patients living with morbid obesity [88]. The most important predictors (alanine aminotransferase—ALT, C-reactive protein—CRP, homeostasis model assessment insulin resistance—HOMA-IR, and albumin) were selected by means of rule extraction technology.
