Before we explore what GANs can actually do for us, let’s look at what generative adversarial networks actually are.
A GAN is a machine learning system, developed in 2014 by Ian Goodfellow and his team. The task of a GAN is to generate its own creations based on a range of real example data. This allows the end result to be deceptively real and it becomes hard to tell the computer-generated images were not created by human hands. To do this, two neural networks are used which communicate with each other.
The generator network is tasked with creating a fake. The network is fed with data – such as photos of women. Based on this information, it then creates its own photo. First, the network learns what properties the originals have in common. So, the new picture isn’t a duplicate of one piece of source data, but an entirely new image that is similar in nature – in our example, representing the photo of a (non-existent) woman.
The basic data and generated information are provided to the partner network. The task of the discriminator network is to check all the data it receives to determine whether it is real or fake. An image is not only deemed to be fake if it deviates too far from the basic data, but also if it’s too perfect. If the generator simply takes the average of all the data and produces a new image, the machine generation will be easy to determine. The discriminator, therefore, also filters out the results that don’t appear natural.
Both networks try to outdo the other. If the discriminator network recognizes a fake dataset, it rejects the data. In this case, the generator network wasn’t good enough and needs to keep learning. At the same time, the discriminator also learns. Since both neural networks train each other, this is referred to as a deep learning system. The generator attempts to create datasets that appear so genuine that the discriminator classifies them as real. On the other hand, the discriminator tries to closely examine and understand the real examples so that false datasets have no chance of being classified as real.