In the realm of deep learning in artificial intelligence, algorithms are at the core. GAN (Generative Adversarial Network), as one of the most powerful and fascinating deep learning algorithms, has an interesting invention process and produces remarkably effective results. This article provides an in-depth yet accessible explanation of GAN.
Who Invented GAN? How Effective Is It?
On a night in 2014, Ian Goodfellow went out to celebrate with a few friends, who asked him to help complete a project where a computer could generate images on its own.

After thinking for a while, he came up with an idea. What if two neural networks were put in opposition to each other? His companions were skeptical, so he decided to try it at home. Goodfellow worked for several hours and then tested his software. He achieved success on his first attempt.
That night, he built what is now known as GAN, or Generative Adversarial Network. This algorithm sparked great interest in the field of deep learning, and Ian became a superstar in artificial intelligence.
Introduction
GAN, or Generative Adversarial Network, is a generative modeling method based on deep learning.
Generative modeling is an unsupervised machine learning task that requires automatic detection and learning of patterns in incoming data so that the model can be used to generate new, fake copies that cannot be distinguished from the original data.
You are likely already aware of the applications of GANs, as they are popular among young people.
Example 1
Generating New Data: GANs can generate new data even when there is insufficient data to start with. “This Person Does Not Exist” is a website that generates faces that are fake, but you can’t tell because they are so realistic.


Example 2
Generating Images Through Real-Time Painting: NVIDIA Canvas is a painting program that uses artificial intelligence to create landscape images from simple brush strokes.


Example 3
Transforming Real-Life Images into Art: With GANs, you can teach your computer to transform chosen photos into dogs, doodles, The Simpsons, and vice versa!


How Does GAN Work?
GAN consists of Convolutional Neural Networks (CNNs). It is a branch of artificial intelligence and a type of artificial neural network used for image recognition and processing, specifically designed to handle pixel data.
The GAN algorithm consists of two competing neural networks: a generator and a discriminator. The operation of GAN is a game involving a forger and an investigator, who compete against each other (this is described by the A in GAN, which stands for adversarial, meaning opposed). The forger is our maker, and the investigator is our discriminator.

The job of the discriminator is to identify whether the given data is real or artificial. Therefore, it is simply a binary classifier, outputting 1 for true and 0 for false.
The job of the generator is much more difficult. It uses random vectors and attempts to regenerate data that looks like the input (real) data.

This is a zero-sum game, meaning there is always a winner and always a loser. The generator creates a fake copy to deceive the discriminator. If the discriminator cannot distinguish between the generator’s real input and fake input, the generator wins and makes no changes to its algorithm. Once the discriminator loses, it changes its algorithm on its own. This is why GAN is referred to as an unsupervised machine learning task.

Clearly, the generator algorithm is harder to train because it has to deal with thousands of pixels, while the discriminator only needs to make the final judgment of whether the output is real or fake.


Author: Challey
Original by EET Electronic Engineering Magazine