In June 2014, Ian Goodfellow and his colleagues at Université de Montréal described a new way to teach a machine to make things up. They called it a generative adversarial network, or GAN.
It runs as a contest between two neural networks. One, the generator, produces candidates. The other, the discriminator, judges each input and decides whether it is real or generated. What one gains, the other loses, which makes it a zero-sum game.
The generator never sees the answer. It is not trained to land close to any particular image. Its only target is to fool the discriminator, which is itself being updated all the time. As the discriminator gets better at spotting fakes, the generator has to get better at making them, and the discriminator’s error rate climbs along with its difficulty. The setup resembles mimicry in evolutionary biology, where two sides keep adapting to each other.
That indirect route is what lets a GAN learn without labeled data. Feed it a training set and it learns to produce new data with the same statistics. Train it on photographs and it can produce new ones that look authentic, at least on a first glance.
It started as a tool for unsupervised learning. It has since proved useful in semi-supervised learning, fully supervised learning and reinforcement learning.
How the training works
A known dataset serves as the discriminator’s first lesson. It is shown samples from the set until its accuracy is acceptable. The generator then gets random input drawn from a predefined latent space, and its output goes to the discriminator for review. Both networks are updated by separate backpropagation, so the generator turns out better samples while the discriminator grows sharper at flagging synthetic ones. For images, the generator is typically a deconvolutional neural network and the discriminator a convolutional one.
One practical advantage: a GAN can produce a complete sample in a single pass through the network. Autoregressive models such as WaveNet and PixelRNN need several.
Where it breaks
In theory the game has a clean solution. In the original version, with unrestricted players, an equilibrium exists in which the generator matches the reference data perfectly and the discriminator can do no better than guess.
Real networks are far more limited. They cover a tiny fraction of the possible strategies, and gradient descent often fails to find the equilibrium. Training frequently falls into one of several failure modes. To steady it, some researchers begin with an easier task, such as low-resolution images or a single object against a plain background, and raise the difficulty gradually.
The best known failure is mode collapse. The generator misses whole chunks of the data. A GAN trained on the MNIST set of handwritten digits might produce only zeros, a case the original paper called “the Helvetica scenario.” The discriminator, trained only to separate real from fake, accepts those zeros as real, and nothing penalizes the generator for ignoring the other nine digits.





