15 Unsup+gen PDF
15 Unsup+gen PDF
15 Unsup+gen PDF
Discriminative Generative
Models Models
Supervised Learning Unsupervised Learning
Data: Data:
Goal: Goal:
Method: Method:
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Supervised Learning Unsupervised Learning
Goal: Goal:
Learn P(x, y)
Learn P(y|x)
Classify xnew, Generate xnew
Classify xnew
Method:
Method:
Learn some underlying hidden structure
Learn a function to map x -> y of the data
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Supervised Unsupervised
Learning Learning
Discriminative GeneraIve
Models Models
Discriminative vs. Generative Models
Discriminative Generative
Models Models
Discussion
Generative tasks
Learn to generate Images from
• Random Noise
noise G Image
noise
G Image
class
Slide inspired by Svetlana Lazebnik (link), figure from: Self-AOenIon GeneraIve Adversarial Networks
Generative tasks
Slide inspired by Svetlana Lazebnik (link), figure from: Self-Attention Generative Adversarial Networks
Generative tasks
Learn to generate Images from
• Random Noise
• CondiMonal GeneraMon (e.g., noise and scalar/one-hot class)
• Image-to-Image GeneraMon (CondiMonal without Noise)
G
Generative tasks
noise
G Image
class
E f G
Generative tasks
E f G
E f D
Generative tasks
age
E 2f I m G
age
I m
E ?f D
Generative tasks
age
E 2f I m G
age
I m
er
co d
E - En
f D
u to
A
Autoencoder
E f D
𝑥 Latent features 𝑥!
Input Data Reconstructed Data
Autoencoder
E f D
𝑥 Latent features 𝑥!
Input Data Reconstructed Data
Autoencoder
E f D
𝑥 𝑥!
Input Data Reconstructed Data
𝑥 E f D 𝑥!
$
𝑥 − 𝑥!
No labels* required!
Autoencoder: Unsupervised or Generative?
E f D
Autoencoder: Unsupervised or Generative?
E f D
Autoencoder: Unsupervised or Generative?
f D
Autoencoder: Unsupervised or Generative?
f D
^
Generate New Data f D
Autoencoder: Unsupervised or Generative?
f D
^
Generate New Data f D
Autoencoder: Unsupervised or Generative?
E f D
Supervised Unsupervised
Learning Learning
DiscriminaIve Generative
Models Models
Generative Models for Image Generation
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Generative Models for Image Generation
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Generative Models for Image Generation
Inspired from:
Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Ian Goodfellow, Tutorial on Generative Adversarial Networks, 2017
Generative Models
Direct
• GAN
Inspired from:
Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Ian Goodfellow, Tutorial on Generative Adversarial Networks, 2017
Generative Models
Direct
• GAN
Inspired from:
Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Ian Goodfellow, Tutorial on Generative Adversarial Networks, 2017
Pixel-RNN/CNN
• Fully visible belief network
• Explicit density model
• Use chain rule to decompose likelihood of image x:
𝑃 𝑥 = ' 𝑃 𝑥( 𝑥* , 𝑥$ , … , 𝑥(.* )
()*
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Pixel-RNN/CNN
• Fully visible belief network
• Explicit density model
• Use chain rule to decompose likelihood of image x:
𝑃 𝑥 = ' 𝑃 𝑥( 𝑥* , 𝑥$ , … , 𝑥(.* )
()*
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Pixel-RNN/CNN
• Fully visible belief network
• Explicit density model
• Use chain rule to decompose likelihood of image x:
𝑃 𝑥 = ' 𝑃 𝑥( 𝑥* , 𝑥$ , … , 𝑥(.* )
()*
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Pixel-RNN/CNN
• Fully visible belief network
• Explicit density model
• Use chain rule to decompose likelihood of image x:
𝑃 𝑥 = ' 𝑃 𝑥( 𝑥* , 𝑥$ , … , 𝑥(.* )
()*
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Pixel-RNN/CNN
• Fully visible belief network
• Explicit density model
• Use chain rule to decompose likelihood of image x:
𝑃 𝑥 = ' 𝑃 𝑥( 𝑥* , 𝑥$ , … , 𝑥(.* )
()*
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Pixel-RNN/CNN
• Fully visible belief network
• Explicit density model
• Use chain rule to decompose likelihood of image x:
𝑃0 𝑥 = ' 𝑃0 𝑥( 𝑥* , 𝑥$ , … , 𝑥(.* )
()*
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Pixel-RNN
State-to-State Component
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Generative Models
Direct
• GAN
Inspired from:
Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Ian Goodfellow, Tutorial on Generative Adversarial Networks, 2017
Generative Models
Direct
• GAN
Inspired from:
Fei-Fei Li & JusIn Johnson & Serena Yeung. hOp://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Ian Goodfellow, Tutorial on GeneraIve Adversarial Networks, 2017
Generative Adversarial Networks
G(z)
z G Image
GAN: Goodfellow et al., NIPS 2014; Slide inspired by Svetlana Lazebnik (link)
Generative Adversarial Networks
G(z)
z G D(G(z)) Fake
D
GAN: Goodfellow et al., NIPS 2014; Slide inspired by Svetlana Lazebnik (link)
Generative Adversarial Networks
G(z)
z G D(G(z)) Fake
D
D(xdata) Real
xdata
GAN: Goodfellow et al., NIPS 2014; Slide inspired by Svetlana Lazebnik (link)
Generative Adversarial Networks
G(z)
z G D(G(z)) Fake
D
D(xdata) Real
xdata
GAN: Goodfellow et al., NIPS 2014; Slide inspired by Svetlana Lazebnik (link)
Conditional Generative Adversarial Networks
z G(z)
class G D(G(z)) Fake
D
D(xdata) Real
xdata
Conditional Generative Adversarial Networks
z G(z)
class G D(G(z)) Fake
D
D(xdata) Real
xdata
Image-to-Image Conditional GANs
G(z)
E G D D fake
D D real
Examples
pix2pix
Contribution:
• Add L1 loss to the loss function
• U-net generator
• PatchGAN discriminator
Isola et al., Image-to-Image Translation with Conditional Adversarial Nets, CVPR 2017
pix2pix – L1 Loss
• Compared to L2, L1 loss results in less blurring*
pix2pix – U-Net Encoder
pix2pix – PatchGAN Discriminator
• Traditional discriminator outputs one value to represent the real/fake
probability.
• PatchGAN outputs N*N values to represent each patch’s real/fake
probability in the image.
• Finally, we use the mean value of the N*N probability
pix2pix Results
CycleGAN
pix2pix – Paired image-to-image translation model
CycleGAN – Unpaired image-to-image translation model
Zhu et al., Unpaired Image-to-Image TranslaIon using Cycle-Consistent Adversarial Networks, ICCV 2017
CycleGAN
CycleGAN
• Adversarial Loss:
• Cycle Loss:
• CycleGAN Loss:
CycleGAN Results
CycleGAN Results
CycleGan à StarGAN
CycleGAN – transfer between 2 domains
StartGAN – transfer between multiple domains
Choi et al., StarGAN: Unified GeneraIve Adversarial Networks for MulI-Domain Image-to-Image TranslaIon
Generative Adversarial Networks
G(z)
z G D(G(z)) Fake
D
D(xdata) Real
xdata
GAN: Goodfellow et al., NIPS 2014; Slide inspired by Svetlana Lazebnik (link)
GAN Training Problems
• Instability
• Difficult to keep G and D in sync
• Mode Collapse
Figure from: Goodfellow’s Tutorial on GANs; Metz et al. & Hung-yi Lee & Arjovsky et al.
Heuristic Solutions
• GAN Hacks (h\ps://github.com/soumith/ganhacks)
• GAN Tutorial
• Improved Techniques for Training GANs
https://github.com/hindupuravinash/the-gan-zoo
E.g., LSGANs
BIGGAN, 2018
High-fidelity Samples (interpolation)
BIGGAN, 2018
How to evaluate GANs?
• Showing pictures of samples is not enough, especially for
simpler datasets like MNIST, CIFAR, faces, bedrooms, etc.
• We cannot directly compute the likelihoods of high-
dimensional samples (real or generated), or compare
their distributions
• Many GAN approaches claim mainly to improve stability,
which is hard to evaluate
• For discussion, see Ian Goodfellow’s Twitter thread
“We find that most models can reach similar scores with
enough hyperparameter optimization and random restarts.
This suggests that improvements can arise from a higher
computational budget and tuning more than fundamental
algorithmic changes … We did not find evidence that any of
the tested algorithms consistently outperforms the non-
saturating GAN introduced in Goodfellow et al. (2014)”
Slide inspired by Svetlana Lazebnik (link)
M. Lucic, K. Kurach, M. Michalski, O. Bousquet, S. Gelly, Are GANs created equal? A large-scale study, NIPS 2018
Generative Models
Direct
• GAN
Inspired from:
Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Ian Goodfellow, Tutorial on Generative Adversarial Networks, 2017
Generative Models
Direct
• GAN
Inspired from:
Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Ian Goodfellow, Tutorial on Generative Adversarial Networks, 2017
Variational Auto-encoders (VAEs)
• Probabilistic twist to standard VAEs
𝑥 E z D 𝑥!
Variational Auto-encoders (VAEs)
• Probabilistic twist to standard VAEs
• Recall: how can we generate new data using Auto-encoders?
𝑥 E z D 𝑥!
Variational Auto-encoders (VAEs)
• Probabilistic twist to standard VAEs
• Recall: how can we generate new data using Auto-encoders?
𝑥 E z 𝑧̂ D 𝑥!
Generating Samples using VAEs
𝑧 D 𝑥
𝑧 D 𝑥
𝑃 𝑥 = ; 𝑃 𝑥 𝑧 𝑃 𝑧 𝑑𝑧
Training a VAE Generator
Data likelihood: 𝑃 𝑥 = ; 𝑃 𝑥 𝑧 𝑃 𝑧 𝑑𝑧
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Training a VAE Generator
Data likelihood: 𝑃 𝑥 = ; 𝑃 𝑥 𝑧 𝑃 𝑧 𝑑𝑧
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Training a VAE Generator
Data likelihood: 𝑃 𝑥 = ; 𝑃 𝑥 𝑧 𝑃 𝑧 𝑑𝑧
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Training a VAE Generator
Data likelihood: 𝑃 𝑥 = ; 𝑃 𝑥 𝑧 𝑃 𝑧 𝑑𝑧
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Training a VAE Generator
Data likelihood: 𝑃 𝑥 = ; 𝑃 𝑥 𝑧 𝑃 𝑧 𝑑𝑧
Why is that?
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Training a VAE Generator
Data likelihood: 𝑃 𝑥 = ; 𝑃 𝑥 𝑧 𝑃 𝑧 𝑑𝑧
+
1
Approx. with samples of z during training: 𝑃 𝑥 ≈ A 𝑃(𝑥|𝑧( )
𝑛
()B
Inspired from: Fei-Fei Li & JusIn Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Training a VAE Generator
Data likelihood: 𝑃 𝑥 = ; 𝑃 𝑥 𝑧 𝑃 𝑧 𝑑𝑧
+
1
Approx. with samples of z during training: 𝑃 𝑥 ≈ A 𝑃(𝑥|𝑧( )
𝑛
()B
• Need a lot of samples of z
• Most of the 𝑃 𝑥 𝑧 ≈ 0.
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Training a VAE Generator
Data likelihood: 𝑃 𝑥 = ; 𝑃 𝑥 𝑧 𝑃 𝑧 𝑑𝑧
+
1
Approx. with samples of z during training: 𝑃 𝑥 ≈ A 𝑃(𝑥|𝑧( )
𝑛
()B
• Need a lot of samples of z
• Most of the 𝑃 𝑥 𝑧 ≈ 0.
• Can we learn which z will generate 𝑃 𝑥 𝑧 ≫ 0?
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Training a VAE Generator
Data likelihood: 𝑃 𝑥 = ; 𝑃 𝑥 𝑧 𝑃 𝑧 𝑑𝑧
+
1
Approx. with samples of z during training: 𝑃 𝑥 ≈ A 𝑃(𝑥|𝑧( )
𝑛
()B
• Need a lot of samples of z
• Most of the 𝑃 𝑥 𝑧 ≈ 0.
• Can we learn which z will generate 𝑃 𝑥 𝑧 ≫ 0?
E(F|G)E(G)
Posterior density is also intractable: 𝑃 𝑧 𝑥 =
E(F)
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Training a VAE Generator
Data likelihood: 𝑃 𝑥 = ; 𝑃 𝑥 𝑧 𝑃 𝑧 𝑑𝑧
+
1
Approx. with samples of z during training: 𝑃 𝑥 ≈ A 𝑃(𝑥|𝑧( )
𝑛
()B
• Need a lot of samples of z
• Most of the 𝑃 𝑥 𝑧 ≈ 0.
• Can we learn which z will generate 𝑃 𝑥 𝑧 ≫ 0?
E(F|G)E(G)
Posterior density is also intractable: 𝑃 𝑧 𝑥 =
E(F)
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Variational Auto-encoder (VAE)
We want, but impractical:
+
1
𝑃 𝑥 = 𝐸G~E(G) (𝑃(𝑥|𝑧)) ≈ A 𝑃(𝑥|𝑧( )
𝑛
()B
Inspired from: Fei-Fei Li & JusIn Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Variational Auto-encoder (VAE)
We want, but impractical:
+
1
𝑃 𝑥 = 𝐸G~E(G) (𝑃(𝑥|𝑧)) ≈ A 𝑃(𝑥|𝑧( )
𝑛
()B
Questions:
• How can we learn such a 𝑄 𝑧 ?
• How are 𝑃 𝑥 or 𝐸G~E(G) and 𝐸G~M(G) related?
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Variational Auto-encoder (VAE)
𝑥 E𝜙 𝑄O (𝑧|𝑥)
𝑧 D𝜃 𝑃0 (𝑥|𝑧)
Variational Auto-encoder (VAE)
If 𝑄O and 𝑃0 are diagonal
gaussian distributions
𝑥 E𝜙 𝑄O (𝑧|𝑥)
𝑧 D𝜃 𝑃0 (𝑥|𝑧)
Variational Auto-encoder (VAE)
If 𝑄O and 𝑃0 are diagonal
gaussian distributions
𝜇G|F
𝑥 E𝜙
Mean and (diagonal) covariance
of 𝑄O (𝑧|𝑥)
ΣG|F
𝜇F|G
Mean and (diagonal) covariance
𝑧 D𝜃 of 𝑃0 (𝑥|𝑧)
ΣF|G
Inspired from: Fei-Fei Li & JusIn Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
Variational Auto-encoder (VAE)
If 𝑄O and 𝑃0 are diagonal
gaussian distributions
𝜇G|F
𝑥 E𝜙 Sample z from z|x ~ 𝑁(𝜇G|F , ΣG|F )
ΣG|F
𝜇F|G
𝑧 D𝜃 Sample x from x|z ~ 𝑁(𝜇F|G , ΣF|G )
ΣF|G
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link)
VAE: Relating 𝑃(𝑥) and 𝐸G~M(G|F)
+
1
𝑃 𝑥 = 𝐸G~E(G) (𝑃(𝑥|𝑧)) ≈ A 𝑃(𝑥|𝑧( )
𝑛
()B
Definition of KL-divergence:
𝐷TU 𝑄 𝑧 𝑥 ∥ P(z|x)
E(F|G)E(G)
= 𝐸G~M(G|F) log 𝑄 𝑧 𝑥 − log (Bayes rule)
E(F)
VAE: Relating 𝑃(𝑥) and 𝐸G~M(G|F)
𝐷TU 𝑄 𝑧 𝑥 ∥ P(z|x)
E(F|G)E(G)
= 𝐸G~M(G|F) log 𝑄 𝑧 𝑥 − log
E(F)
(P(x) independent of z)
VAE: Relating 𝑃(𝑥) and 𝐸G~M(G|F)
𝐷TU 𝑄 𝑧 𝑥 ∥ P(z|x)
E(F|G)E(G)
= 𝐸G~M(G|F) log 𝑄 𝑧 𝑥 − log
E(F)
(Re-arrange)
VAE: Relating 𝑃(𝑥) and 𝐸G~M(G|F)
𝐷TU 𝑄 𝑧 𝑥 ∥ P(z|x)
E(F|G)E(G)
= 𝐸G~M(G|F) log 𝑄 𝑧 𝑥 − log
E(F)
(re-arranging)
(re-arranging)
(re-arranging)
(re-arranging)
(re-arranging)
(re-arranging)
(re-arranging)
𝜇G|F
𝑥 E
Sample z from
z|x ~ 𝑁(𝜇G|F , ΣG|F )
ΣG|F
𝜇F|G
z Sample x from
D x|z ~ 𝑁(𝜇F|G , ΣF|G )
ΣF|G
VAE: Putting everything together
𝐸G~M 𝑧 𝑥 log 𝑃 𝑥 𝑧 − 𝐷TU 𝑄 𝑧 𝑥 ∥ 𝑃(𝑧)
𝐷TU 𝑁 𝜇G|F , ΣG|F ∥ N(0,I)
𝜇G|F
𝑥 E
Sample z from
z|x ~ 𝑁(𝜇G|F , ΣG|F )
ΣG|F
𝜇F|G
z Sample x from
D x|z ~ 𝑁(𝜇F|G , ΣF|G )
ΣF|G
VAE: Putting everything together
𝐸G~M 𝑧 𝑥 log 𝑃 𝑥 𝑧 − 𝐷TU 𝑄 𝑧 𝑥 ∥ 𝑃(𝑧)
𝐷TU 𝑁 𝜇G|F , ΣG|F ∥ N(0,I)
𝜇G|F
𝑥 E
Sample z from
z|x ~ 𝑁(𝜇G|F , ΣG|F )
ΣG|F
𝜇F|G
z Sample x from
D x|z ~ 𝑁(𝜇F|G , ΣF|G )
ΣF|G
VAE: Putting everything together
𝐸G~M 𝑧 𝑥 log 𝑃 𝑥 𝑧 − 𝐷TU 𝑄 𝑧 𝑥 ∥ 𝑃(𝑧)
𝐷TU 𝑁 𝜇G|F , ΣG|F ∥ N(0,I)
𝜇G|F
𝑥 E
Sample z from
z|x ~ 𝑁(𝜇G|F , ΣG|F )
ΣG|F
Sample x from
𝜇F|G x|z ~ 𝑁(𝜇F|G , ΣF|G )
D
ΣF|G 𝑥!
$
𝑥 − 𝑥!
VAE: Putting everything together
𝐸G~M 𝑧 𝑥 log 𝑃 𝑥 𝑧 − 𝐷TU 𝑄 𝑧 𝑥 ∥ 𝑃(𝑧)
𝐷TU 𝑁 𝜇G|F , ΣG|F ∥ N(0,I)
𝜇G|F
𝑥 E
Sample z from
z|x ~ 𝑁(𝜇G|F , ΣG|F )
ΣG|F
Sample x from
𝜇F|G x|z ~ 𝑁(𝜇F|G , ΣF|G )
D
ΣF|G 𝑥!
$
𝑥 − 𝑥!
Modeling P(x|z)
Let 𝑓 𝑧 be the network output.
- Assume 𝑃(𝑥|𝑧) to be i.i.d. Gaussian
- 𝑥! = 𝑓 𝑧 + 𝜂, where 𝜂 ~ 𝑁(0,1) (re: Linear Regression)
$
- Simplifies to an L2 loss: 𝑥 − 𝑓(𝑧)
$
Also, approximate 𝐸G~M 𝑧 𝑥 log 𝑃 𝑥 𝑧 with 𝑥 − 𝑓(𝑧) for a single 𝑧.
Why is this reasonable?
Inspired from: Fei-Fei Li & Justin Johnson & Serena Yeung (link), and Svetlana Lazebnik (link).
Details of second approximation in Tutorial on VAE.
VAE: Putting everything together
𝐸G~M 𝑧 𝑥 log 𝑃 𝑥 𝑧 − 𝐷TU 𝑄 𝑧 𝑥 ∥ 𝑃(𝑧)
𝐷TU 𝑁 𝜇G|F , ΣG|F ∥ N(0,I)
𝜇G|F
𝑥 E
Sample z from
z|x ~ 𝑁(𝜇G|F , ΣG|F )
ΣG|F
$
D 𝑓(𝑧) 𝑥 − 𝑓(𝑧)
VAE: Putting everything together
𝐸G~M 𝑧 𝑥 log 𝑃 𝑥 𝑧 − 𝐷TU 𝑄 𝑧 𝑥 ∥ 𝑃(𝑧)
𝐷TU 𝑁 𝜇G|F , ΣG|F ∥ N(0,I)
𝜇G|F
𝑥 E
Sample z from
z|x ~ 𝑁(𝜇G|F , ΣG|F )
ΣG|F
$
D 𝑓(𝑧) 𝑥 − 𝑓(𝑧)
Re-parameterization Trick
z ~ 𝑁 𝜇, 𝜎 $ is equivalent to
• 𝜇 + (𝜎 ⋅ 𝜖), where 𝜖 ~ 𝑁 0,1
• Now we can easily backpropagate the loss to the Encoder.
Samples from: Fei-Fei Li & Justin Johnson & Serena Yeung (link)
Application: Expression Magnification and Suppression
Slide inspired by Svetlana Lazebnik (link). Bottom diagram from Larsen et al.
Application: Fader Networks
L-2 Loss**
*see reddit discussion
**see blog
KL Divergence
From:
Ian Goodfellow,
Tutorial on GANs, 2017
KL Divergence
Discriminative Generative
Models Models
What generative models we haven’t covered?
Videos
• Future generation
• Future prediction
• Future action prediction
• Future pose prediction
• Future pose generation
• Etc.
• Etc.
Generative Models
Direct
• GAN
Inspired from:
Fei-Fei Li & Justin Johnson & Serena Yeung. http://cs231n.stanford.edu/slides/2017/cs231n_2017_lecture13.pdf
Ian Goodfellow, Tutorial on Generative Adversarial Networks, 2017
Text Generation Models
source
Text Generation Models
source
Text Generation Models
source
Text Generation Models
source
Text Generation Models
3 solutions:
• Gumbel-Softmax (continuous approximation of Softmax)
• Work with continuous spaces
• Reinforcement learning (e.g., REINFORCE)
source
Text Generation Models – Examples
source
Text Generation Models – Examples
source
Text Generation Models – Examples
source
Text Generation Models – Examples
source
Text Generation Models – Examples
source
Text Generation Models – Examples
source
Text to Image – Examples
source
Text to Image – Examples
source
Text to Image – Examples
source
Text to Image – Examples
source
Text to Video – Examples
source
Text Generation Models – Good References
• GAN for text generation – Part I
• GAN for text generation – Part II: RL (part III & IV coming shortly)
• OpenAI GPT-2 model
• Generating Natural-language text with Neural Networks
• Generative Model for text: An overview of recent advancements
GAN and VAE references
• Why it is so hard to train GANs!
• VAE explanations (link, link, link, link, link, link, tutorial)
Supervised Unsupervised
Learning Learning
Discriminative Generative
Models Models
Supervised Unsupervised
Learning Learning
Discriminative Generative
Models Models
Generative and Unsupervised Gap
cat dog
Self-supervised Learning – teaser
Proxy Tasks for “Self”- supervised learning
source
Back to image generative models
source
Conclusion
source