Generative adversarial networks in 500 words or less



A huge part of artificial intelligence technology is known as machine learning. That is, the ability of machines to learn from data. There are different frameworks that enable this.

Generative adversarial networks (GANs) are one such framework used to teach machines to do things.

Here, we dive deeper into generative adversarial networks. Here’s an overview in 500 words or less.


What are generative adversarial networks?

Generative adversarial networks were introduced in 2014 by Ian Goodfellow and his colleagues. They are an unsupervised learning model, meaning they allow machines to learn with data that isn’t labelled with the correct answers.

They consist of two competing networks. These are generative networks and discriminative networks.

Generative networks try to create (generate) new content that could pass as real. For example, you feed it lots of real pictures of magpies. A generative network would use this input to find patterns and regularities between images. From there, the computer will try to create convincing fake pictures of magpies.

Discriminative networks, meanwhile, classify input. This means that they analyse input to decide whether it’s real. In our example, this would mean determining which images are real pictures of magpies, and which are the fake ones made by the generative network.


The game

In generative adversarial networks, the two network types operate in opposition to each other. In a way, they’re playing a zero-sum game. (Only one can ‘win’ and the other must lose.)

In a generative adversarial network, the generative network wants to increase the classification error of the discriminative network. Meanwhile, the discriminative network wants to decrease the classification error.

Let’s break that down.

‘Classification error’ measures how often a machine correctly or incorrectly classifies input. A high classification error means the machine is usually incorrect. A low classification error is when the machine is usually correct.

So, the generative network is trying to create content that fools the discriminative network. In turn, the discriminative network is learning how to tell the difference between real and fake images.


Learning from each other

A good way to think of these networks is like a counterfeiter and a police officer. The generative network is the counterfeiter, trying to make ever more convincing fakes. The discriminatory network is the police officer, trying to spot these fakes.

After the discriminative network has made its classifications, the weights of both networks get adjusted through backpropagation.

Round and round they go, until the fake content from the generative network fools the discriminative network about 50% of the time. This is because a 50% error rate means that the content the generative network creates is convincing. (Just like how if you blindly guess on true or false questions, you’ll be right 50% of the time.)


Generative adversarial networks

In short, generative adversarial networks are a machine learning framework that involves two networks learning in opposition to each other.

This eventually allows a computer to generate realistic new content, such as images, audio and video.


Useful links

ELI5: what is an artificial neural network?

ELI5: what is backpropagation?

Yes, positive deepfake examples exist


Download