Generative AI Intermediate

GANGenerative Adversarial Network

A maker and a checker compete, and both get better

Key points
  • GAN (Generative Adversarial Network) sets a maker and a checker side by side and has them compete.
  • The maker's grade is simply whether the checker got fooled. Nobody has to hand it a labeled answer.
  • The two improve in turns. Every time one side gets better, the other side's job gets that much harder.
  • If the balance tips too far one way, learning stalls. Keeping the two evenly matched is the hardest part of this approach.
  • Once training is done, the checker gets set aside and only the maker sticks around.
Contents

1The analogy

Behind a waffle cart at the edge of a fair sit two machines. One carves fresh waffle irons. The other watches the waffles coming off the griddle and tries to guess which iron each one came from — the classic iron the cart has used for years, or one freshly carved.

At first, spotting the difference is easy. The new iron leaves the edges a little blunt, and it's obvious at a glance. The carving machine fixes whatever got called out and carves again; the checking machine starts hunting for finer details — the thickness of the edge, a faint seam where the mold closed.

Go back and forth like this enough times, and the checking machine ends up guessing right about half the time. By then, whatever the carved iron makes is hard to tell apart from the classic.

2In detail

Two machines take turns competing

One side takes in a bundle of meaningless numbers and produces a result. Different numbers go in every time, so a different result comes out every time. The other side gets a mix of real data and generated results and has to call which is which.

Training alternates between the two sides. First, the checker gets shown real and fake examples and adjusted to tell them apart better. Then the maker gets adjusted, this time in the direction of getting past the checker. After one round of back and forth, both sides have improved a little.

The competition keeps going because the problem automatically gets harder. As the maker improves, the checker's job gets tougher; as the checker sharpens, the maker finds it harder to pass. Each side becomes the next level of test for the other.

The scorecard comes from the other side's mistakes

What drew attention to this approach is that nobody has to hand it a person-made answer. Generating a picture has no built-in scorecard to begin with — there's no obvious way to grade how well it's drawn as a number. A GAN hands that grading job to another machine entirely.

When the checker judges "this looks generated," the maker gets a signal for exactly what got caught and fixes that spot. When the checker gets fooled instead, that becomes a signal that the direction taken was right. The scorecard is essentially being rewritten continuously during training.

This is why results come out sharp. A model trained to hit an average tends to produce blurry results, but here, a blurry result gets caught immediately and fails to pass.

When the balance breaks, learning stalls

The catch is that the two machines have to be roughly matched for this competition to work at all. If the checker gets too strong, everything the maker offers gets called fake, no matter what. The maker loses any sense of which direction to adjust in, and learning grinds to a halt.

The opposite is a problem too. If the maker finds one result that reliably works, it just keeps stamping out that same thing. Feed it different numbers every time, and out comes something similar regardless. It's the cart deciding that, since one waffle mold reliably passed, it should just keep carving that same shape over and over. This is called mode collapse.

So training rarely goes smoothly. A lot of tuning goes into matching the two sides' pace and keeping one from racing ahead of the other. Even running the exact same setup twice can produce wildly different results.

Once trained, the checker gets set aside

Once training ends, only the maker actually gets used. The checking machine was just a scorer for training purposes, and it isn't needed once things are finished. Only the maker goes into any actual product.

Because the maker takes in a bundle of numbers and produces a result, one pass of computation is all it takes. That's much faster than approaches that step through many stages, which is why this approach still gets used anywhere a frame has to be generated in real time.

Where it's still used today

For a while, this sat at the center of image generation, but that spot has largely shifted to the approach that starts from a blur and gradually clears it into shape. Training is more stable, producing varied results is easier, and steering the result with text is more convenient there too.

In exchange, GANs survived anywhere fast and light matters. They fit tasks that have to finish in one shot: upscaling a low-resolution photo, turning a voice waveform into sound, transforming a frame in real time. The core idea of learning through competition also spread widely into other fields.

3More precisely

A GAN is a structure that optimizes two neural networks, a generator and a discriminator, in opposite directions on a single objective function. The discriminator trains to tell real from fake well; the generator trains to overturn the discriminator's calls. In theory, the balance settles at the point where the distribution the generator produces matches the real data distribution, and at that point the discriminator's accuracy converges to fifty percent.

The analogy breaks down in places. Once a waffle iron is carved, it stamps out the same shape every time — but the generator has to produce a different result every time depending on the numbers fed in. If it only ever produces the same thing, that's precisely the failure signal. And the checking machine compares against a real waffle sitting right next to it, while the discriminator keeps seeing fresh real data throughout training and keeps shifting its own standard.

It's also worth noting that checking whether the two sides have actually reached balance is hard. A lower loss value doesn't mean the results improved, so someone has to look at the output directly or measure it with a separate metric instead.

4Try it yourself

5Common misconceptions

  • It's easy to think a GAN is two AIs talking and teaching each other, but actually each side only chases its own goal and exploits the other's mistakes — no information gets exchanged between them.

  • It's easy to think both sides get used once training ends, but actually only the maker sticks around; the checker gets set aside.

  • It's easy to think competition automatically makes things better, but actually once the balance between the two breaks down, it's easy to fall into repeating one single result.

7One-line summary

In shortA GAN pits a maker against a checker, and through a cycle of fooling and getting caught, both sides climb in skill together.

Spotted an error or have a better analogy? Suggest an edit · Last updated2026-09-02