A generative adversarial network (GAN) is a class of machine learning frameworks and a prominent framework for approaching generative AI. The concept was initially developed by Ian Goodfellow and his colleagues at Université de Montréal in June 2014. In a GAN, two neural networks compete with each other in the form of a zero-sum game, where one agent's gain is another agent's loss. Given a training set, this technique learns to generate new data with the same statistics as the training set. For example, a GAN trained on photographs can generate new photographs that look at least superficially authentic to human observers, having many realistic characteristics. Though originally proposed as a form of generative model for unsupervised learning, GANs have also proved useful for semi-supervised learning, fully supervised learning, and reinforcement learning. The core idea of a GAN is based on the "indirect" training through the discriminator, another neural network that can tell how "realistic" the input seems, which itself is also being updated dynamically. This means that the generator is not trained to minimize the distance to a specific image, but rather to fool the discriminator. This enables the model to learn in an unsupervised manner. GANs are similar to mimicry in evolutionary biology, with an evolutionary arms race between both networks.
Definition
Mathematical The original GAN is defined as the following game: Each probability space (Ω,μref) defines a GAN game. There are 2 players: generator and discriminator. The generator's strategy set is 𝒫(Ω), the set of all probability measures μG on Ω. The discriminator's strategy set is the set of Markov kernels μD:Ω→𝒫[0,1], where 𝒫[0,1] is the set of probability measures on [0,1]. The GAN game is a zero-sum game, with objective functionL(μG,μD):=Ex∼μref,y∼μD(x)[lny]+Ex∼μG,y∼μD(x)[ln(1−y)]. The generator aims to minimize the objective, and the discriminator aims to maximize the objective.
The generator's task is to approach μG≈μref, that is, to match its own output distribution as closely as possible to the reference distribution. The discriminator's task is to output a value close to 1 when the input appears to be from the reference distribution, and to output a value close to 0 when the input looks like it came from the generator distribution.
In practice The generative network generates candidates while the discriminative network evaluates them. This creates a contest based on data distributions, where the generator learns to map from a latent space to the true data distribution, aiming to produce candidates that the discriminator cannot distinguish from real data. The discriminator's goal is to correctly identify these candidates, but as the generator improves, its task becomes more challenging, increasing the discriminator's error rate. A known dataset serves as the initial training data for the discriminator. Training involves presenting it with samples from the training dataset until it achieves acceptable accuracy. The generator is trained based on whether it succeeds in fooling the discriminator. Typically, the generator is seeded with randomized input that is sampled from a predefined latent space (e.g. a multivariate normal distribution). Thereafter, candidates synthesized by the generator are evaluated by the discriminator. Independent backpropagation procedures are applied to both networks so that the generator produces better samples, while the discriminator becomes more skilled at flagging synthetic samples. When used for image generation, the generator is typically a deconvolutional neural network, and the discriminator is a convolutional neural network.
Relation to other statistical machine learning methods GANs are implicit generative models, which means that they do not explicitly model the likelihood function nor provide a means for finding the latent variable corresponding to a given sample, unlike alternatives such as flow-based generative model.
Compared to fully visible belief networks such as WaveNet and PixelRNN and autoregressive models in general, GANs can generate one complete sample in one pass, rather than multiple passes through the network. Compared to Boltzmann machines and linear ICA, there is no restriction on the type of function used by the network. Since neural networks are universal approximators, GANs are asymptotically consistent. As of 2026, variational autoencoders have been proven to be universal approximators.
Mathematical properties
Measure-theoretic considerations This section provides some of the mathematical theory behind these methods.
In modern probability theory based on measure theory, a probability space also needs to be equipped with a σ-algebra. As a result, a more rigorous definition of the GAN game would make the following changes:Each probability space (Ω,ℬ,μref) defines a GAN game. The generator's strategy set is 𝒫(Ω,ℬ), the set of all probability measures μG on the measure-space (Ω,ℬ).
The discriminator's strategy set is the set of Markov kernels μD:(Ω,ℬ)→𝒫([0,1],ℬ([0,1])), where ℬ([0,1]) is the Borel σ-algebra on [0,1].Since issues of measurability never arise in practice, these will not concern us further.
Choice of the strategy set In the most generic version of the GAN game described above, the strategy set for the discriminator contains all Markov kernels μD:Ω→𝒫[0,1], and the strategy set for the generator contains arbitrary probability distributions μG on Ω. However, as shown below, the optimal discriminator strategy against any μG is deterministic, so there is no loss of generality in restricting the discriminator's strategies to deterministic functions D:Ω→[0,1]. In most applications, D is a deep neural network function. As for the generator, while μG could theoretically be any computable probability distribution, in practice, it is usually implemented as a pushforward: μG=μZ∘G−1. That is, start with a random variable z∼μZ, where μZ is a probability distribution that is easy to compute (such as the uniform distribution, or the Gaussian distribution), then define a function G:ΩZ→Ω. Then the distribution μG is the distribution of G(z). Consequently, the generator's strategy is usually defined as just G, leaving z∼μZ implicit. In this formalism, the GAN game objective isL(G,D):=Ex∼μref[lnD(x)]+Ez∼μZ[ln(1−D(G(z)))].
… excerpt ends here. Continue reading the full article.


![Generative adversarial network: Main types of deep generative models that perform maximum likelihood estimation[9]](https://thumb.wikimedia.org/wikipedia/commons/thumb/b/bb/Types_of_deep_generative_models.png/1280px-Types_of_deep_generative_models.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)


