Generative Adversarial Neural Network
(GAN)
and
it's use cases
Team members
Contents
• Introduction
• Need for GAN
• How GAN works
• Discriminator
• Generator
• In simple words
• Working of both Generator and Discriminator together
• Use cases of GAN in real world
• Conclusion
• References
Deep Learning
• The purpose of deep learning is to discover rich, hierarchical
models that represent probability distributions over the kinds of
data encountered in artificial intelligence applications, such as
natural images, audio waveforms containing speech, and symbols
in natural language.
Introduction
• Generative Adversarial Networks (GANs) are a powerful class of
neural networks that are used for unsupervised learning. It was
developed and introduced by Ian J. Goodfellow in 2014. GANs
are basically made up of a system of two competing neural
network models which compete with each other and are able to
analyze, capture and copy the variations within a dataset.
• GANs can create anything whatever we feed to them, as it Learn-
Generate-Improve.
CNN
• To understand GANs first we must have little understanding of
Convolutional Neural Networks. CNNs are trained to classify
images with respect to their labels if an image is fed to a CNN, it
analyzes the image pixel by pixel and is passed through nodes
present in CNN’s hidden layers and as an output, it tells what the
image is about or what it sees in the image.
• For example:
• If a CNN is trained to classify dogs and cats and an image is fed
to this CNN, it can tell whether there is a dog or a cat in that
image. Therefore it can also be called as a classification
algorithm.
• The generative model can be thought of as analogous to a team
of counterfeiters,trying to produce fake currency and use it without
detection, while the discriminative model is analogous to the
police, trying to detect the fake currency.
• Competition in this game drivesboth teams to improve their
methods until the counterfeits are indistiguishable from the
genuine articles.
Why we need GAN ?
• Most of the mainstream neural nets can be easily fooled into
misclassifying things by adding only a small amount of noise into the
original data. Sometimes the model after adding noise has higher
confidence in the wrong prediction than when it predicted correctly.
The reason for such adversary is that most machine learning models
learn from a limited amount of data, which is a huge drawback, as it is
prone to overfitting. Also, the mapping between the input and the
output is almost linear and even a small change in a point in the feature
space might lead to misclassification of data.
How GAN works
• Generative:
To learn a generative model, which describes how data is generated in terms of
a probabilistic model.
• Adversarial:
The training of a model is done in an adversarial setting.
• Networks:
Use deep neural networks as the artificial intelligence (AI) algorithms for training
purpose.
• In GANs, there is a generator and a discriminator. The Generator
generates fake samples of data and tries to fool the Discriminator.
The Discriminator, on the other hand, tries to distinguish between
the real and fake samples. The Generator and the Discriminator are
both Neural Networks and they both run in competition with each
other in the training phase. The steps are repeated several times
and in this, the Generator and Discriminator get better and better in
their respective jobs after each repetition.
• Here, the generative model captures the distribution of data and is
trained in such a manner that it tries to maximize the probability of
the Discriminator in making a mistake. The Discriminator, on the
other hand, is based on a model that estimates the probability that
the sample that it got is received from the training data and not
from the Generator.
Discriminator –
• This part of GANs can be considered similar to what CNNs does.
Discriminator is a Convolutional Neural Network consisting of many hidden
layers and one output layer, the major difference here is the output layer of
GANs can have only two outputs, unlike CNNs.
• The output of the discriminator can either be 1 or 0 because of a specifically
chosen activation function for this task, if the output is 1 then the provided
data is real and if the output is 0 then it refers to it as fake data.
• Discriminator is trained on the real data so it learns to recognize how actual
data looks like and what features should the data have to be classified as
real.
Generator
Generator is an Inverse Convolutional Neural Net, it does exactly
opposite of what a CNN does, because in CNN an actual image is
given as an input and a classified label is expected as an output but
in Generator, a random noise (a vector having some values to be
precise) is given as an input to this Inverse CNN and an actual
image is expected as an output.
In simple terms, it generates data from a piece of data using
its own imagination.
Working of both Generator and Discriminator together
• Discriminator is trained on actual data to classify whether given
data is true or not, so Discriminator’s work is to tell what’s real and
what’s fake.
• Generator starts to generate data from a random input and then
that generated data is passed to Discriminator as input now
Discriminator analyzes the data and checks how close it is to be
classified as real, if the generated data does not contain enough
features to be classified as real by the Discriminator, then this
data and weights associated with it are sent back to the Generator
using backpropagation.
• so that it can re-adjust the weights associated with the data and
create new data which is better than the previous one. This
freshly generated data is again passed to the Discriminator and it
continues.
• This process keeps repeating as long as the Discriminator keeps
classifying the generated data as fakes, for every time data is
classified as fake and with every backpropagation the quality of
data keeps getting better and better and there comes a time when
the Generator becomes so accurate that it becomes tough to
distinguish between the real data and the data generated by the
Generator.
In Simple terms,
• Discriminator is a trained guy who can tell what’s real and what’s
fake and Generator is trying to fool the Discriminator and make
him believe that the generated data is real, with each
unsuccessful attempt Generator learns and improves itself to
produce data more real like.
• It can also be stated as a competition between Generator and
Discriminator.
Use Cases of Generative Adversarial Networks
• Generative Adversarial Networks (GANs) are most popular for
generating images from a given dataset of images but GANs is
now being used for a variety of applications. These are a class of
neural network that has a discriminator block and a generator
block which works together and is able to produce new samples
apart from just classifying of predicting the class of sample.
• It can generates new data.
Face Image to face emoji
Semantic-Image-to-Photo Translation
Image-to-Image Translation
In area of data security -
Artificial intelligence has proved to be a boon to many industries but
it is also surrounded by the problem of Cyber threats.GANs are
proved to be a great help to handle the adversarial attacks. The
adversarial attacks use a variety of techniques to fool deep learning
architectures. By creating fake examples and training the model to
identify them we counter these attacks.
Generating Data using GANs:
Data is the most important key for any deep learning algorithm. In
general, more is the data, better is the performance of any deep
learning algorithm. But in many cases such as health diagnostics,
the amount of data is restricted, in such cases, there is a need to
generate good quality data. For which GANs are being used.
Privacy Preservance using GAN -
There are many cases when our data needs to be kept
confidential. This is especially useful in defense and military
applications. We have many data encryption schemes but each
has its own limitations, in such a case GANs can be useful.
Recently, in 2016, Google opened a new research path on using
GAN competitive framework for encryption problem, where two
networks had to compete in creating the code and cracking it
Data Manipulation using GAN-
• We can use GANs for pseudo style transfer i.e. modifying a part of
subject, without complete style transfer. For e.g. in many
applications, we want to add a smile to an image, or just work on
the eyes part of the image. This can also be extended to other
domains such as Natural Language Processing, speech
processing, etc. For e.g. we can work on some selected words of
a paragraph without modifying the whole paragraph.
Conclusion
• Train Two models-
• a generative model (G) that captures the data distribution, and a
discriminative model (D) that estimates the probability that a
sample came from the training data rather than G. The training
procedure for G is to maximize the probability of D making a
mistake.
Conclusion
• A GAN consists of two neural nets a generator and a
discriminator.
• The generator creates fake images , a discriminator tries to
discern if it is real or if it is fake. Over time both get better.
• In recent ,NVIDIA found that by progressively adding new
layers to both networks improved the quality of the network
and speed up training time.
• Thank you!

