What Are Generative Adversarial Networks? Examples & FAQs

What Are Generative Adversarial Networks? Examples & FAQs

E
by Evelyn Addison — 3 weeks ago in Machine Learning 4 min. read
974

In the context of Machine Learning, Generative Adversarial Networks are a new architecture that proffers distinctive capability to the algorithm to produce outcomes more accurately.

In today’s blog, I will discuss what I have learned about Generative Adversarial Networks (GANs) including use cases, types, and future scope.

Also read: AutoGPT: How To Install, Download, & Use In 2023

Understanding Generative Adversarial Networks

Previously, it was hard for me to understand GANs.

As I kept reading about this new-age machine learning architecture, I was aware of what it is.

In simple terms, Generative Adversarial Networks, in short, GANs generate new results (fresh outcomes) from training data provided.

I found it very much similar to ChatGPT which is a new-age conversational chatbot capable of answering and solving human questions and complex regression.

The fact is, it uses GANs to generate responses to comments made by humans.

If I go more deeply into the matter, Generative Adversarial Networks use two neural networks (generator and discriminator) both are cleared with their tasks.

Here’s their short description:

  • It is tasked to generate fake subjects (be it image, video, or object) and put it into action to fool the discriminator.
  • It is tasked to distinguish between the real and fake samples. Also, it takes input from real data samples and from the generator.

We will look into its working model later. For now, let’s be aware of its types.

!

Types Of Generative Adversarial Networks (GANs) Models

There are a total five of GANs subsets used in the generative new results process and those are briefly discussed underneath.

1. Vanilla GAN: A very standard form of GAN in which the Generator and the Discriminator are simple. Meaning, a non-complex algorithm is used to optimise the mathematical situation.

2. Conditional GAN (CGAN): You can say it as a customised GAN. In this, the prompter inputs some conditional parameters. In this, an additional parameter is added, for instance; Y is added to the Generator for generating the correspondence data.

Also, a label is added to the Discriminator in accordance to help it to distinguish between real data and fake data.

3. Deep Convolutional GAN (DCGAN): It’s the most used GAN form to generate new accurate results. It is different from the above two, as it uses ConvNet structure to generate results.

In this, the Generator acts with fractionally-strided convolutional layers and the Discriminator acts with strided convolutional layers.

4. Laplacian Pyramid GAN (LAPGAN): This form of GAN is used to generate high-quality images. The architecture works in a laplacian pyramid consists of a set of band-pass images, spaced an octave apart, plus a low-frequency residual.

5. Super Resolution GAN (SRGAN): Another GAN form used to enhance images. SRGAN uses a deep neural network in tie-up with an adversarial network.

Now that you are aware of the types of GANs, let’s learn how its architecture works.

How Does Generative Adversarial Networks Work?

Generative Adversarial Networks work simply by taking inputs from the Generator and real world samples and then processing it using the types of GANs (that we discussed above), and generate new results or possibilities.

The working model of GAN can be divided into three categories:

  • Generative: This element describes how data is generated considering a probabilistic model.
  • Adversarial: It represents the training of a model in an argument setting.
  • Networks: Uses deep learning networks for training purposes.

The above three elements work in a disciplined manner and empower models to produce new results accurately.

In GANs, two pin-point neural networks called generator and discriminator both run in competition with each other in the training phase. And the process keeps running for many times again and again. It is because both get better and better in repetition phases.

In the below diagram, you can visualise the working of GANs.

Generative Adversarial Network Architecture and its Components

As far as I can understand, the discriminator takes data from two sources; from the generator (which generates fake samples) and from real data samples (which are real in general), further validates between real and fake, and goes in iteration.

The decision on behalf of which the results are accumulated is achieved by mathematical formula, mentioned below.

Loss function for a GAN Model

Where,

G = Generator
D = Discriminator
Pdata(x) = distribution of real data
P(z) = distribution of generator
x = sample from Pdata(x)
z = sample from P(z)
D(x) = Discriminator network
G(z) = Generator network

To get more information about this mathematical formula working, refer to an internet glossary.


Use Cases Of GANs

The possibilities of getting new results from GANs model is both immersive and impressive. As it is being used by top giant conglomerates like Amazon, Alphabet, Apple, and other big tech-giants.

It is becoming a satisfied and useful ML model to use for several scenarios but not limited to data augmentation, anomaly detection, and picture synthesis.

Common use cases of generative adversarial networks:

  • Generating human faces, an act of deepfakes.
  • Developing new fashion design or possibilities.
  • Creating hyper-real images from text in any form.
  • Predicting potential revenue ratio for the company.
  • Video game character creation and much more.

You can think of DALL-E used for creating images from text.

And, the later, Midjourney platform for creating hyperreal images that are nearly indistinguishable from photographs.


Future Scope Of Generative Adversarial Network

The future of GANs models are in the limelight.

The saying is valid because these deep learning networks provide machine learning a whole new look and context with Artificial Intelligence, bringing the impossibilities happening in reality.

The StyleGAN and BigGAN is a deep learning system that provided a world with great inventions like generating ultra-realistic images of people, cars, and households.

What GANs are capable of doing in future is a notion of interesting and mysterious tail to know.

Also read: How To Use NightCafe AI? Tutorial For Beginners + Tips

Frequently Asked Questions

What is generative adversarial networks in simple words?

In simple terms, Generative Adversarial Networks, in short, GANs generate new results (fresh outcomes) from training data provided.

What are the examples of Generative Adversarial Networks?

Text to image translation and image to text translation is the example of GANs model.

Is GAN supervised or unsupervised?

GAN is observed as unsupervised deep learning architecture because all data have the label “real”, while the generated ones have the label “fake”.

Is GANs a neural network?

Yes, GANs uses several neural networks that are used for unsupervised learning.


Evelyn Addison

Evelyn is an assistant editor for The Next Tech and Just finished her master’s in modern East Asian Studies and plans to continue with her old hobby that is computer science.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Copyright © 2018 – The Next Tech. All Rights Reserved.