Innovation That Matters

Generative networks | Photo source Shutterstock

Tech Explained: Generative Adversarial Networks

Tech Explained

Generative adversarial networks pit one AI system against another in order to help them learn creativity. Find out how this innovative use of tech has influenced generating imagery and medical research in our latest Tech Explained.

Artificial Intelligence (AI) software is being developed for an increasingly diverse range of uses. Some that we have seen recently include matching consumers with their perfect coffee and predicting the likelihood of IVF success. However, AI has never been very good at creating realistic artworks. This is because it requires imagination to perform creative tasks that involve making comparisons, transferring information from one form to another and blending concepts together to create new works. However, a new type of algorithm called Generative Adversarial Networks (GAN) may allow software to create much more human-like works. What exactly is a GAN and how does it work?

GANs are a type of unsupervised machine learning. A GAN is made up of two generative neural networks that are pitted against each other. Most types of machine learning use discriminative algorithms. A discriminative algorithm examines the features of a piece of data in order to label it (e.g., to determine if a photo is a picture of a bird the algorithm checks how well it matches other pictures of birds). A generative algorithm, in contrast, tries to predict what features are necessary in order for a piece of data to have a certain classification (e.g., the algorithm assumes a picture is a bird, then determines how likely it is that it has feathers). Instead of predicting a label (bird) given certain features, generative algorithms attempt to predict features (feathers) given a certain label.

To create a GAN, one network (the generator) generates new data. A second network (the discriminator) evaluates the data to determine how well it fits with the training dataset. For example, imagine the goal is to create a picture of a bird. First, the generator takes in random pictures of birds from a database and creates an image. This image is passed to the discriminator, along with other images taken from a dataset of real birds. The discriminator determines the probability that the image is a picture of a bird. The generator then uses this probability to alter the next image it creates. The loop continues, and with each iteration the computer-generated bird becomes more and more like the real birds from the dataset.

One way to think of a GAN is as a counterfeiter and a cop. The counterfeiter (generator) is constantly trying to create more realistic fake money, while the cop (discriminator) is constantly trying to get better at spotting fake money. As one adversary gets better at their job, the other must get better as well.

GANs are a relatively new idea. The concept was introduced in a 2014 paper by Ian Goodfellow and other researchers at the University of Montreal. Goodfellow got the idea while talking to some friends over beers, and wrote the first code that night. Already, however, GANs have found a wide number of uses.

Some of the uses for GANs have included finding images from written descriptions, converting satellite images into maps, generating high resolution images from low resolution ones and finding images that contain a certain pattern or word. Researchers at chip-maker Nvidia trained a GAN to generate pictures of imaginary celebrities by studying real ones. GANs have also been used for generating game characters and clothing fashions. But some of the most promising advances using GAN are in science and medicine.

Researchers at Yale University and Lawrence Berkeley National Laboratory have developed a GAN that can predict how particular subatomic particles will behave. Medical research is another promising field. For example, researchers often have difficulty getting enough real patient data to analyse the effectiveness of new drugs. GANs can generate fake records that are almost as good as real ones. It can also create abnormal brain MRIs that can be used to train neural networks.

GANs are also being used to alter images, including images of real people. This last use points to a potential problem with GANs. They could be used to create more realistic fake images, words and data. At the moment, the power of GANs to generate realistic images is still limited. The algorithms can create realistic fake images of birds, but it can’t create an entirely new type of bird.