Top Banner
Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space Anh Nguyen, Jason Yosinski, Yoshua Bengio, Alexey Dosovitskiy, Jeff Clune [GitHub ] [Arxiv] Slides by Víctor Garcia UPC Computer Vision Reading Group (27/01/2017)
71

Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Feb 07, 2017

Download

Data & Analytics

Xavier Giro
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space

Anh Nguyen, Jason Yosinski, Yoshua Bengio, Alexey Dosovitskiy, Jeff Clune

[GitHub] [Arxiv]

Slides by Víctor GarciaUPC Computer Vision Reading Group (27/01/2017)

Page 2: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Index● Introduction ● Probabilistic Interpretation of the method● Methods and Experiments

○ PPGN-x: DAE model of p(x)○ DGN-AM: sampling without a learned prior○ PPGN-h: Generator and DAE model of p(h)○ Joint PPGN-h: joint Generator and DAE

● Further Experiments○ Image Generation: Captioning○ Image Generation: Multifaceted Feature Visualization○ Image inpainting

● Conclusions

Page 3: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Introduction

Interpretation of different frameworks to generate images maximizing:

p(x, y) = p(x)*p(y|x)

Prior Condition

Encourages to look realistic

Encourages to look from a particular class

Page 4: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Introduction

Image Generation:

● High Resolution Images (227x227)

GANs struggle to Generate >64x64 Images

Page 5: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Introduction

Image Generation:

● High Resolution Images

● Intra-Class Variance

Page 6: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Introduction

Image Generation:

● High Resolution Images

● Intra-Class Variance

● Inter-Class Variance (1000-ImageNet classes)

Page 7: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Index● Introduction ● Probabilistic Interpretation of the method● Methods and Experiments

○ PPGN-x: DAE model of p(x)○ DGN-AM: sampling without a learned prior○ PPGN-h: Generator and DAE model of p(h)○ Joint PPGN-h: joint Generator and DAE

● Further Experiments○ Image Generation: Captioning○ Image Generation: Multifaceted Feature Visualization○ Image inpainting

● Conclusions

Page 8: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Probabilistic Interpretation of the methodMetropolis-adjusted Langevin algorithm (MALA) which is a MCMC algorithm for iteratively producing random samples from a distribution p(x):

Page 9: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Probabilistic Interpretation of the methodMetropolis-adjusted Langevin algorithm (MALA) which is a MCMC algorithm for iteratively producing random samples:

Current state

Page 10: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Probabilistic Interpretation of the methodMetropolis-adjusted Langevin algorithm (MALA) which is a MCMC algorithm for iteratively producing random samples:

Future State Current state

Page 11: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Probabilistic Interpretation of the methodMetropolis-adjusted Langevin algorithm (MALA) which is a MCMC algorithm for iteratively producing random samples:

Future State Current state Gradient to the natural manifold of

p(x)

Page 12: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Probabilistic Interpretation of the methodMetropolis-adjusted Langevin algorithm (MALA) which is a MCMC algorithm for iteratively producing random samples:

Gradient to the natural manifold of

p(x)

NoiseFuture State Current state

Page 13: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Probabilistic Interpretation of the method

Future State Current state Gradient to the natural manifold

of p(x)

Noise

Page 14: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Probabilistic Interpretation of the method

p(x)

Page 15: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Probabilistic Interpretation of the method

p(x)

Step towards an image that causes the classifier to produce a higher score for class C

Step towards a more generic image

Noise

Page 16: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Probabilistic Interpretation of the method

xt

Rough example

Page 17: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Probabilistic Interpretation of the method

y_co = Content activations y_st = Style activationsRough example

Page 18: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Probabilistic Interpretation of the method

xt+iRough example

Page 19: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Index● Introduction ● Probabilistic Interpretation of the method● Methods and Experiments

○ PPGN-x: DAE model of p(x)○ DGN-AM: sampling without a learned prior○ PPGN-h: Generator and DAE model of p(h)○ Joint PPGN-h: joint Generator and DAE

