**1. Introduction**

Artificial intelligence (AI) is an umbrella term that incorporates concepts such as supervised and unsupervised machine learning (ML), deep learning (DL), and reinforcement learning [1]. In essence, AI is the simulation of human learning by a machine (computer). Learning, in turn, is the procedure of acquiring information (input), which, after retention and processing, may lead to adjustment of behavior under given temporospatial circumstances or optimization of the chances of achieving specific goals (output). Each type of AI differs from the others in the extent of intervention by the operator, i.e., the degree of autonomy of the machine.

AI subtypes have certain integral components: an algorithm, specific datasets (training, validation, test), input (predictors), and output (outcomes), as well as performance indices of the algorithm for each dataset (sensitivity, specificity, F1 score, area under the receiver operator curve—AUROC, area under the precisionrecall curve—AUPRC, and so on). Depending on the degree of autonomy of the AI algorithm, the operator (human researcher, data scientist) has variable knowledge of and interference to the aforementioned components. For instance, in *supervised ML,* the training data are labeled, and the possible outcomes are known *a priori*. This type of AI is used in cases of classification (in the case of categorical outcomes—i.e., disease or no disease, TNM staging for neoplasia, Clavien-Dindo staging for postoperative complications, etc.) or regression (in the case of numerical outcomes—i.e. weight, height, body mass index, etc.). Examples of supervised ML algorithms are decision trees (DT), random forest (RF), k-nearest neighbors (knn), linear and logistic regression (LR), support vector machines (SVMs), etc. On the other hand, in *unsupervised ML*, outcomes are unknown; therefore, they are subject to discovery with the aid of the AI algorithm itself. Unsupervised ML problems are divided into clustering (inherent grouping of data) and association (rules that define the relationship between predictors and outcomes). Besides, *reinforcement learning* is based on continuous training of the algorithm with the method of "trial-and-error" and is implemented in the case of highly chaotic systems such as cost analysis, with Markov models being typical examples [2].

*Deep learning* (DL) is the most autonomous subtype of AI. DL utilizes large amounts of real-world data (big data) and is structured on the basis of neural networks of three or more layers (input layer, output layer, one or more hidden intermediate layers). The layered architecture of DL algorithms resembles that of neurons in the central nervous system, hence the characterization "neural (or neuronal) networks." Characteristic examples are artificial neural networks (ANN), convolutional neural networks (CNNs), long-short term memory networks (LSTMNs), recurrent neural networks (RNNs), multilayer perceptrons (MLPs), etc. [2]. **Figure 1** is a

#### **Figure 1.**

*Schematic representation of the hierarchy of artificial intelligence algorithms. The more one moves to the top of the pyramid, the more autonomous the algorithm becomes and the less intervention is exerted by the researcher. AI — artificial intelligence, ML — machine learning, DL — deep learning.*

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

schematic representation of the different subtypes of AI, with the degree of autonomy of each one.

Recently there has been documented an exponential increase of literature investigating the application of various AI algorithms in healthcare [3]. It is within this context that our team recently attempted to trace the applications of artificial intelligence and machine learning in bariatric metabolic surgery (BMS) [4]. Based upon this study, this chapter is organized in seven sections, in concordance with the respective disciplines of BMS for which there have been relevant publications concerning applications of AI. The last two sections are devoted to the future perspectives of AI in BMS, as well as the methodological limitations and ethical barriers that should be considered when applying AI in BMS, in analogy to every biomedical scientific field.

### **2. AI applications in basic science relevant to bariatric metabolic surgery**

Basic science and research are the cornerstones of evolution in medicine. Popular basic science applications on which AI may be applied include but are not limited to genome-wide sequencing (WGS), whole slide imaging (WSI), and all the omics (genomics, transcriptomics, proteomics, metabolomics, but also radiomics and multi-omics). Regarding the discipline of BMS in particular, metabolomics is a field of increased interest and intensive research, for the purpose of characterizing the metabolic milieu of patients living with obesity as well as for studying the long-term postoperative interactions between BMS and the metabolism [5–7].

In one of the first attempts to implement AI methods in BMS, Cortón et al. studied the gene expression profile in omental adipose tissue procured by women who were submitted to bariatric surgery and simultaneously suffered from polycystic ovarian syndrome (PCOS) [8]. More specifically, the researchers implemented data mining, a method that combines traditional statistics, machine learning and database systems, and retrieved abnormal expression of genes that participate in insulin and Wnt signaling, oxidative stress, inflammation, immune function, and lipid metabolism. Additionally, they conducted hierarchical clustering, a type of unsupervised ML, in order to retrieve co-expressed genes in female patients with PCOS and consequently detect specific patterns of gene expression.

More recently, Chaim et al. calculated beta cell function through assessment of NO production by means of electro-sensor complex (ESC) data and statistical network, a set of DL algorithms [9]. Subjects consisted of patients living with obesity who were candidates for MBS. In another study, Macartney-Coxson et al. used genomewide DNA methylation data and compared traditional statistics with combinatorial algorithms in the identification of methylation loci [10]. Study samples included subcutaneous and omental adipose tissue that had been harvested from obese individuals, before and after BMS. Besides, Candi et al. performed a metabolomics analysis of visceral adipose tissue harvested from individuals who had undergone bariatric surgery and identified three kinds of metabolotypes: healthy controls (normal weight), healthy obese, and pathological obese [11]. Consequently, they implemented RF analysis, an unbiased supervised classification technique, in order to differentiate among the three groups, but also retrieve the most important predictive metabolites for each category, with lipids playing a cardinal role with this respect. In another metabolomics-oriented study, Narath et al. used an untargeted approach that yielded 177 features [12]. Consequently, they processed the data with RF in order to detect short- and long-term metabolic changes following Roux-en-Y gastric bypass (RYGB).

The most important finding was that short-term changes in metabolites (1–3 weeks postoperatively) do not necessarily match long-term effects (up to 1 year).

Future research should focus on reconciling metabolic surgery, metabolomics, and deep learning. So far, application of DL in metabolomics has manifested several methodological limitations, including high computational cost, lack of external validation, non-calculation of isotopic peaks during sample analysis with spectroscopy, overfitting secondary to low sample size, reduced predictive ability upon application to asymmetrical datasets, poor applicability of outcomes from experimental animal models to human metabolomics, etc. [13]. On the other hand, the exponentially increasing numbers of patients who undergo BMS offer an excellent substrate for obtaining biological fluids (whole blood, plasma, serum, feces, urine) and tissues (gastric, adipose, liver) for further metabolomic analysis. The implementation of ML, and most importantly DL, could potentially assist in unraveling the roles of the myriads of metabolites through untargeted metabolomic analyses, distinguish between causes and effects, and gain clinical usefulness both for prediction and diagnosis. With this regard, one may distinguish the emerging role of data analysists as key members of the multidisciplinary BMS team.
