Answers.Body: <p>With Generative Adversarial Networks, all the generator cares about is fooling the discriminator. There's no requirement to be clever, or exhaustive, or make efficient use of the input space. As long as the discriminator returns "real" (vs. "fake") the generator "wins".</p>
  
  <p>The hope is that as the generator and discriminator are trained simultaneously, each will attempt to capture the faults of the other. As the discriminator gets better for one mode in telling real from fake, the generator will focus more on the other modes where it will have an easier time fooling the discriminator on.</p>
  
  <p>But that isn't the only way things can happen. When the discriminator gets better on distinguishing one mode, the generator can instead concentrate on that mode. Instead of spreading its training over different modes, it can instead attempt to get really good at producing samples within a particular mode. As long as the discriminator can be fooled into reporting "real" for the samples being produced, the generator gets the same reward as if it were to spread itself across multiple modes.</p>
  
  <p>Think about the forger/detective analogy. Instead of a forger trying to learn how to be good at making a range of paintings (Caravaggios, van Goghs, Warhols, etc.) the forger can concentrate on being really good at making a particular style of painting (e.g. Dutch Masters) or even a particular artist. Someone who spends all their time perfecting their Rembrandt forgeries will do a much better job evading detection than someone who tries to be good at both Picasso and Rembrandt (and Klee and Miró and ...)</p>
  
  <p>Variational Autoencoders are different, though. With a VAE, the latent space is built from <em>all</em> of the input examples. There's no way for a VAE to concentrate on a particular mode. All of the training examples are being mapped to the same latent space. If, for some reason, the decoder network decided to concentrate on a single mode, mapping the latent space to outputs of just that mode, then all the training examples from the other modes would have poor recovery. This means there would be a strong loss and gradient correcting that for the decoder training. The decoder training is balanced across all the input examples/modes, so the decoder needs to be similarly balanced when decoding the latent space. GANs don't have this similar balance, as the generator doesn't necessarily need to be balanced in its output - just so long as it can reliably fool the discriminator.</p>
  
  <p>That doesn't mean that VAEs don't have <a href="https://towardsdatascience.com/with-great-power-comes-poor-latent-codes-representation-learning-in-vaes-pt-2-57403690e92b" rel="noreferrer">similar issues</a>, though they're not identical to mode collapse. The problem with VAEs is that each individual example is (<em>in extremis</em>) being mapped to the same random distribution in the latent space. This can encourage the decoder to ignore the latent variable input, generating output more-or-less arbitrarily. There's a number of approaches recently (in particular <a href="https://arxiv.org/abs/1511.05644" rel="noreferrer">Adversarial Autoencoders</a> as well as <a href="https://arxiv.org/abs/1706.02262" rel="noreferrer">InfoVAE</a> and the closely related <a href="https://arxiv.org/abs/1711.01558" rel="noreferrer">Wasserstein Autoencoders</a>) which attempt to remedy this by constraining the latent space distribution on an ensemble level, rather than on an individual training example basis.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-09-18T07:56:28.823Z
Answers.Text: Exactly. Vanilla vae collapse to a constant variational posterior too often
Answers.UserDisplayName: shouldsee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-09T16:24:36.010Z
Answers.LastActivityDate: 2019-10-09T22:26:46.883Z
Answers.LastEditDate: 2019-10-09T22:26:46.883Z
Answers.UserDisplayName: R.M.
Body: <p><a href="http://aiden.nibali.org/blog/2017-01-18-mode-collapse-gans/" rel="noreferrer">Mode collapse</a> is a common problem faced by GANs. I am curious why doesn't VAE suffer mode collapse? </p>
  
Tags: <comparison><generative-adversarial-networks><autoencoders><variational-autoencoder>
Title: Why doesn't VAE suffer mode collapse?
UserDisplayName: Trect
ThreadText: # Why doesn't VAE suffer mode collapse?
  
  (Asked by: username_0 on 2018-11-09)
  
  [Mode collapse](http://aiden.nibali.org/blog/2017-01-18-mode-collapse-gans/) is a common problem faced by GANs. I am curious why doesn't VAE suffer mode collapse?
  
  **Tags:** comparison, generative-adversarial-networks, autoencoders, variational-autoencoder
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-11-09. Score: 10
  
  With Generative Adversarial Networks, all the generator cares about is fooling the discriminator. There's no requirement to be clever, or exhaustive, or make efficient use of the input space. As long as the discriminator returns "real" (vs. "fake") the generator "wins".
  
  The hope is that as the generator and discriminator are trained simultaneously, each will attempt to capture the faults of the other. As the discriminator gets better for one mode in telling real from fake, the generator will focus more on the other modes where it will have an easier time fooling the discriminator on.
  
  But that isn't the only way things can happen. When the discriminator gets better on distinguishing one mode, the generator can instead concentrate on that mode. Instead of spreading its training over different modes, it can instead attempt to get really good at producing samples within a particular mode. As long as the discriminator can be fooled into reporting "real" for the samples being produced, the generator gets the same reward as if it were to spread itself across multiple modes.
  
  Think about the forger/detective analogy. Instead of a forger trying to learn how to be good at making a range of paintings (Caravaggios, van Goghs, Warhols, etc.) the forger can concentrate on being really good at making a particular style of painting (e.g. Dutch Masters) or even a particular artist. Someone who spends all their time perfecting their Rembrandt forgeries will do a much better job evading detection than someone who tries to be good at both Picasso and Rembrandt (and Klee and Miró and ...)
  
  Variational Autoencoders are different, though. With a VAE, the latent space is built from *all* of the input examples. There's no way for a VAE to concentrate on a particular mode. All of the training examples are being mapped to the same latent space. If, for some reason, the decoder network decided to concentrate on a single mode, mapping the latent space to outputs of just that mode, then all the training examples from the other modes would have poor recovery. This means there would be a strong loss and gradient correcting that for the decoder training. The decoder training is balanced across all the input examples/modes, so the decoder needs to be similarly balanced when decoding the latent space. GANs don't have this similar balance, as the generator doesn't necessarily need to be balanced in its output - just so long as it can reliably fool the discriminator.
  
  That doesn't mean that VAEs don't have [similar issues](https://towardsdatascience.com/with-great-power-comes-poor-latent-codes-representation-learning-in-vaes-pt-2-57403690e92b), though they're not identical to mode collapse. The problem with VAEs is that each individual example is (*in extremis*) being mapped to the same random distribution in the latent space. This can encourage the decoder to ignore the latent variable input, generating output more-or-less arbitrarily. There's a number of approaches recently (in particular [Adversarial Autoencoders](https://arxiv.org/abs/1511.05644) as well as [InfoVAE](https://arxiv.org/abs/1706.02262) and the closely related [Wasserstein Autoencoders](https://arxiv.org/abs/1711.01558)) which attempt to remedy this by constraining the latent space distribution on an ensemble level, rather than on an individual training example basis.
  
  > **Comments:**
  > **username_2**: Exactly. Vanilla vae collapse to a constant variational posterior too often  
  
  ---
  
  