# Generative Artificial Intelligence in the Early Diagnosis of Gastrointestinal Disease
## 1 Introduction  
Gastrointestinal disease (GID), \"the disease of the gastrointestinal tract\" [1], is a main contributor to disease burden in the world [1; 2; 3; 4; 5; 6]. GID causes 8 million deaths in the world in a year [2] and costs 120 billion dollars in the United States in 2018 [3]. The risk factors of GID include unhealthy behavioral patterns, abnormal antacid/anti-diarrheal medication, bad bowel habits and pregnancy [6]. On the other hand, the topics of artificial intelligence and machine learning have gained great attention on a global level. Artificial intelligence can be defined as \"the capability of a machine to imitate intelligent human behavior\" (the Merriam-Webster dictionary). As a branch of artificial intelligence, machine learning can be defined as \"extracting knowledge from large amounts of data\" [7]. Popular machine learning approaches are the artificial/deep neural network, the decision tree and the random forest (See [7] for their detailed explanation). Specifically, a deep neural network is an artificial neural network with many intermediate layers, e.g., 5, 10, or even 1000 [8]. Conventional study considers a limited scope of independent variables for the early diagnosis of disease, employing logistic regression with an unrealistic assumption of _ceteris paribus_, i.e., \"all the other variables staying constant\". In this context, emerging literature utilizes artificialintelligence for the early diagnosis of GID, including classification [9], detection [10; 11], segmentation [12] and explainable artificial intelligence [13; 14; 15].  
In particular, generative artificial intelligence has garnered great attention in the past decade [16; 17; 18; 19; 20]. Generative artificial intelligence, which can be defined as \"artificial intelligence generating image or text data\", includes generative adversarial networks (GANs) [16] and transformers [17; 18; 19; 20]. The GAN generates image data by training the generative model vs. the discriminative model (Figure 1). The generative model tries to generate fake images from random noises so that it can fool the discriminative model. The discriminative model tries to discriminate fake images from real images (input images) so that it can outwit the generative model [16]. The original transformer, which consists of the encoder and the decoder, classifies or generates text data by using a combination of positional information (positional vectors), context information (embedding vectors) and attention mechanisms. Here, the encoder covers classification tasks while the decoder takes generation tasks [17]. Bidirectional encoder representations from transformers (BERT) inherit the encoder of the transformer only with more focus on classification tasks. [18], whereas generative pretrained transformers (GPT) take the decoder of the transformer only with more emphasis on generation tasks [19]. The vision transformer classifies or generates image data by considering image patches as if the original transformer considers text tokens [20]. To our best knowledge, no review is available on the recent development of generative artificial intelligence for GID from detection to diagnosis. In this context, this study reviews the recent progress of GANs and transformers for the classification, detection, segmentation and generation of GID images.