Generative Adversarial Network (GAN)

  • 1.
    Generative Adversarial NeuralNetwork (GAN) and it's use cases
  • 2.
  • 3.
    Contents • Introduction • Needfor GAN • How GAN works • Discriminator • Generator • In simple words • Working of both Generator and Discriminator together • Use cases of GAN in real world • Conclusion • References
  • 4.
    Deep Learning • Thepurpose of deep learning is to discover rich, hierarchical models that represent probability distributions over the kinds of data encountered in artificial intelligence applications, such as natural images, audio waveforms containing speech, and symbols in natural language.
  • 5.
    Introduction • Generative AdversarialNetworks (GANs) are a powerful class of neural networks that are used for unsupervised learning. It was developed and introduced by Ian J. Goodfellow in 2014. GANs are basically made up of a system of two competing neural network models which compete with each other and are able to analyze, capture and copy the variations within a dataset. • GANs can create anything whatever we feed to them, as it Learn- Generate-Improve.
  • 6.
    CNN • To understandGANs first we must have little understanding of Convolutional Neural Networks. CNNs are trained to classify images with respect to their labels if an image is fed to a CNN, it analyzes the image pixel by pixel and is passed through nodes present in CNN’s hidden layers and as an output, it tells what the image is about or what it sees in the image.
  • 7.
    • For example: •If a CNN is trained to classify dogs and cats and an image is fed to this CNN, it can tell whether there is a dog or a cat in that image. Therefore it can also be called as a classification algorithm.
  • 8.
    • The generativemodel can be thought of as analogous to a team of counterfeiters,trying to produce fake currency and use it without detection, while the discriminative model is analogous to the police, trying to detect the fake currency. • Competition in this game drivesboth teams to improve their methods until the counterfeits are indistiguishable from the genuine articles.
  • 9.
    Why we needGAN ? • Most of the mainstream neural nets can be easily fooled into misclassifying things by adding only a small amount of noise into the original data. Sometimes the model after adding noise has higher confidence in the wrong prediction than when it predicted correctly. The reason for such adversary is that most machine learning models learn from a limited amount of data, which is a huge drawback, as it is prone to overfitting. Also, the mapping between the input and the output is almost linear and even a small change in a point in the feature space might lead to misclassification of data.
  • 10.
    How GAN works •Generative: To learn a generative model, which describes how data is generated in terms of a probabilistic model. • Adversarial: The training of a model is done in an adversarial setting. • Networks: Use deep neural networks as the artificial intelligence (AI) algorithms for training purpose.
  • 11.
    • In GANs,there is a generator and a discriminator. The Generator generates fake samples of data and tries to fool the Discriminator. The Discriminator, on the other hand, tries to distinguish between the real and fake samples. The Generator and the Discriminator are both Neural Networks and they both run in competition with each other in the training phase. The steps are repeated several times and in this, the Generator and Discriminator get better and better in their respective jobs after each repetition.
  • 13.
    • Here, thegenerative model captures the distribution of data and is trained in such a manner that it tries to maximize the probability of the Discriminator in making a mistake. The Discriminator, on the other hand, is based on a model that estimates the probability that the sample that it got is received from the training data and not from the Generator.
  • 14.
    Discriminator – • Thispart of GANs can be considered similar to what CNNs does. Discriminator is a Convolutional Neural Network consisting of many hidden layers and one output layer, the major difference here is the output layer of GANs can have only two outputs, unlike CNNs. • The output of the discriminator can either be 1 or 0 because of a specifically chosen activation function for this task, if the output is 1 then the provided data is real and if the output is 0 then it refers to it as fake data. • Discriminator is trained on the real data so it learns to recognize how actual data looks like and what features should the data have to be classified as real.
  • 16.
    Generator Generator is anInverse Convolutional Neural Net, it does exactly opposite of what a CNN does, because in CNN an actual image is given as an input and a classified label is expected as an output but in Generator, a random noise (a vector having some values to be precise) is given as an input to this Inverse CNN and an actual image is expected as an output. In simple terms, it generates data from a piece of data using its own imagination.
  • 18.
    Working of bothGenerator and Discriminator together • Discriminator is trained on actual data to classify whether given data is true or not, so Discriminator’s work is to tell what’s real and what’s fake. • Generator starts to generate data from a random input and then that generated data is passed to Discriminator as input now Discriminator analyzes the data and checks how close it is to be classified as real, if the generated data does not contain enough features to be classified as real by the Discriminator, then this data and weights associated with it are sent back to the Generator using backpropagation.
  • 20.
    • so thatit can re-adjust the weights associated with the data and create new data which is better than the previous one. This freshly generated data is again passed to the Discriminator and it continues. • This process keeps repeating as long as the Discriminator keeps classifying the generated data as fakes, for every time data is classified as fake and with every backpropagation the quality of data keeps getting better and better and there comes a time when the Generator becomes so accurate that it becomes tough to distinguish between the real data and the data generated by the Generator.
  • 22.
    In Simple terms, •Discriminator is a trained guy who can tell what’s real and what’s fake and Generator is trying to fool the Discriminator and make him believe that the generated data is real, with each unsuccessful attempt Generator learns and improves itself to produce data more real like. • It can also be stated as a competition between Generator and Discriminator.
  • 23.
    Use Cases ofGenerative Adversarial Networks • Generative Adversarial Networks (GANs) are most popular for generating images from a given dataset of images but GANs is now being used for a variety of applications. These are a class of neural network that has a discriminator block and a generator block which works together and is able to produce new samples apart from just classifying of predicting the class of sample. • It can generates new data.
  • 24.
    Face Image toface emoji
  • 25.
  • 26.
  • 27.
    In area ofdata security - Artificial intelligence has proved to be a boon to many industries but it is also surrounded by the problem of Cyber threats.GANs are proved to be a great help to handle the adversarial attacks. The adversarial attacks use a variety of techniques to fool deep learning architectures. By creating fake examples and training the model to identify them we counter these attacks.
  • 28.
    Generating Data usingGANs: Data is the most important key for any deep learning algorithm. In general, more is the data, better is the performance of any deep learning algorithm. But in many cases such as health diagnostics, the amount of data is restricted, in such cases, there is a need to generate good quality data. For which GANs are being used.
  • 29.
    Privacy Preservance usingGAN - There are many cases when our data needs to be kept confidential. This is especially useful in defense and military applications. We have many data encryption schemes but each has its own limitations, in such a case GANs can be useful. Recently, in 2016, Google opened a new research path on using GAN competitive framework for encryption problem, where two networks had to compete in creating the code and cracking it
  • 30.
    Data Manipulation usingGAN- • We can use GANs for pseudo style transfer i.e. modifying a part of subject, without complete style transfer. For e.g. in many applications, we want to add a smile to an image, or just work on the eyes part of the image. This can also be extended to other domains such as Natural Language Processing, speech processing, etc. For e.g. we can work on some selected words of a paragraph without modifying the whole paragraph.
  • 31.
    Conclusion • Train Twomodels- • a generative model (G) that captures the data distribution, and a discriminative model (D) that estimates the probability that a sample came from the training data rather than G. The training procedure for G is to maximize the probability of D making a mistake.
  • 32.
    Conclusion • A GANconsists of two neural nets a generator and a discriminator. • The generator creates fake images , a discriminator tries to discern if it is real or if it is fake. Over time both get better. • In recent ,NVIDIA found that by progressively adding new layers to both networks improved the quality of the network and speed up training time.
  • 33.