# Generative Adversarial Networks in Histological Image Segmentation: A Systematic Literature Review
## 3 Fundamentals and Basic Definitions
### Introduction to Generative Adversarial Networks  
Introduced in [35], GANs are a class of deep learning models designed to generate realistic synthetic data by learning the underlying distribution of a given dataset. The architecture of a generative adversarial network is composed of two main components: the generator \((G)\) and the discriminator \((D)\), which are trained simultaneously in an adversarial process. Figure 1 illustrates the basic architecture of a GAN model.  
During the training process of a GAN, the architecture is composed of two key components: a generator \(G\) and a discriminator \(D\). The GAN is trained using two distributions: a real data distribution \(P_{\text{data}}(X)\), from which a dataset \(X\) is sampled, and a noise distribution \(P_{z}(Z)\), from which random latent variables \(Z\) are drawn.  
Initially, the generator \(G\) receives as input \(M\) noise vectors \(z_{1},z_{2},\ldots,z_{m}\sim P_{z}(Z)\) and transforms them into synthetic samples \(\hat{x}_{1},\hat{x}_{2},\ldots,\hat{x}_{m}\), denoted collectively as \(\hat{X}\). Simultaneously, \(M\) real samples \(x_{1},x_{2},\ldots,x_{m}\sim P_{\text{data}}(X)\) are used to train the discriminator.  
The discriminator \(D\) is trained to distinguish real samples from fake ones using a gradient ascent approach. It acts as a binary classifier, aiming to output \(D(x)=1\) for real data and \(D(\hat{x})=0\) for generated data. Once \(D\) is trained for several iterations, the generator is updated via gradient descent, typically with a lower learning rate to ensure training stability.  
The ultimate goal is for the generator \(G\) to produce samples that the discriminator \(D\) cannot distinguish from real ones, i.e., \(D(\hat{x})\approx 0.5\) for \(\hat{x}=G(z)\). Mathematically, the value function \(V(G,D)\) can be used to represent the adversarial game process in GAN, which is formulated as a minimax optimization problem [36], as shown in Equation (1):  
\[\min_{G}\max_{D}V(D,G)=\mathbb{E}_{x\sim P_{\text{data}}(x)}[\log D(x)]+ \mathbb{E}_{z\sim P_{z}(z)}[\log(1-D(G(z)))] \tag{1}\]  
Here, the generator seeks to minimize \(\log(1-D(G(z)))\), effectively attempting to fool the discriminator, while the discriminator is trained to maximize its ability to distinguish between real and fake samples by minimizing the binary cross-entropy (BCE) loss.  
Despite their theoretical soundness and success in various applications, generative adversarial networks (GANs) face several practical challenges during training. Among the most frequently encountered issues are convergence difficulties, where the adversarial training dynamic between the generator \(G\) and discriminator \(D\) fails to reach a stable equilibrium [37; 38]. Another key problem is GANs is highly sensitive to hyperparameters and network architectures; minor adjustments can lead to vastly different outcomes, making the training process brittle and difficult to tune [35; 39]. Additionally, overfitting can occur when the discriminator becomes overly strong, memorizing the training data and failing to provide useful feedback to the generator [40].  
Addressing these challenges has motivated a rich body of research proposing extensions, regularization techniques, alternative architectures, and novel training algorithms aimed at stabilizing GAN training and improving output quality.  
To mitigate these issues, numerous variants and extensions of GANs have been proposed, which will be explored in subsequent sections.