# Variational autoencoder with Gaussian mixture model

A variational autoencoder (VAE) provides a way of learning the probability distribution $p(x,z)$ relating an input $x$ to its latent representation $z$. In particular, the decoder $d$ maps an input $x$ to a distribution on $z$. A typical decoder will output parameters $(\mu,\sigma)=d(x)$, representing the Gaussian distribution $\mathcal{N}(\mu,\sigma)$; this distribution is used as our approximation for $p(z|x)$.

Has anyone considered a VAE where the output is a Gaussian mixture model, rather than a Gaussian? Is this useful? Are there tasks where this is significantly more effective than a simple Gaussian distribution? Or does it provide little benefit?

• arxiv.org/abs/1611.02648 – shimao Jun 12 '18 at 3:08
• @shimao, thank you! I've written an answer summarizing that, in case it's helpful to anyone else in the future. Thanks again. – D.W. Jun 12 '18 at 5:15
• @D.W. sorry for the late reply. I am just confused about something. Isn't VAE representing an infinite mixture of gaussians? – floyd Sep 11 at 15:41

They experiment with using this approach for clustering. Each Gaussian in the Gaussian mixture corresponds to a different cluster. Because the Gaussian mixture is in the latent space ($z$), and there is a neural network connecting $z$ to $x$, this allows non-trivial clusters in the input space ($x$).