Generative Adversarial Networks
NIPS, Ian Goodfellow
Presenter: Shuai Zhang, CSE, UNSW
Content
Introduction
Generative Model
Framework of GANs
How do GANs work
Research frontiers
Introduction
“There are many interesting recent development in deep
learning…The most important one, in my opinion, is
adversarial training (also called GAN for Generative
Adversarial Networks). This, and the variations that are
now being proposed is the most interesting idea in the
last 10 years in ML, in my opinion.” – Yann LeCun
Generative Model
generative models: any model that takes a training set, consisting of samples drawn
from a distribution p_data, and learns to represent an estimate of that distribution
somehow
A discriminative model learns a function that maps the input data (x) to some desired
output class label (y). In probabilistic terms, they directly learn the conditional
distribution P(y|x).
A generative model tries to learn the joint probability of the input data and labels
simultaneously, i.e. P(x,y). This can be converted to P(y|x) for classification via Bayes
rule, but the generative ability could be used for something else as well, such as
creating likely new (x, y) samples.
Generative Model
generative models: any model that takes a training set, consisting of samples drawn
from a distribution p_data, and learns to represent an estimate of that distribution
somehow
Generative Model
Advantages
• represent and manipulate high-dimensional probability
distributions
• incorporated into reinforcement learning
• can be trained with missing data and can provide predictions
on inputs that are missing data
• enable machine learning to work with multi-modal outputs
• many tasks intrinsically require realistic generation of samples
from some distribution
Generative Model
Example 1: generate images
Generative Model
Example 2: Vector Space Arithmetic
Generative Model
Example 3: super-resolution
Generative Model
Example 4: Generative Image manipulation
https://www.youtube.com/watch?v=9c4z6YsBGQ0
Generative Model
Example 5: Image-to-image translation
Framework of GANs
Framework of GANs
• Generator
• One takes noise as input and generates sample
• Discriminator
• receives samples from both the generator and
the training data, and has to be able to
distinguish between the two sources
• Relationship between these two neural
network: Competing
https://ishmaelbelghazi.github.io/ALI
How do GANs work
Symbol Meaning
D(x, 𝜃 𝑑) A differentiable function
The probability that x came from the data rather than 𝑝 𝑔
𝜃 𝑑 Parameters of D
𝑝 𝑔 The generator distribution
G(z; 𝜃𝑔) A differentiable function
𝜃𝑔 Parameters of G
z Input noise
𝑃𝑧(z) A prior on input noise variables
Notation
How do GANs work
We train D to maximize the probability of assigning the correct label to both
training examples and samples from G.
We simultaneously train G to minimize log(1 − D(G(z))).
Minimax Game:
How do GANs work
Cost function for discriminator: 𝐽 𝐷
This is just the standard cross-entropy cost that minimized when
training a standard binary classifier with a sigmoid output.
How do GANs work
Cost function for generator: 𝐽 𝐺
Zero-Sum Game ( also called minimax game), in which the sum of all player’s costs
is always zero. So:
How do GANs work
Cost function for generator: 𝐽 𝐺
Disadvantages for this cost function: The generator’s gradient vanishes
To solve this problem, we continue to use cross-entropy minimization for the
generator. We just need to flip the sign of the cost function above, and we get:
How do GANs work
How do GANs work
For each epoch
you only need to do a two-step training.
How do GANs work
For each epoch
you only need to do a two-step training.
How do GANs work
For each epoch, you only need to do a
two-step training.
How do GANs work
https://www.youtube.com/watch?v=0r3g7-
4bMYU&feature=youtu.be
Research frontiers
• Non-convergence: Game solving algorithms may not
approach an equilibrium at all
• Mode Collapse: causes low output diversity
• Evaluation: There is not any single compelling way to
evaluate a generative model
• Discrete outputs: G must be differentiable
• Finding equilibria in games: Simultaneous SGD on
two players costs may not converge to a Nash
equilibrium
References
1. http://blog.aylien.com/introduction-generative-adversarial-networks-code-tensorflow/Generative Model
2. http://www.iangoodfellow.com/slides/2016-12-04-NIPS.pdf
3. https://arxiv.org/pdf/1701.00160.pdf
4. https://zhuanlan.zhihu.com/p/25095905
5. http://gkalliatakis.com/blog/delving-deep-into-gans
6. http://www.rricard.me/machine/learning/generative/adversarial/networks/2017/04/05/gans-part1.html
Thanks!
Q & A