● Further Experiments○ Image Generation: Captioning○ Image Generation: Multifaceted Feature Visualization○ Image inpainting

● Conclusions

Page 20: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

MethodWhy Plug & Play ?

Page 21: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Index● Introduction ● Probabilistic Interpretation of the method● Methods and Experiments

○ PPGN-x: DAE model of p(x)○ DGN-AM: sampling without a learned prior○ PPGN-h: Generator and DAE model of p(h)○ Joint PPGN-h: joint Generator and DAE

● Further Experiments○ Image Generation: Captioning○ Image Generation: Multifaceted Feature Visualization○ Image inpainting

● Conclusions

Page 22: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | PPGN-x: DAE model of p(x)What a Denoising Autoencoder is?

x

h(x)

R(x)

Page 23: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | PPGN-x: DAE model of p(x)What a Denoising Autoencoder is?

x_noise

h(x)

x

N(0,σ^2)

R(x)

Page 24: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | PPGN-x: DAE model of p(x)What a Denoising Autoencoder is?

x_noise

h(x)

x

N(0,σ^2)

R(x)

Page 25: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | PPGN-x: DAE model of p(x)

Page 26: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | PPGN-x: DAE model of p(x)

Page 27: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | PPGN-x: DAE model of p(x)1) Poorly modeled data, blurry 2) Slow changes

Page 28: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Index● Introduction ● Probabilistic Interpretation of the method● Methods and Experiments

○ PPGN-x: DAE model of p(x)○ DGN-AM: sampling without a learned prior○ PPGN-h: Generator and DAE model of p(h)○ Joint PPGN-h: joint Generator and DAE

● Further Experiments○ Image Generation: Captioning○ Image Generation: Multifaceted Feature Visualization○ Image inpainting

● Conclusions

Page 29: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | DGN-AM: sampling without a learned priorDeep Generator Network-based Activation Maximization

It is faster if we move over h subspace instead of the x

fc6AlexNet

Page 30: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | DGN-AM: sampling without a learned priorDeep Generator Network-based Activation Maximization

Discriminator 1/0

AlexNet

fc6

Page 31: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | DGN-AM: sampling without a learned priorOnce we trained the network G we find the equation for the MALA algorithm

Page 32: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | DGN-AM: sampling without a learned priorOnce we trained the network G we find the equation for the MALA algorithm

Page 33: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | DGN-AM: sampling without a learned priorOnce we trained the network G we find the equation for the MALA algorithm

Page 34: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | DGN-AM: sampling without a learned priorOnce we trained the network G we find the equation for the MALA algorithm

No learned prior No noise

Page 35: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | DGN-AM: sampling without a learned prior

+ Different modes from different starts- Same image after many steps- Low mixing speed

Page 36: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Index● Introduction ● Probabilistic Interpretation of the method● Methods and Experiments

○ PPGN-x: DAE model of p(x)○ DGN-AM: sampling without a learned prior○ PPGN-h: Generator and DAE model of p(h)○ Joint PPGN-h: joint Generator and DAE

● Further Experiments○ Image Generation: Captioning○ Image Generation: Multifaceted Feature Visualization○ Image inpainting

● Conclusions

Page 37: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | PPGN-h: Generator and DAE model of p(h)

A 7 layers DAE is added to model the prior p(h) in order to increase the mixing speed

Page 38: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | PPGN-h: Generator and DAE model of p(h)

The equation is the following:

Prior p(h) Conditioned Gradient

Noise

Page 39: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | PPGN-h: Generator and DAE model of p(h)- Similar to the last case. Low diversity- p(h) model learned by DAE is too simple

Page 40: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Index● Introduction ● Probabilistic Interpretation of the method● Methods and Experiments

○ PPGN-x: DAE model of p(x)○ DGN-AM: sampling without a learned prior○ PPGN-h: Generator and DAE model of p(h)○ Joint PPGN-h: joint Generator and DAE

● Further Experiments○ Image Generation: Captioning○ Image Generation: Multifaceted Feature Visualization○ Image inpainting

● Conclusions

Page 41: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAEIn order to model p(h) in a more complex way

