## 3 Results
### Classification of Generative AI Models
#### 3.2.3 Generative Adversarial Networks (GAN)  
Generative adversarial networks or GANs were first introduced by [PERSON] in 2014 [44]. The GAN is based on the minimax two-person zero-sum game, in which one player profits only when the other suffers an equal loss. The two players in GAN are the generator and the discriminator. The generator's purpose is to trick the discriminator, while the discriminator's goal is to identify whether a sample is from a true distribution. The discriminator's output is a probability that the input sample is a true sample. A higher probability suggests that the sample is drawn from real-world data. In contrast, the closer the probability is to zero, the more probable the sample is a fake. When the probability approaches one-half infinity, the optimal answer is reached because the discriminator finds it difficult to check fake samples [7]. Typically, generator (G) and discriminator (D) are implemented using deep neural networks, working as latent function representations. The architecture of the GAN, illustrated in Figure 6, involves the G learning the data distribution from real samples and mapping it to a new space (generated samples) using dense/convolutional layers accompanied by its corresponding probability distribution. The primary objective of the GAN is to ensure that this probability distribution closely resembles the distribution of the training samples. The D receives input data, which can be either real data (x) from the training set or generated data produced by the generator. The discriminator then outputs a probability using dense/convolutional layers or scalar value that indicates whether the input is likely to come from the real data distribution. GAN (generative adversarial network) training faces several challenges, including gradient disappearance, difficulty in training, and poor diversity. These problems arise from the loss function used in GANs, which involves measuring and minimizing the distance between the real data distribution (Pr) and the generated data distribution (Pg). During training, the discriminator aims to minimize cross-entropy by differentiating between real and generated samples. The optimal discriminator (D) takes the form given below. \[\text{D}(\text{x})=\text{Pr}(\text{x})/(\text{Pr}(\text{x})+\text{Pg}(\text {x}))\]On the other hand, the generator (G) seeks to minimize a generator-specific loss function that includes an independent item to ensure diversity. The loss function for the generator can be written as,  
\[\mathrm{V(G)}=\mathrm{KL}(\mathrm{Pg}||\mathrm{Pr})-2\mathrm{JSD}(\mathrm{Pr}|| \mathrm{Pg})\]  
where KL is the Kullback-Leibler divergence and JSD is the Jensen-Shannon divergence. Minimizing the JS divergence helps the generated samples resemble real ones. However, if there is little or no overlap between \(\mathrm{Pr}\) and \(\mathrm{Pg}\), the JS divergence becomes a constant, leading to gradient vanishing and disappearance [8]. Additionally, training GANs can be challenging because the feedback from the discriminator can be close to zero when it is trained optimally, slowing down convergence. Moreover, determining when the discriminator is properly trained is difficult since there is no indicator for it. Another problem is the poor diversity in the generated samples. The generator loss function V(G) can be reformulated to address this issue. Minimizing this loss function is equivalent to minimizing the KL divergence and the JSD, leading to more diverse generated samples. Several new models have been introduced to address these limitations of the original GAN, including issues like gradient disappearance, unstable training, and poor diversity. These new GAN models aim to enhance stability and improve the quality of the generated outputs. _Conditional generative adversarial networks (CGANs)_ have emerged as a solution to enhance the control and convergence speed of GANs in complex or large-scale datasets.