From what I understand, a Generative Adversarial Network (GAN) is composed of an encoder (generator), some synthetic data (fake data) and a discriminator that will penalize any distinguishable real data from the fake ones. This will result in 2 training phases where one tries to beat the other one and vice versa.

This force the generator to mimic a distribution given by the synthetic data, thus creating a latent space similar the fake data.

However, in Variational Autoencoders (VAE), the usual loss function also includes a penalty in the latent space when the data do not follow a normal distribution. From what I've learned, this also strongly encourages the latent space to follow a normal distribution.

My question is how does the penalty in the VAE is different from training a whole new network, the discriminator, that in the end penalize the generator for not following the synthetic data distribution?

More generally, is it similar to penalize a wrong latent space distribution directly in the model's loss function than it is with a discriminator network?

Maybe it's easier with GAN to make new distributions, at the cost of training another network, than it is to model an adapted loss function. (?)


1 Answer 1


To train a GAN you need only 2 networks, the generator and discriminator, none of which require to be an encoder. You also don't require synthetic data, those are generated by the generator network, you need instead real data.

"This force the generator to mimic a distribution given by the synthetic data, thus creating a latent space similar the fake data"

We're not interested in mimic synthetic data, what a GAN is suppose to learn is to generate data that follow a similar distribution of some real data. So initially the generator will create only noise, if the training is successful then the data generated by the generator should become closer and closer, eventually indistinguishable from the real data. Also, there's no requirements regarding to the latent space, even though it's true that GANs can be trained to learn latent spaces with specific property to control the features of the generated images in a similar fashion to VAE.

The power of GANs when compared to VAEs is that on the paper they can map any kind of distribution to any other kind of distribution. This is possible cause rather than using a single loss that compare a network output to a ground truth label, GANs use two losses combined that mimic a distance between distributions. The combined loss nowhere include a direct comparison of the generated images with a target. Rather it just leverage the discriminator to compute how far (in terms of probability distributions) the generated and real images are.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .