BeCuriouzLearn something new every day
The AI that learns by trying to fool another AI
💡 A GAN trains a forger and a detective against each other until the forgeries become indistinguishable from the real thing.
For years, the trick behind AI-generated faces was a clever setup called a Generative Adversarial Network (GAN). Instead of one model learning alone, a GAN pits two neural networks against each other in a contest. The generator invents fake images from random noise; the discriminator is a critic trained to tell real photos from the generator's fakes.
They improve by competing. Every round, the discriminator gets better at spotting fakes, which forces the generator to produce more convincing ones, which forces the discriminator to sharpen further. It's an arms race — the generator is like a counterfeiter and the discriminator like a detective, each pushing the other to get sharper. Crucially, the generator never sees the real training photos directly; it learns only from the critic's feedback on whether its output passed as real.
The goal is a kind of stalemate called equilibrium: the generator's fakes get so good that the discriminator can do no better than a coin flip, guessing 50/50. GANs powered the first wave of hyper-realistic 'this person does not exist' faces, though today's image tools have largely shifted to diffusion models, which are more stable to train.