Solving mode collapse with Autoencoder GANs Mihaela Rosca Thanks - - PowerPoint PPT Presentation

solving mode collapse with autoencoder gans
SMART_READER_LITE
LIVE PREVIEW

Solving mode collapse with Autoencoder GANs Mihaela Rosca Thanks - - PowerPoint PPT Presentation

Solving mode collapse with Autoencoder GANs Mihaela Rosca Thanks to: Balaji Lakshminarayanan, David Warde-Farley, Shakir Mohamed Autoencoders code L 1 /L 2 reconstruction loss Image Credit: mikicon, the Noun Project Adversarial autoencoders


slide-1
SLIDE 1

Thanks to: Balaji Lakshminarayanan, David Warde-Farley, Shakir Mohamed

Solving mode collapse with Autoencoder GANs

Mihaela Rosca

slide-2
SLIDE 2
slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5

Autoencoders

L1/L2 reconstruction loss

Image Credit: mikicon, the Noun Project

code

slide-6
SLIDE 6

Adversarial autoencoders

Improve reconstruction quality by adding a GAN loss.

Adversarial Autoencoders

  • A. Makhzani, J. Shlens, N.Jaitly, I. Goodfellow, B. Frey
slide-7
SLIDE 7

By construction, autoencoders learn to cover the entire training data.

slide-8
SLIDE 8

Autoencoder GANs

Combine the reconstruction power of autoencoders with the sampling power of GANs!

slide-9
SLIDE 9

How to sample?

slide-10
SLIDE 10

Work on the code space

  • not data space.
slide-11
SLIDE 11

reconstructing

Image Credit: mikicon, the Noun Project

1) Learning the code distribution

Assumption

learning the code distribution is simpler than learning data distribution sampling learn p(codes)

slide-12
SLIDE 12

reconstructing sampling

2) Match the code distribution to a desired prior

match prior

slide-13
SLIDE 13

Working on the code space

l e a r n p ( c

  • d

e s ) match prior reconstructing sampling

slide-14
SLIDE 14

Learning the code distribution

slide-15
SLIDE 15

Learning the code distribution: PPGN

Plug and play generative models

  • A. Nguyen, J. Clune, Y, Bengio, A. Dosovitskiy, J. Yosinski
slide-16
SLIDE 16

PPGN - key ingredients

  • Reconstructions

○ Autoencoder + GAN + Perceptual loss in feature space

  • Samples

○ Markov Chain ○ Conditioning

slide-17
SLIDE 17

PPGN

L1/L2 reconstruction GAN loss Perceptual loss

Not depicted:

  • Activation Maximization
  • Encoder is pretrained classifier
slide-18
SLIDE 18

PPGN: sampling using a denoising autoencoder

Learn ∇p c) using a DAE, then sample using MCMC

slide-19
SLIDE 19

Limitations of PPGN

  • Not end to end

○ Need to pretrain an encoder on the same dataset

  • Depends on labels for:

○ Conditioning samples ○ Pretrained encoder

  • Markov Chains

○ when to stop? ○ missing rejection step

Learning the code distribution

slide-20
SLIDE 20

Matching a desired prior

slide-21
SLIDE 21

reconstructing sampling

2) Match the code distribution to a desired prior

match prior

slide-22
SLIDE 22

Sounds familiar?

slide-23
SLIDE 23

Variational inference - the ELBO

likelihood term KL term good reconstructions match the prior

slide-24
SLIDE 24

reconstructing sampling

Variational autoencoders

computed analytically computed analytically match prior

slide-25
SLIDE 25

AlphaGAN GANs VAEs

AlphaGAN

combining GANs and VAEs

  • variational
  • inference

○ reconstructions ○ encoder network

  • the posterior latent

matches the prior

  • implicit

○ encoder ○ decoder

  • discriminators used to

match distributions

Variational Approaches for Auto-Encoding Generative Adversarial Networks

  • M. Rosca, B. Lakshminarayanan, D. Warde-Farley, S. Mohamed
slide-26
SLIDE 26

reconstructing sampling

AlphaGAN

estimated from samples codes discriminator match prior estimated from samples data discriminator

slide-27
SLIDE 27

Q: how do we estimate the terms in the ELBO using GANs?

slide-28
SLIDE 28

Density ratio trick

Estimate the ratio of two distributions only from samples, by building a binary classifier to distinguish between them.

slide-29
SLIDE 29

Using GANs for variational inference - the ELBO

slide-30
SLIDE 30

ELBO - likelihood term

slide-31
SLIDE 31

ELBO - the KL term

slide-32
SLIDE 32

From the ELBO to loss functions

We want to match:

  • the reconstruction and data

distributions

○ likelihood term

  • the code and prior distributions

○ the KL

Tools for matching distributions:

  • (GAN) the density ratio trick
  • (VAE) observer likelihoods

○ reconstructions losses

slide-33
SLIDE 33

reconstructing sampling

New loss functions - via the density ratio trick

match prior GAN loss (make samples close to reconstructions) Reconstruction loss (avoid mode collapse) + GAN loss (improve recon quality)

slide-34
SLIDE 34
slide-35
SLIDE 35
slide-36
SLIDE 36

Samples

slide-37
SLIDE 37

Cifar10 - Inception score

Improved Techniques for Training GANs

  • T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, X. Chen

Classifier trained on Imagenet Classifier trained on Cifar10

slide-38
SLIDE 38

CelebA - sample diversity

Improved Techniques for Training GANs

  • T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, X. Chen

(1 - MS-SSIM)

slide-39
SLIDE 39

Matching the prior - AGE

  • the encoder is the discriminator

○ forces data codes to match the prior ○ sample codes to not match the prior

It Takes (Only) Two: Adversarial Generator-Encoder Networks

  • D. Ulyanov, A. Vedaldi, V. Lempitsky
slide-40
SLIDE 40

Analysis of methods

slide-41
SLIDE 41

Try Autoencoder GANs if mode collapse is a problem.

Summary

Combining different learning principles results in a family of novel algorithms.

slide-42
SLIDE 42

References

It Takes (Only) Two: Adversarial Generator-Encoder Networks

  • D. Ulyanov, A. Vedaldi, V. Lempitsky

Improved Techniques for Training GANs

  • T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, X. Chen

Variational Approaches for Auto-Encoding Generative Adversarial Networks

  • M. Rosca, B. Lakshminarayanan, D. Warde-Farley, S. Mohamed

Plug and play generative models

  • A. Nguyen, J. Clune, Y, Bengio, A. Dosovitskiy, J. Yosinski

Adversarial Autoencoders

  • A. Makhzani, J. Shlens, N.Jaitly, I. Goodfellow, B. Frey

Generative Adversarial Networks

  • I. Goodfellow, J. Pouget-Abadie, M. Mirza, B.Xu,
  • D. Warde-Farley, S. Ozair, A.Courville, Y. Bengio

Adversarial Variational Bayes: Unifying Variational Autoencoders and Generative Adversarial Networks

  • L. Mescheder, S. Nowozin, A. Geiger

Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks

  • A. Radford, L. Metz, S. Chintala

Auto-Encoding Variational Bayes

  • D. P. Kingma, M. Welling