Reading group gan - 20170417

  • 1.
    Generative Adversarial Networks NIPS,Ian Goodfellow Presenter: Shuai Zhang, CSE, UNSW
  • 2.
    Content Introduction Generative Model Framework ofGANs How do GANs work Research frontiers
  • 3.
    Introduction “There are manyinteresting recent development in deep learning…The most important one, in my opinion, is adversarial training (also called GAN for Generative Adversarial Networks). This, and the variations that are now being proposed is the most interesting idea in the last 10 years in ML, in my opinion.” – Yann LeCun
  • 4.
    Generative Model generative models:any model that takes a training set, consisting of samples drawn from a distribution p_data, and learns to represent an estimate of that distribution somehow A discriminative model learns a function that maps the input data (x) to some desired output class label (y). In probabilistic terms, they directly learn the conditional distribution P(y|x). A generative model tries to learn the joint probability of the input data and labels simultaneously, i.e. P(x,y). This can be converted to P(y|x) for classification via Bayes rule, but the generative ability could be used for something else as well, such as creating likely new (x, y) samples.
  • 5.
    Generative Model generative models:any model that takes a training set, consisting of samples drawn from a distribution p_data, and learns to represent an estimate of that distribution somehow
  • 6.
    Generative Model Advantages • representand manipulate high-dimensional probability distributions • incorporated into reinforcement learning • can be trained with missing data and can provide predictions on inputs that are missing data • enable machine learning to work with multi-modal outputs • many tasks intrinsically require realistic generation of samples from some distribution
  • 7.
  • 8.
    Generative Model Example 2:Vector Space Arithmetic
  • 9.
  • 10.
    Generative Model Example 4:Generative Image manipulation https://www.youtube.com/watch?v=9c4z6YsBGQ0
  • 11.
    Generative Model Example 5:Image-to-image translation
  • 12.
  • 13.
    Framework of GANs •Generator • One takes noise as input and generates sample • Discriminator • receives samples from both the generator and the training data, and has to be able to distinguish between the two sources • Relationship between these two neural network: Competing https://ishmaelbelghazi.github.io/ALI
  • 14.
    How do GANswork Symbol Meaning D(x, 𝜃 𝑑) A differentiable function The probability that x came from the data rather than 𝑝 𝑔 𝜃 𝑑 Parameters of D 𝑝 𝑔 The generator distribution G(z; 𝜃𝑔) A differentiable function 𝜃𝑔 Parameters of G z Input noise 𝑃𝑧(z) A prior on input noise variables Notation
  • 15.
    How do GANswork We train D to maximize the probability of assigning the correct label to both training examples and samples from G. We simultaneously train G to minimize log(1 − D(G(z))). Minimax Game:
  • 16.
    How do GANswork Cost function for discriminator: 𝐽 𝐷 This is just the standard cross-entropy cost that minimized when training a standard binary classifier with a sigmoid output.
  • 17.
    How do GANswork Cost function for generator: 𝐽 𝐺 Zero-Sum Game ( also called minimax game), in which the sum of all player’s costs is always zero. So:
  • 18.
    How do GANswork Cost function for generator: 𝐽 𝐺 Disadvantages for this cost function: The generator’s gradient vanishes To solve this problem, we continue to use cross-entropy minimization for the generator. We just need to flip the sign of the cost function above, and we get:
  • 19.
  • 20.
    How do GANswork For each epoch you only need to do a two-step training.
  • 21.
    How do GANswork For each epoch you only need to do a two-step training.
  • 22.
    How do GANswork For each epoch, you only need to do a two-step training.
  • 23.
    How do GANswork https://www.youtube.com/watch?v=0r3g7- 4bMYU&feature=youtu.be
  • 24.
    Research frontiers • Non-convergence:Game solving algorithms may not approach an equilibrium at all • Mode Collapse: causes low output diversity • Evaluation: There is not any single compelling way to evaluate a generative model • Discrete outputs: G must be differentiable • Finding equilibria in games: Simultaneous SGD on two players costs may not converge to a Nash equilibrium
  • 25.
    References 1. http://blog.aylien.com/introduction-generative-adversarial-networks-code-tensorflow/Generative Model 2.http://www.iangoodfellow.com/slides/2016-12-04-NIPS.pdf 3. https://arxiv.org/pdf/1701.00160.pdf 4. https://zhuanlan.zhihu.com/p/25095905 5. http://gkalliatakis.com/blog/delving-deep-into-gans 6. http://www.rricard.me/machine/learning/generative/adversarial/networks/2017/04/05/gans-part1.html
  • 26.

Editor's Notes

  • #2 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #3 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #4 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #5 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #6 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #7 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #8 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #9 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #10 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #11 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #12 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #13 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #14 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #15 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #16 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #17 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #18 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #19 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #20 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #21 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #22 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #23 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #24 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #25 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #26 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation
  • #27 Named Entity Mining from Click-Through Data Using Weakly Supervised Latent Dirichlet Allocation Topic Regression Multi-Modal Latent Dirichlet Allocation for Image Annotation