Understanding Generative Adversarial Networks

Understanding Generative Adversarial Networks

Naveen Joshi 10/05/2020 4
Understanding Generative Adversarial Networks

Generative adversarial networks are a way of generating synthetic data that can be used for training AI models.

One of the biggest challenges faced while training and creating an effective AI strategy is the time and cost required to gather data and train the AI models. Generative adversarial networks (GANs) can help overcome this challenge of training AI models. GANs are a way of training generative models that can generate new synthetic data based on existing training datasets. The synthetic data can be used for training AI models to reduce the loss functions and improve their accuracy, eliminating the need for a huge volume of training data. The loss functions are a way of evaluating how well an AI model is performing against set objectives. The lower the loss function, the higher is the accuracy of the outputs. Thus GANs enhance the accuracy of outputs and reduce the time and cost required to train AI systems. GANs generate real-like synthetic data with the help of two sub-models: generator and discriminator.

How Generative Adversarial Networks Produce Synthetic Data

Generative adversarial networks use a generator and discriminator that work hand in hand to improve the accuracy of their outputs.

How Generative Adversarial Networks Produce Synthetic Data


As the name describes, a generator is a generative algorithm. Generators try to generate data from a piece of data using their own ‘imagination’. For instance, they can output an image based on a small part of the image as an input. And this is done by providing vectors with some random data as input to generators that output a complete picture based on the data. The vectors are tuples of random data values. It can be thought of as a list of random numbers.


Discriminators have many hidden layers and one output layer, like CNNs. They function similarly to the working of convolutional neural networks (CNNs), except that they can have only two outputs. The outputs can be either 1 or 0. Output 1 means that the input data is real, and 0 means the input data is fake. Thus, discriminators try to classify the output of a generator as real or fake. They are trained on real data so that they can learn how it looks and what features it should have to be classified as authentic. For instance, an image of a human face should have two eyes, one nose, a forehead, among a few other features.

The output of the generator is passed through a discriminator that classifies the data as real or fake. If the data is classified as fake, then it is sent back to the generator using backpropagation algorithms. And, the weights associated with the data are readjusted, and it is sent as input to the generator again. Weights are the values associated with data that can influence the output of an algorithm or neural network. The data is then again passed to a discriminator for classification. The process continues until the output of the generator is classified as real by the discriminator. Thus, generators and discriminators work hand-in-hand to produce real-like synthetic data.

Generators and discriminators can be imagined as counterfeiters and police, respectively. The counterfeiters try to create illegal money, and the police try to allow real money and catch counterfeit money.

The idea of generative adversarial networks to reduce the loss function and generate synthetic data is among the most exciting ideas in the field of AI research. Researchers are further trying to find more techniques and ways to improve the GANs’ performance further. If training AI models with the help of GANs become a standard technique, then AI technology will advance at a much quicker pace and create more breakthroughs across all the industries.

Share this article

Leave your comments

Post comment as a guest

terms and condition.
  • Adam Clayton

    Nailed it with your explanation

  • Nick Ramsey

    To call this impressive would be an understatement. That's amazing, fantastic, unbelievable, highly interesting and scary all at once.

  • Seth Baldwin

    Neural Networks don't have feelings yet

  • Alessandro Moreno

    Excellent article

Share this article

Naveen Joshi

Tech Expert

Naveen is the Founder and CEO of Allerin, a software solutions provider that delivers innovative and agile solutions that enable to automate, inspire and impress. He is a seasoned professional with more than 20 years of experience, with extensive experience in customizing open source products for cost optimizations of large scale IT deployment. He is currently working on Internet of Things solutions with Big Data Analytics. Naveen completed his programming qualifications in various Indian institutes.

Cookies user prefences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics