Generative Models I Ian Goodfellow, Sta ff Research Scientist, Google - - PowerPoint PPT Presentation

generative models i
SMART_READER_LITE
LIVE PREVIEW

Generative Models I Ian Goodfellow, Sta ff Research Scientist, Google - - PowerPoint PPT Presentation

Generative Models I Ian Goodfellow, Sta ff Research Scientist, Google Brain MILA Deep Learning Summer School Montral, Qubec 2017-06-27 Density Estimation (Goodfellow 2017) Sample Generation Training examples Model samples (Goodfellow


slide-1
SLIDE 1

Ian Goodfellow, Staff Research Scientist, Google Brain MILA Deep Learning Summer School Montréal, Québec 2017-06-27

Generative Models I

slide-2
SLIDE 2

(Goodfellow 2017)

Density Estimation

slide-3
SLIDE 3

(Goodfellow 2017)

Sample Generation

Training examples Model samples

slide-4
SLIDE 4

(Goodfellow 2017)

Maximum Likelihood

θ∗ = arg max

θ

Ex∼pdata log pmodel(x | θ)

slide-5
SLIDE 5

(Goodfellow 2017)

Taxonomy of Generative Models

Maximum Likelihood Explicit density Implicit density … Tractable density

  • Fully visible belief nets
  • Change of variables

models

Approximate density Variational

Variational autoencoder

Markov Chain

Boltzmann machine

Markov Chain Direct GSN GAN

slide-6
SLIDE 6

(Goodfellow 2017)

Taxonomy of Generative Models

Maximum Likelihood Explicit density Implicit density … Tractable density

  • Fully visible belief nets
  • Change of variables

models

Approximate density Variational

Variational autoencoder

Markov Chain

Boltzmann machine

Markov Chain Direct GSN GAN

slide-7
SLIDE 7

(Goodfellow 2017)

Taxonomy of Generative Models

Maximum Likelihood Explicit density Implicit density … Tractable density

  • Fully visible belief nets
  • Change of variables

models

Approximate density Variational

Variational autoencoder

Markov Chain

Boltzmann machine

Markov Chain Direct GSN GAN

slide-8
SLIDE 8

(Goodfellow 2017)

Fully Visible Belief Nets

  • Explicit formula based on chain

rule:

pmodel(x) = pmodel(x1)

n

Y

i=2

pmodel(xi | x1, . . . , xi−1)

(Frey et al, 1996)

x1 x1 x2 x2 x3 x3 x4 x4 xn xn

slide-9
SLIDE 9

(Goodfellow 2017)

Fully Visible Belief Nets

  • Disadvantages:
  • O(n) non-parallelizable sample

generation runtime

  • Generation not controlled by a

latent code

slide-10
SLIDE 10

(Goodfellow 2017)

Notable FVBNs

PixelCNN (van den Ord et al 2016) MADE (Germain et al 2016) NADE (Larochelle et al 2011) “Autoregressive models”

slide-11
SLIDE 11

(Goodfellow 2017)

Change of Variables

y = g(x) ⇒ px(x) = py(g(x))

  • det

✓∂g(x) ∂x ◆

  • Disadvantages:
  • Transformation must be

invertible

  • Latent dimension must

match visible dimension 64x64 ImageNet Samples Real NVP (Dinh et al 2016) e.g. Nonlinear ICA (Hyvärinen 1999)

slide-12
SLIDE 12

(Goodfellow 2017)

Taxonomy of Generative Models

Maximum Likelihood Explicit density Implicit density … Tractable density

  • Fully visible belief nets
  • Change of variables

models

Approximate density Variational

Variational autoencoder

Markov Chain

Boltzmann machine

Markov Chain Direct GSN GAN

slide-13
SLIDE 13

(Goodfellow 2017)

Taxonomy of Generative Models

Maximum Likelihood Explicit density Implicit density … Tractable density

  • Fully visible belief nets
  • Change of variables

models

Approximate density Variational

Variational autoencoder

Markov Chain

Boltzmann machine

Markov Chain Direct GSN GAN

slide-14
SLIDE 14

(Goodfellow 2017)

Variational Learning

z x

pmodel(x) = Z pmodel(x, z)dz

Latent variable models often have intractable density

slide-15
SLIDE 15

(Goodfellow 2017)

Variational Bound

  • log p(x) log p(x) DKL (q(z)kp(z | x))

=Ez∼q log p(x, z) + H(q)

Variational inference: maximize with respect to q Variational learning: maximize with respect to parameters of p

slide-16
SLIDE 16

(Goodfellow 2017)

Variational Autoencoder

(Kingma and Welling 2013, Rezende et al 2014) CIFAR-10 samples (Kingma et al 2016) Define a neural network that predicts optimal q Define p(z | x ) via another neural network Whole model can be fit via maximization of a single objective function with gradient- based

  • ptimization
slide-17
SLIDE 17

(Goodfellow 2017)

For more information…

  • Max Welling will teach a lesson on variational

inference

slide-18
SLIDE 18

(Goodfellow 2017)

Taxonomy of Generative Models

Maximum Likelihood Explicit density Implicit density … Tractable density

  • Fully visible belief nets
  • Change of variables

models

Approximate density Variational

Variational autoencoder

Markov Chain

Boltzmann machine

Markov Chain Direct GSN GAN

slide-19
SLIDE 19

(Goodfellow 2017)

Deep Boltzmann Machines

(Salakhutdinov and Hinton, 2009)

slide-20
SLIDE 20

(Goodfellow 2017)

Taxonomy of Generative Models

Maximum Likelihood Explicit density Implicit density … Tractable density

  • Fully visible belief nets
  • Change of variables

models

Approximate density Variational

Variational autoencoder

Markov Chain

Boltzmann machine

Markov Chain Direct GSN GAN

slide-21
SLIDE 21

(Goodfellow 2017)

Generative Stochastic Networks

(Bengio et. al, 2013)

slide-22
SLIDE 22

(Goodfellow 2017)

Taxonomy of Generative Models

Maximum Likelihood Explicit density Implicit density … Tractable density

  • Fully visible belief nets
  • Change of variables

models

Approximate density Variational

Variational autoencoder

Markov Chain

Boltzmann machine

Markov Chain Direct GSN GAN

slide-23
SLIDE 23

(Goodfellow 2017)

Generative Adversarial Networks

x sampled from data Differentiable function D D(x) tries to be near 1 Input noise z Differentiable function G x sampled from model D D tries to make D(G(z)) near 0, G tries to make D(G(z)) near 1

(Goodfellow et al., 2014)

slide-24
SLIDE 24

(Goodfellow 2017)

Combining VAEs and GANs: Adversarial Variational Bayes

(Mescheder et al, 2017)

Related:

  • Adversarial autoencoders
  • Adversarially learned inference
  • BiGANs
slide-25
SLIDE 25

(Goodfellow 2017)

What can you do with generative models?

  • Simulated environments and training data
  • Missing data
  • Semi-supervised learning
  • Multiple correct answers
  • Realistic generation tasks
  • Simulation by prediction
  • Learn useful embeddings
slide-26
SLIDE 26

(Goodfellow 2017)

slide-27
SLIDE 27

(Goodfellow 2017)

Generative models for simulated training data

(Shrivastava et al., 2016)

slide-28
SLIDE 28

(Goodfellow 2017)

What can you do with generative models?

  • Simulated environments and training data
  • Missing data
  • Semi-supervised learning
  • Multiple correct answers
  • Realistic generation tasks
  • Simulation by prediction
  • Learn useful embeddings
slide-29
SLIDE 29

(Goodfellow 2017)

What is in this image?

(Yeh et al., 2016)

slide-30
SLIDE 30

(Goodfellow 2017)

Generative modeling reveals a face

(Yeh et al., 2016)

slide-31
SLIDE 31

(Goodfellow 2017)

What can you do with generative models?

  • Simulated environments and training data
  • Missing data
  • Semi-supervised learning
  • Multiple correct answers
  • Realistic generation tasks
  • Simulation by prediction
  • Learn useful embeddings
slide-32
SLIDE 32

(Goodfellow 2017)

Supervised Discriminator

Input Real Hidden units Fake Input Real dog Hidden units Fake Real cat

(Odena 2016, Salimans et al 2016)

slide-33
SLIDE 33

(Goodfellow 2017)

Semi-Supervised Classification

Model Number of incorrectly predicted test examples for a given number of labeled samples 20 50 100 200 DGN [21] 333 ± 14 Virtual Adversarial [22] 212 CatGAN [14] 191 ± 10 Skip Deep Generative Model [23] 132 ± 7 Ladder network [24] 106 ± 37 Auxiliary Deep Generative Model [23] 96 ± 2 Our model 1677 ± 452 221 ± 136 93 ± 6.5 90 ± 4.2 Ensemble of 10 of our models 1134 ± 445 142 ± 96 86 ± 5.6 81 ± 4.3

(Salimans et al 2016) MNIST (Permutation Invariant)

slide-34
SLIDE 34

(Goodfellow 2017)

Semi-Supervised Classification

(Salimans et al 2016)

Model Test error rate for a given number of labeled samples 1000 2000 4000 8000 Ladder network [24] 20.40±0.47 CatGAN [14] 19.58±0.46 Our model 21.83±2.01 19.61±2.09 18.63±2.32 17.72±1.82 Ensemble of 10 of our models 19.22±0.54 17.25±0.66 15.59±0.47 14.87±0.89

Model Percentage of incorrectly predicted test examples for a given number of labeled samples 500 1000 2000 DGN [21] 36.02±0.10 Virtual Adversarial [22] 24.63 Auxiliary Deep Generative Model [23] 22.86 Skip Deep Generative Model [23] 16.61±0.24 Our model 18.44 ± 4.8 8.11 ± 1.3 6.16 ± 0.58 Ensemble of 10 of our models 5.88 ± 1.0

CIFAR-10 SVHN

slide-35
SLIDE 35

(Goodfellow 2017)

What can you do with generative models?

  • Simulated environments and training data
  • Missing data
  • Semi-supervised learning
  • Multiple correct answers
  • Realistic generation tasks
  • Simulation by prediction
  • Learn useful embeddings
slide-36
SLIDE 36

(Goodfellow 2017)

Next Video Frame Prediction

Ground Truth MSE Adversarial

(Lotter et al 2016) What happens next?

slide-37
SLIDE 37

(Goodfellow 2017)

Ground Truth MSE Adversarial

Next Video Frame Prediction

(Lotter et al 2016)

slide-38
SLIDE 38

(Goodfellow 2017)

What can you do with generative models?

  • Simulated environments and training data
  • Missing data
  • Semi-supervised learning
  • Multiple correct answers
  • Realistic generation tasks
  • Simulation by prediction
  • Learn useful embeddings
slide-39
SLIDE 39

(Goodfellow 2017)

iGAN

youtube (Zhu et al., 2016)

slide-40
SLIDE 40

(Goodfellow 2017)

Introspective Adversarial Networks

youtube (Brock et al., 2016)

slide-41
SLIDE 41

(Goodfellow 2017)

Image to Image Translation

Input Ground truth Output

(Isola et al., 2016)

Aerial to Map Labels to Street Scene

input

  • utput

input

  • utput
slide-42
SLIDE 42

(Goodfellow 2017)

Unsupervised Image-to-Image Translation

(Liu et al., 2017) Day to night

slide-43
SLIDE 43

(Goodfellow 2017)

CycleGAN

(Zhu et al., 2017)

slide-44
SLIDE 44

(Goodfellow 2017)

Text-to-Image Synthesis

(Zhang et al., 2016)

This bird has a yellow belly and tarsus, grey back, wings, and brown throat, nape with a black face

slide-45
SLIDE 45

(Goodfellow 2017)

What can you do with generative models?

  • Simulated environments and training data
  • Missing data
  • Semi-supervised learning
  • Multiple correct answers
  • Realistic generation tasks
  • Simulation by prediction
  • Learn useful embeddings
slide-46
SLIDE 46

(Goodfellow 2017)

Simulating particle physics

(de Oliveira et al., 2017) Save millions of dollars of CPU time by predicting

  • utcomes of explicit

simulations

slide-47
SLIDE 47

(Goodfellow 2017)

What can you do with GANs?

  • Simulated environments and training data
  • Missing data
  • Semi-supervised learning
  • Multiple correct answers
  • Realistic generation tasks
  • Simulation by prediction
  • Learn useful embeddings
slide-48
SLIDE 48

(Goodfellow 2017)

Vector Space Arithmetic

  • +

=

Man with glasses Man Woman Woman with Glasses (Radford et al, 2015)

slide-49
SLIDE 49

(Goodfellow 2017)

Learning interpretable latent codes / controlling the generation process

InfoGAN (Chen et al 2016)

slide-50
SLIDE 50

(Goodfellow 2017)

Plug and Play Generative Networks

  • New state of the art generative model (Nguyen et al

2016)

  • Generates 227x227 realistic images from all

ImageNet classes

  • Combines adversarial training, moment matching,

denoising autoencoders, and Langevin sampling

slide-51
SLIDE 51

(Goodfellow 2017)

PPGN Samples

(Nguyen et al 2016)

slide-52
SLIDE 52

(Goodfellow 2017)

PPGN for caption to image

(Nguyen et al 2016)

slide-53
SLIDE 53

(Goodfellow 2017)

Basic idea

  • Langevin sampling repeatedly adds noise and

gradient of log p(x,y) to generate samples (Markov chain)

  • Denoising autoencoders estimate the required

gradient

  • Use a special denoising autoencoder that has been

trained with multiple losses, including a GAN loss, to obtain best results

slide-54
SLIDE 54

(Goodfellow 2017)

Sampling without class gradient

(Nguyen et al 2016)

slide-55
SLIDE 55

(Goodfellow 2017)

GAN loss is a key ingredient

Raw data Reconstruction by PPGN Reconstruction by PPGN without GAN Images from Nguyen et al 2016 First observed by Dosovitskiy et al 2016

slide-56
SLIDE 56

(Goodfellow 2017)

To be continued…

  • Generative Models II will be taught by Aaron

Courville

slide-57
SLIDE 57

(Goodfellow 2017)

For more information…

www.deeplearningbook.org