AI in Motion

Deep LearningIntermediate1:26 video6 chapters

Generative Adversarial Networks (GANs) — lecture notes

A forger and a detective train together. Watch the generator’s fake distribution move until it matches real data.

▶ Watch the animated lecture

0:001. Introduction

Introduction — Generative Adversarial Networks (GANs)

In 2014, Ian Goodfellow and colleagues proposed a clever game between two neural networks. It led to strikingly realistic generated faces and images. These are GANs.

0:112. Two players

Two players — Generative Adversarial Networks (GANs)

The generator is a forger. It turns random noise into fake samples. The discriminator is a detective. It looks at real and fake samples and tries to tell them apart. Each network trains to beat the other.

0:273. The training game

The training game — Generative Adversarial Networks (GANs)

Here the green curve is real data. The pink curve is what the generator produces. At first its fakes are obviously wrong, and the discriminator, the dashed line, easily separates them. Round by round, the generator improves until its distribution matches the real one, and the discriminator can only guess: about fifty-fifty.

0:494. The loop

The loop — Generative Adversarial Networks (GANs)

Each round: sample noise, generate fakes, update the discriminator to tell real from fake, then update the generator to fool the updated discriminator. Repeat thousands of times.

1:025. Strengths and challenges

Strengths and challenges — Generative Adversarial Networks (GANs)

GANs generate sharp images in a single pass. But training can be unstable, and they can suffer mode collapse, producing little variety. For text to image generation, diffusion models have largely taken over.

1:166. Recap

Recap — Generative Adversarial Networks (GANs)

To recap. The generator creates fakes, the discriminator judges them, and competition drives both to improve, until the fakes match reality.

Key takeaways

  • A GAN trains a generator and a discriminator against each other.
  • The generator learns to turn noise into realistic samples.
  • At equilibrium, the discriminator outputs about 0.5 for everything.
  • GANs can be unstable and suffer mode collapse; diffusion models now lead text-to-image.

Check yourself

  1. What does the discriminator output?
    Show answer

    The probability that a sample is real — It judges real versus fake.

  2. What is mode collapse?
    Show answer

    The generator produces very little variety — The generator finds a few outputs that fool the discriminator and repeats them.

  3. At the ideal end of training, the discriminator’s output is about…
    Show answer

    0.5 — If fakes match reality, it can only guess.

Go deeper

© 2026 Janin A Apurba, CSE, AUST · Advanced ICT Officer, CNRS-UNHCR. All rights reserved. Notes for the animated lecture at https://ai-in-motion.vercel.app/watch/generative-adversarial-networks.html