GANs 1
GANs 1
Latent
NN NN
Encoder Decoder
Randomly
Latent
NN
generate a vector
Decoder
Image ?
as code
Common Problems with VAEs
▪ Blurriness in Generated Samples:
▪ Produces blurrier and less sharp images than the original data samples.
▪ Nature of VAEs using the reconstruction loss (average out the variations).
▪ Latent Space Regularization
▪ Enforce a regularization on the latent space to ensure it follows a specific distribution (usually a Gaussian
distribution).
▪ Distribution of the data may not be approximated by the chosen prior well.
▪ Prevent the VAE from capturing more complex distributions present in the data.
▪ Balancing Act
▪ Trade-off between the reconstruction loss and the KL divergence
▪ Too much weight on the reconstruction loss can lead to ignoring the latent space structure
▪ Too much weight on the KL divergence can lead to ignoring the data's details.
Transposed Convolution
(Deconvolution)
Stride=1 Stride=2 Stride=2
Outpu
Pad=Val Pad=Val Pad=Sa
t
id id me
Con
v
Inpu
t
Outpu
t
Decon
v
Inpu
t
https://github.com/vdumoulin/conv_arithmeti
c
Generative Adversarial Network (GAN)
▪ GAN was first introduced by Ian Goodfellow et al in 2014
▪ Cab be used in generating images, videos, text, some simple
conversation.
▪ Note, image processing is easy (even animals can do it), NLP is hard
(only human can do it).
▪ This co-evolution approach might have far-reaching implications.
Bengio: this may hold the key to making computers a lot more
intelligent.
GAN – Learn a discriminator
Randomly
Generator
sample a vector
0 0 0 0
▪ KL divergence is asymmetric.
If P(x)~0 and q(x) is non-zero,
then q’s effect is disregarded.
Problem to measure the similarity
between two equally important
distributions.
GAN on
MNIST
Deconv Conv,
Tanh/Sigmo Conv, Reshap FC,
FC, Deconv BN, e,
id BN, Sigmoi
BN, BN, LReLU FC, BN,
LReLU d
Resha ReLU LReLU
pe
Generat
or Discriminat
or
Issues: Convergence
▪ As the generator improves with training, the discriminator performance gets worse
▪ Discriminator can’t differentiate between real and fake.
▪ If the generator succeeds perfectly, then the discriminator has a 50% accuracy.
▪ Starts random guess (Less meaningful)
▪ Warning: The generator may start to train on random feedback, and its own quality may
reduce.
Problems
▪ Imbalance
▪ One network may dominate the other
▪ e.g. discriminator may always tells the fake and real data and generator may not be able to fool
the generator
▪ Local Convergence
▪ We may stuck at a local minima and not the global error
▪ The discriminator feedback gets less meaningful over time.
▪ The generator starts to train on junk feedback, and its own quality may collapse.