GAN Introduction
Hyungjoo Cho
Generative Model
CAT
Generative Model
OWL
Generative Model
CAT
OWL
Generative Model
Let’s Think
A CAT ? 😺
A CAT ? 😺
A CAT ! 😺
Ideal Generative Model
Model
CAT
Short
Hair
Big
Ear
Ideal Generative Model
Model
CAT
Short
Hair
Big
Ear
Ideal Generative Model
Model
CAT
Short
Hair
Big
Ear
Tabby
Ideal Generative Model
Model
CAT
Short
Hair
Big
Ear
Tabby Savannah Cat
Why Generative
• Use high-dimensional, complicated probability distributions

• Combining with Reinforcement learning

• Missing data

• Semi-supervised learning

• Multi-modal outputs

• Code

• Can make data with realistic generation
–Richard Feynman
“What I cannot create, I do not understand.”
Deep Generative Models
What is Generative Model
https://blog.openai.com/generative-models/
Toy Example
Generative model
Generator (TF-code)
Result … 😢
Maybe we need more conditions…
Deep Generative Models
• Auto-Regressive Models

• Variational Auto-Encoder

• Generative Adversarial Networks
Auto-Regressive Models
Auto-Regressive Models
http://slazebni.cs.illinois.edu/spring17/lec13_advanced.pdf
Multi-Dimensional RNNs
<Graves et al, Multi-Dimensional Recurrent Neural Networks, 2013>
2D RNN Forward and Backward passes
Sequence ordering (not fixed) Multi-directional MDRNNs
Spatial LSTM
<Theis et al, Generative Image Modeling Using Spatial LSTMs, 2015>
Pixel RNN
<Aaron et al, Pixel Recurrent Neural Networks, 2016>
Sampling
• Feed the 2D vector of zeros( I ) to the generator

➔ The output vector : O

• O is softmax activations for each pixel

➔ Probability of first pixel value : p(0, 0)
• Random sampling from p(0, 0)

➔ Set the very first pixel of I with sampled value

• Feed I to the generator 

• Iteration…
Results
<Aaron et al, Pixel Recurrent Neural Networks, 2016>
Features
• Simple and stable training process

• Best log likelihoods so far

• Inefficient during sampling

• Don’t easily provide simple low-dimensional codes for images
Variational Auto-Encoder
Variational Inference
Variational Inference
Latent variables
Model
CAT
Short
Hair
Big
Ear
Tabby Savannah Cat
Latent variables
Model
CAT
Short
Hair
Big
Ear
Tabby Savannah Cat
Latent Space Data Space
Latent variables
Model
Latent Space Data Space
Low Dimension High Dimension
Mapping Function
Variational Inference
Well Known Distribution
: Multivariate Gaussian
Variational Inference
Well Known Distribution
: Multivariate Gaussian
Sampling
Variational Inference
Well Known Distribution
: Multivariate Gaussian
Sampling
Make Distribution
: Pairs of
Mean, Variance
Kullback Leibler Divergence
Kullback Leibler Divergence
Kullback Leibler Divergence
Variational Inference
Well Known Distribution
: Multivariate Gaussian
Sampling
Make Distribution
: Pairs of
Mean, Variance
Optimize
Variational Auto-Encoder
Objective (Evidence Lower BOund)
Objective (Evidence Lower BOund)
Maximize Log-likelihood Minimize the distance of p and q
Auto-Encoder
Reparameterization Trick
Results
Features
• Simple and stable training process

• Can check log likelihood
• Latent variable
• Low quality
Generative Adversarial Nets
GANs
GANs
Vanilla GANs
Vanilla GANs
Vanilla GANs
<Goodfellow et al, Generative Adversarial Networks, 2014>
Results
<Goodfellow et al, Generative Adversarial Networks, 2014>
Features
• Advanced quality

• Unstable training

• Mode collapsing

• Cannot check log likelihood
Vanilla GANs
Model
Loss
Hyper
Parameters
Code
DCGAN
Deep Convolutional GAN
<Radford et al, Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks, 2015>
Tips !!
Issues during Training
• Mode Collapsing / Oscillating

• Intractable Training Loss

• Balance btw Generator & Discriminator 

• Manipulation

• Not Enough Quality
Mode Collapsing / Oscillating
The generator rotates through the modes of the data distribution.
<Metz et al, Unrolled Generative Adversarial Networks, 2016>
Mode Collapsing / Oscillating
< https://www.slideshare.net/HyungjooCho2/deep-generative-modelpdf >
Mode Collapsing / Oscillating
GAN uses Jenen-Shannon Divergence
Mode Collapsing / Oscillating
Target MLE JS R-KL
Mode Collapsing / Oscillating
Target MLE JS R-KL
JS and Reverse KL Divergence tend to favor under-generalization.

It never converges to a fixed distribution, and only ever assigns significant probability mass
to a single data mode at once.
Intractable Loss
Intractable Loss
< https://www.slideshare.net/ssuser77ee21/generative-adversarial-networks-70896091 >
Intractable Loss
Intractable Loss
Intractable Loss
GAN
LSGAN WGAN
Intractable Loss
The Wasserstein distance(left plot) is continuous and provides a usable gradient everywhere.

The JS plot(right) is not continuous and does not provide a usable gradient.
<Arjovsky et al, Wasserstein Generative Adversarial Networks, 2017>
Intractable Loss
The WGAN’s loss decreases consistently as training progresses 

and sample quality increases.
Balance
Boundary Equilibrium GAN
<Berthelot et al, BEGAN, 2017>
Manipulation
Conditional GAN
<Mirza et al, Conditional Generative Adversarial Networks, 2014>
Quality
Progressive Growing of GAN
<Karras et al, Progressive Growing of GANs For Improved Quality, Stability, and Variation, 2017>
Quality
Significant Variants
Info GAN
InfoGAN successfully disentangles writing styles
<Chen et al, InfoGAN, 2017>
Info GAN
Real fake
Classifying time series data through unsupervised way
Clustering
< https://github.com/buriburisuri/timeseries_gan >
Pix2Pix
Most successful GAN architecture !!
<Isola et al, Image-to-image translation with conditional GAN, 2016>
Stain Style Transfer
Stain Style Transfer
SST achieves the highest performance on
original images on tumor classification
Domain Cross GAN
Unsupervised version of Pix2Pix
<Taigman et al, Unsupervised Cross-Domain Image Generation, 2016>
DiscoGAN / CycleGAN
<Kim et al, Learning to Discover Cross Domain Relations with Generative Adversarial Networks, 2017>
DiscoGAN / CycleGAN
<Zhu et al, Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks, 2017>
Simulated + Unsupervised Learning
<Shrivastava et al, Learning from Simulated and Unsupervised Images through Adversarial Training, 2016>
AnoGAN
<Schlegl et al,Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker discovery, 2017>
AmbientGAN
Generative Replay
<Shin et al,Continual Learning with Deep Generative Replay, 2017>
Thanks ☺

Gan intro