Generative Adversarial Network (GAN)

Generative Adversarial Network (GAN)


A generative adversarial network is a training setup in which two neural networks compete. The generator produces synthetic data, the discriminator tries to tell real samples from generated ones, and both improve by trying to beat the other.

The loop runs like this. The generator takes random noise and turns it into a candidate sample. The discriminator sees a mixture of real and generated samples and predicts which is which. Its errors are the generator's reward: every time the discriminator is fooled, the generator's approach gets reinforced. Every time it succeeds, the generator adjusts. In principle the process settles where generated samples are indistinguishable from real ones.

GANs became known for image work. Photorealistic faces of people who do not exist, upscaling low-resolution images, style transfer between artistic domains and generating synthetic training data all came out of this family. Diffusion models have since taken over much of the image generation ground.

A concrete case: a manufacturer wants to detect a rare surface defect but holds only 60 photographs of it. A GAN trained on those images produces additional synthetic examples, and the defect classifier trained on the enlarged set performs measurably better than one trained on 60 alone.

Training is notoriously unstable. The two networks can fall out of balance, and mode collapse, where the generator keeps producing a narrow set of outputs, is a common failure.

Related Articles

From generative AI strategy to custom agent development and retrieval architectures, we help you scale AI responsibly.
Discuss your AI project