DAE: h/fc6 → ? → h/fc6

Page 42: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAEIn order to model p(h) in a more complex way

DAE: h/fc6 → ? → h/fc6

Joint Generator and DAE: h/fc6 x h/fc6G E

Page 43: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAEIn order to model p(h) in a more complex way

DAE: h/fc6 → ? → h/fc6

Joint Generator and DAE: h/fc6 x h/fc6G E

With the same existing network we train the Generator G to act as a DAE in conjunction with the E network

Page 44: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAE

AlexNet

Equation is the same than before

Page 45: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAE- Faster mixing- Better quality

Page 46: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and AE

AlexNet

Equation is the same than before

Page 47: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and AE- Faster mixing- Better quality

Page 48: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAE Noise sweepsFor the last model we test the reconstruction of different h/fc6 vectors when adding different noise levels:

fc6N(0, ) +

Page 49: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and AE Noise sweepsFor the last model we test the reconstruction of different h/fc6 vectors when adding different noise levels:

Page 50: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and AE Noise sweeps

Page 51: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and AE Noise sweeps

We can still recover large information from the image when mapping with a lot of noise.Many → one.

Page 52: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAE Combination of Losses

Comparison of Losses:

● Real Images

Page 53: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAE Combination of Losses

Page 54: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAE Combination of Losses

Page 55: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAE Evaluating: Qualitatively

Page 56: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAE Evaluating: Qualitatively

Page 57: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Method | Joint PPGN-h: joint Generator and DAE Evaluating: Qualitatively

Page 58: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Index● Introduction ● Probabilistic Interpretation of the method● Methods and Experiments

○ PPGN-x: DAE model of p(x)○ DGN-AM: sampling without a learned prior○ PPGN-h: Generator and DAE model of p(h)○ Joint PPGN-h: joint Generator and DAE

● Further Experiments○ Image Generation: Captioning○ Image Generation: Multifaceted Feature Visualization○ Image inpainting

● Conclusions

Page 59: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Further Experiments | Captioning

MS-COCO Dataset

Page 60: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Further Experiments | Captioning

Page 61: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Index● Introduction ● Probabilistic Interpretation of the method● Methods and Experiments

○ PPGN-x: DAE model of p(x)○ DGN-AM: sampling without a learned prior○ PPGN-h: Generator and DAE model of p(h)○ Joint PPGN-h: joint Generator and DAE

● Further Experiments○ Image Generation: Captioning○ Image Generation: Multifaceted Feature Visualization○ Image inpainting

● Conclusions

Page 62: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Further Experiments | MFVMultifaceted Feature Visualization

Page 63: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Multifaceted Feature Visualization

Further Experiments | MFV

Page 64: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Index● Introduction ● Probabilistic Interpretation of the method● Methods and Experiments

○ PPGN-x: DAE model of p(x)○ DGN-AM: sampling without a learned prior○ PPGN-h: Generator and DAE model of p(h)○ Joint PPGN-h: joint Generator and DAE

● Further Experiments○ Image Generation: Captioning○ Image Generation: Multifaceted Feature Visualization○ Image inpainting

● Conclusions

Page 65: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Further Experiments | InpaintingMultifaceted Feature Visualization

Page 66: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Further Experiments | InpaintingMultifaceted Feature Visualization

Page 67: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Further Experiments | InpaintingMultifaceted Feature Visualization

Page 68: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Further Experiments | InpaintingMultifaceted Feature Visualization

Page 69: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Further Experiments | InpaintingMultifaceted Feature Visualization

Page 70: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)

Conclusions

● Only using GANs for the reconstruction, GANs collapse into fewer modes, far from the original p(x).

● Using extra Losses it is possible to better reconstruct the images even for 1000 classes and for higher resolution. Mapping one-to-one helps to prevent typical latent → missing modes.

● It would be great to generate also the embedding space for this super-resolution multi-class images instead of using a supervised learned space.

Page 71: Plug & Play Generative Networks: Conditional Iterative Generation of Images in Latent Space (UPC Reading Group)