GANS AND THE PEAK OF MACHINE CREATIVITY

Thirunayan Dinesh
Rootcode AI
Published in
4 min readOct 13, 2020

The human face is a result of thousands of years of evolution and also, an unpredictable by-product of ancestral genetic combinations. For a long time, it was believed that the artistry to create a completely non-existent human face was possessed only by nature…until now. Although in the past five years the potential growth of deep learning and it’s applications has been colossal, artisticness and creative content generation are some aspects in which we humans take pride, but not so fast… AI can now do that as well.

First proposed by Ian Goodfellow, Generative Adversarial Networks, or GANs are an unsupervised deep learning approach that can be used to generate highly realistic generated samples of images.

Can you guess from the pictures below which of the humans are AI-generated and which are images of real humans?

Spoiler Alert: They are all AI-generated!

The above images were generated by a Generative Adversarial Network (GAN) implemented by our team at rootcode AI.

GANs are a class of deep learning algorithms where two neural networks are trained simultaneously and try to trick each other. Two neural networks, the generator, and discriminator are defined. The role of the generator is to generate highly realistic samples that resemble the dataset, in this scenario thousands of images of faces, and the role of the discriminator is to classify whether the image is real or generated. And the only input expected by the generator is a sample noise image.

A more fun way to visualize this concept is to think of the generator as a counterfeiter who is learning to print money that is completely non-differentiable from real money and the discriminator can be thought of as an inland revenue officer learning to identify counterfeit money.

Whenever the generator produces an image the discriminator is given the job of classifying it, initially the generator performs very badly (as any neural network) but eventually, the generator corrects it’s mistaken and starts generating realistic images on the other discriminator also learns how to distinguish between real and generated images. At a point, the generator starts generating images that are so realistic (like the ones above) that the discriminator fails to identify the images.

Implications of GANs

  • Dataset generation

It is evident that the current biggest problem in the data science space is clean data. Although data is overly abundant, clean datasets are very rare to find in real life.GANs can be used to generate high-quality synthetic datasets, an ideal scenario would be for example, if the use case is to build a segmentation model to identify tumours from MRI images with more than 95% accuracy, but if the dataset consists of only 1000 MRI reports, then the yielded accuracy will be far below the expected accuracy, even if data augmentation techniques are used, a larger boost inaccuracy cannot be achieved. In such a bottleneck scenario GANs can be used to generate more samples of synthetic MRI images, and increase the volume of the dataset more organically instead of only augmenting the already existing image.

  • Creative content generation

Given enough data GANs can generate enough creative content such as videos and even movies, this can immensely increase the productivity of filmmakers and hobbyists. Although this is an idea that is still at the research level, it’s pace of progression is fast, so in fact, your next favorite actor or actress does not even need to be a real human.

  • Image super-resolution

Using a GAN based concept known as pix2pix, low-resolution images can be sampled to have a higher resolution, this will not only help photographers or people with low res cameras but also government defense services like police and national intelligence, to increase the clarity of images through super-resolution.

Deepfakes and GANS

Deep fakes are in fact a direct application of GANS. Deep fakes are AI-generated media in which a person in an image or video is replaced with someone else’s resemblance. Though the concept of deep fakes and its applications are a whole different topic, the rise of deep fakes poses a huge ethical threat to the privacy of individuals. In fact, in 2019 the state of California in the USA banned deep fakes and made it illegal for anyone to produce or share deep fakes.

Image courtesy: https://spectrum.ieee.org/tech-talk/artificial-intelligence/machine-learning/facebook-ai-launches-its-deepfake-detection-challenge

Currently, there are commercial applications that even allow users to create their own deep fakes. Only recently the impact deep fakes can have on the community has come to the surface. Facebook even launched a deep fake detection challenge calling the AI community with staggering prize money of 1 million dollars.

Conclusion

In conclusion, although the “hype” around GANs contains some over-exaggeration, GANs are the first class of AI algorithms that disproved the common perception that creativity was something that only bounded to humans. In addition, the philosophy and yin and yang can be applied to any idea and GANs are not an exception, although there are many negative use cases of GANs on the bright side GANs can pave the way for a totally new paradigm for unsupervised learning and the field of AI as a whole.

You can find this article in the Rootcode Labs blog as well.

For more information visit us on rootcodelabs.com/artificial-intelligence/

--

--

Thirunayan Dinesh
Rootcode AI

Associate Data Scientist and AI Team Lead at @RootcodeAI. Making the world better with AI — one model at a time 🧠.