Generative Adversarial Networks (GANs)

GANs consist of two neural networks—a Generator and a Discriminator—that compete against each other. The Generator creates fake data, while the Discriminator tries to distinguish real from fake.

Invented by Ian Goodfellow (2014) - GANs can generate photorealistic images, create art, and even synthesize voices.

How GANs Work

Generator

Takes random noise as input and generates fake data (e.g., images).

Goal: Fool the discriminator

Discriminator

Classifies data as real (from dataset) or fake (from generator).

Goal: Correctly identify fakes

Training Process

This simplified example shows the adversarial training loop.

python
Output:
Click "Run Code" to see output

Popular GAN Variants

  • DCGAN: Deep Convolutional GAN for image generation
  • StyleGAN: High-quality face generation with style control
  • CycleGAN: Image-to-image translation without paired data
  • Pix2Pix: Conditional GAN for paired image translation