e01.org

Variational autoencoder

In machine learning, a variational autoencoder (VAE) is an artificial neural network architecture introduced by Diederik P. Kingma and Max Welling in 2013. It is part of the families of probabilistic graphical models and variational Bayesian methods. In addition to being seen as an autoencoder neural network architecture, variational autoencoders can also be studied within the mathematical formulation of variational Bayesian methods, connecting a neural encoder network to its decoder through a probabilistic latent space (for example, as a multivariate Gaussian distribution) that corresponds to the parameters of a variational distribution. Thus, the encoder maps each point (such as an image)... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

In machine learning, a variational autoencoder (VAE) is an artificial neural network architecture introduced by Diederik P. Kingma and Max Welling in 2013. It is part of the families of probabilistic graphical models and variational Bayesian methods. In addition to being seen as an autoencoder neural network architecture, variational autoencoders can also be studied within the mathematical formulation of variational Bayesian methods, connecting a neural encoder network to its decoder through a probabilistic latent space (for example, as a multivariate Gaussian distribution) that corresponds to the parameters of a variational distribution. Thus, the encoder maps each point (such as an image) from a large complex dataset into a distribution within the latent space, rather than to a single point in that space. The decoder has the opposite function, which is to map from the latent space to the input space, again according to a distribution (although in practice, noise is rarely added during the decoding stage). By mapping a point to a distribution instead of a single point, the network can avoid overfitting the training data. Both networks are typically trained together with the usage of the reparameterization trick, although the variance of the noise model can be learned separately. Although this type of model was initially designed for unsupervised learning, its effectiveness has been proven for semi-supervised learning and supervised learning. From the point of view of probabilistic modeling, one wants to maximize the likelihood of the data x by their chosen parameterized probability distribution p_{\theta}(x) = p(x|\theta) . This distribution is usually chosen to be a Gaussian N(x|\mu,\sigma) which is parameterized by \mu and \sigma respectively, and as a member of the exponential family it is easy to work with as a noise distribution. Simple distributions are easy enough to maximize, however distributions where a prior is assumed over the latents z results in intractable integrals. Let us find p_\theta(x) via marginalizing over z . p_\theta(x) = \int_{z}p_\theta({x,z}) \, dz, where p_\theta({x,z}) represents the joint distribution under p_\theta of the observable data x and its latent representation or encoding z . According to the chain rule, the equation can be rewritten as p_\theta(x) = \int_{z}p_\theta({x| z})p_\theta(z) \, dz In the vanilla variational autoencoder, z is usually taken to be a finite-dimensional vector of real numbers, and p_\theta({x|z}) to be a Gaussian distribution. Then p_\theta(x) is a mixture of Gaussian distributions. It is now possible to define the set of the relationships between the input data and its latent representation as Prior p_\theta(z) Likelihood p_\theta(x) Posterior p_\theta(z|x) Unfortunately, the computation of p_\theta(z|x) is expensive and in most cases intractable. To speed up the calculus to make it feasible, it is necessary to introduce a further function to approximate the posterior distribution as q_\phi({z| x}) \approx p_\theta({z| x}) with \phi defined as the set of real values that parametrize q . This is sometimes called amortized inference, since by "investing" in finding a good q_\phi , one can later infer z from x quickly without doing any integrals. In this way, the problem is to find a good probabilistic autoencoder, in which the conditional likelihood distribution p_\theta(x|z) is computed by the probabilistic decoder, and the approximated posterior distribution q_\phi(z|x) is computed by the probabilistic encoder. Parametrize the encoder as E_\phi , and the decoder as D_\theta . D_{KL}(q_\phi({z| x})\parallel p_\theta({z| x})) &= \mathbb E_{z \sim q_\phi(\cdot | x)} \left[\ln \frac{q_\phi(z|x)}{p_\theta(z|x)}\right]\\ &= \mathbb E_{z \sim q_\phi(\cdot | x)} \left[\ln \frac{q_\phi({z| x})p_\theta(x)}{p_\theta(x, z)}\right]\\ &=\ln p_\theta(x) + \mathbb E_{z \sim q_\phi(\cdot | x)} \left[\ln \frac{q_\phi({z| x})}{p_\theta(x, z)}\right]. \end{align} Now, define the evidence lower bound (ELBO): L_{\theta,\phi}(x) := \mathbb E_{z \sim q_\phi(\cdot | x)} \left[\ln \frac{p_\theta(x, z)}{q_\phi({z| x})}\right] = \ln p_\theta(x) - D_{KL}(q_\phi({\cdot| x})\parallel p_\theta({\cdot | x})) Maximizing the ELBO \theta^*,\phi^* = \underset{\theta,\phi}\operatorname{arg max} \, L_{\theta,\phi}(x) is equivalent to simultaneously maximizing \ln p_\theta(x) and minimizing D_{KL}(q_\phi({z| x})\parallel p_\theta({z| x})) . That is, maximizing the log-likelihood of the observed data, and minimizing the divergence from the approximate posterior q_\phi(\cdot | x) to the exact posterior p_\theta(\cdot | x) . The form given is not very convenient for maximization, but the following, equivalent form, is: L_{\theta,\phi}(x) = \mathbb E_{z \sim q_\phi(\cdot | x)} \left[\ln p_\theta(x|z)\right] - D_{KL}(q_\phi({\cdot| x})\parallel p_\theta(\cdot)) where \ln p_\theta(x|z) is implemented as -\frac{1}{2}\| x - D_\theta(z)\|^2_2 , since that is, up to an additive constant, what x|z \sim \mathcal N(D_\theta(z), I) yields. That is, we model the distribution of x conditional on z to be a Gaussian distribution centered on D_\theta(z) . The distribution of q_\phi(z |x) and p_\theta(z) are often also chosen to be Gaussians as z|x \sim \mathcal N(E_\phi(x), \sigma_\phi(x)^2I) and z \sim \mathcal N(0, I) , with which we obtain by the formula for KL divergence of Gaussians: L_{\theta,\phi}(x) = -\frac 12\mathbb E_{z \sim q_\phi(\cdot | x)} \left[ \|x - D_\theta(z)\|_2^2\right] - \frac 12 \left( N\sigma_\phi(x)^2 + \|E_\phi(x)\|_2^2 - 2N\ln\sigma_\phi(x) \right) + Const Here N is the dimension of z . For a more detailed derivation and more interpretations of ELBO and its maximization, see its main page. To efficiently search for \theta^*,\phi^* = \underset{\theta,\phi}\operatorname{arg max} \, L_{\theta,\phi}(x) the typical method is gradient descent. It is straightforward to find \nabla_\theta \mathbb E_{z \sim q_\phi(\cdot | x)} \left[\ln \frac{p_\theta(x, z)}{q_\phi({z| x})}\right] = \mathbb E_{z \sim q_\phi(\cdot | x)} \left[ \nabla_\theta \ln \frac{p_\theta(x, z)}{q_\phi({z| x})}\right] However, \nabla_\phi \mathbb E_{z \sim q_\phi(\cdot | x)} \left[\ln \frac{p_\theta(x, z)}{q_\phi({z| x})}\right] does not allow one to put the \nabla_\phi inside the expectation, since \phi appears in the probability distribution itself. The reparameterization trick (also known as stochastic backpropagation ) bypasses this difficulty. The most important example is when z \sim q_\phi(\cdot | x) is normally distributed, as \mathcal N(\mu_\phi(x), \Sigma_\phi(x)) . This can be reparametrized by letting \boldsymbol{\varepsilon} \sim \mathcal{N}(0, \boldsymbol{I}) be a "standard random number generator", and construct z as z = \mu_\phi(x) + L_\phi(x)\epsilon . Here, L_\phi(x) is obtained by the Cholesky decomposition: \Sigma_\phi(x) = L_\phi(x)L_\phi(x)^T Then we have \nabla_\phi \mathbb E_{z \sim q_\phi(\cdot | x)} \left[\ln \frac{p_\theta(x, z)}{q_\phi({z| x})}\right] = \mathbb {E}_{\epsilon}\left[ \nabla_\phi \ln {\frac {p_{\theta }(x, \mu_\phi(x) + L_\phi(x)\epsilon)}{q_{\phi }(\mu_\phi(x) + L_\phi(x)\epsilon | x)}}\right] and so we obtained an unbiased estimator of the gradient, allowing stochastic gradient descent. Since we reparametrized z , we need to find q_\phi(z|x) . Let q_0 be the probability density function for \epsilon , then \ln q_\phi(z | x) = \ln q_0 (\epsilon) - \ln|\det(\partial_\epsilon z)| where \partial_\epsilon z is the Jacobian matrix of z with respect to \epsilon . Since z = \mu_\phi(x) + L_\phi(x)\epsilon , this is \ln q_\phi(z | x) = -\frac 12 \|\epsilon\|^2 - \ln|\det L_\phi(x)| - \frac n2 \ln(2\pi) == Statistical distance VAE variants== After the initial work of Diederik P. Kingma and Max Welling, several procedures were proposed to formulate in a more abstract way the operation of the VAE. In these approaches the loss function is composed of two parts: the usual reconstruction error part which seeks to ensure that the encoder-then-decoder mapping x \mapsto D_\theta(E_\psi(x)) is as close to the identity map as possible; the sampling is done at run time from the empirical distribution \mathbb{P}^{real} of objects available (e.g., for MNIST or IMAGENET this will be the empirical probability law of all images in the dataset). This gives the term: \mathbb{E}_{x \sim \mathbb{P}^{real}} \left[ \|x - D_\theta(E_\phi(x))\|_2^2\right] . a variational part that ensures that, when the empirical distribution \mathbb{P}^{real} is passed through the encoder E_\phi , we recover the target distribution, denoted here \mu(dz) that is usually taken to be a Multivariate normal distribution. We will denote E_\phi \sharp \mathbb{P}^{real} this pushforward measure which in practice is just the empirical distribution obtained by passing all dataset objects through the encoder E_\phi . In order to make sure that E_\phi \sharp \mathbb{P}^{real} is close to the target \mu(dz) , a Statistical distance d is invoked and the term d \left( \mu(dz), E_\phi \sharp \mathbb{P}^{real} \right)^2 is added to the loss. We obtain the final formula for the loss: L_{\theta,\phi} = \mathbb{E}_{x \sim \mathbb{P}^{real}} \left[ \|x - D_\theta(E_\phi(x))\|_2^2\right] +d \left( \mu(dz), E_\phi \sharp \mathbb{P}^{real} \right)^2 The statistical distance d requires special properties, for instance it has to be possess a formula as expectation because the loss function will need to be optimized by stochastic optimization algorithms. Several distances can be chosen and this gave rise to several flavors of VAEs: the sliced Wasserstein distance used by S Kolouri, et al. in their VAE the energy distance implemented in the Radon Sobolev Variational Auto-Encoder the Maximum Mean Discrepancy distance used in the MMD-VAE the Wasserstein distance used in the WAEs kernel-based distances used in the Kernelized Variational Autoencoder (K-VAE)

References

  1. ^ Kingma, Diederik P.; Welling, Max (2022-12-10). "Auto-Encoding Variational Bayes". arXiv : 1312.6114 [ stat.ML ]. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  2. ^ Rezende, Danilo Jimenez; Mohamed, Shakir; Wierstra, Daan (2014-06-18). "Stochastic Backpropagation and Approximate Inference in Deep Generative Models" . International Conference on Machine Learning . PMLR: 1278– 1286. arXiv : 1401.4082 . Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  3. ^ Bengio, Yoshua; Courville, Aaron; Vincent, Pascal (2013). "Representation Learning: A Review and New Perspectives". IEEE Transactions on Pattern Analysis and Machine Intelligence . 35 (8): 1798– 1828. arXiv : 1206.5538 . Bibcode : 2013ITPAM..35.1798B . doi : 10.1109/TPAMI.2013.50 . ISSN 1939-3539 . PMID 23787338 . S2CID 393948 . Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  4. ^ Kingma, Diederik P.; Rezende, Danilo J.; Mohamed, Shakir; Welling, Max (2014-10-31). "Semi-Supervised Learning with Deep Generative Models". arXiv : 1406.5298 [ cs.LG ]. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  5. ^ Higgins, Irina; Matthey, Loic; Pal, Arka; Burgess, Christopher; Glorot, Xavier; Botvinick, Matthew; Mohamed, Shakir; Lerchner, Alexander (2016-11-04). beta-VAE: Learning Basic Visual Concepts with a Constrained Variational Framework . NeurIPS. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  6. ^ Burgess, Christopher P.; Higgins, Irina; Pal, Arka; Matthey, Loic; Watters, Nick; Desjardins, Guillaume; Lerchner, Alexander (2018-04-10). "Understanding disentangling in β-VAE". arXiv : 1804.03599 [ stat.ML ]. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  7. ^ Sohn, Kihyuk; Lee, Honglak; Yan, Xinchen (2015-01-01). Learning Structured Output Representation using Deep Conditional Generative Models (PDF) . NeurIPS. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  8. ^ Dai, Bin; Wipf, David (2019-10-30). "Diagnosing and Enhancing VAE Models". arXiv : 1903.05789 [ cs.LG ]. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  9. ^ Dorta, Garoe; Vicente, Sara; Agapito, Lourdes; Campbell, Neill D. F.; Simpson, Ivor (2018-07-31). "Training VAEs Under Structured Residuals". arXiv : 1804.01050 [ stat.ML ]. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  10. ^ Larsen, Anders Boesen Lindbo; Sønderby, Søren Kaae; Larochelle, Hugo; Winther, Ole (2016-06-11). "Autoencoding beyond pixels using a learned similarity metric" . International Conference on Machine Learning . PMLR: 1558– 1566. arXiv : 1512.09300 . Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  11. ^ Bao, Jianmin; Chen, Dong; Wen, Fang; Li, Houqiang; Hua, Gang (2017). "CVAE-GAN: Fine-Grained Image Generation Through Asymmetric Training". pp. 2745– 2754. arXiv : 1703.10155 [ cs.CV ]. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  12. ^ Pinheiro Cinelli, Lucas; et al. (2021). "Variational Autoencoder" . Variational Methods for Machine Learning with Applications to Deep Networks . Springer. pp. 111– 149. doi : 10.1007/978-3-030-70679-1_5 . ISBN 978-3-030-70681-4 . S2CID 240802776 . Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  13. ^ Gao, Rui; Hou, Xingsong; Qin, Jie; Chen, Jiaxin; Liu, Li; Zhu, Fan; Zhang, Zhao; Shao, Ling (2020). "Zero-VAE-GAN: Generating Unseen Features for Generalized and Transductive Zero-Shot Learning". IEEE Transactions on Image Processing . 29 : 3665– 3680. Bibcode : 2020ITIP...29.3665G . doi : 10.1109/TIP.2020.2964429 . ISSN 1941-0042 . PMID 31940538 . S2CID 210334032 . Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  14. ^ Drefs, J.; Guiraud, E.; Panagiotou, F.; Lücke, J. (2023). "Direct evolutionary optimization of variational autoencoders with binary latents". Joint European Conference on Machine Learning and Knowledge Discovery in Databases . Lecture Notes in Computer Science. Vol. 13715. Springer Nature Switzerland. pp. 357– 372. arXiv : 2011.13704 . doi : 10.1007/978-3-031-26409-2_22 . ISBN 978-3-031-26408-5 . Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  15. ^ Kingma, Diederik P.; Welling, Max (2022-12-10). "Auto-Encoding Variational Bayes". arXiv : 1312.6114 [ stat.ML ]. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  16. ^ Kolouri, Soheil; Pope, Phillip E.; Martin, Charles E.; Rohde, Gustavo K. (2019). "Sliced Wasserstein Auto-Encoders" . International Conference on Learning Representations . International Conference on Learning Representations. ICPR. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  17. ^ Turinici, Gabriel (2021). "Radon-Sobolev Variational Auto-Encoders" . Neural Networks . 141 : 294– 305. arXiv : 1911.13135 . doi : 10.1016/j.neunet.2021.04.018 . ISSN 0893-6080 . PMID 33933889 . Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  18. ^ Gretton, A.; Li, Y.; Swersky, K.; Zemel, R.; Turner, R. (2017). "A Polya Contagion Model for Networks". IEEE Transactions on Control of Network Systems . 5 (4): 1998– 2010. arXiv : 1705.02239 . doi : 10.1109/TCNS.2017.2781467 . Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  19. ^ Tolstikhin, I.; Bousquet, O.; Gelly, S.; Schölkopf, B. (2018). "Wasserstein Auto-Encoders". arXiv : 1711.01558 [ stat.ML ]. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  20. ^ Louizos, C.; Shi, X.; Swersky, K.; Li, Y.; Welling, M. (2019). "Kernelized Variational Autoencoders". arXiv : 1901.02401 [ astro-ph.CO ]. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  21. ^ Dilokthanakul, Nat; Mediano, Pedro A. M.; Garnelo, Marta; Lee, Matthew C. H.; Salimbeni, Hugh; Arulkumaran, Kai; Shanahan, Murray (2017-01-13). "Deep Unsupervised Clustering with Gaussian Mixture Variational Autoencoders". arXiv : 1611.02648 [ cs.LG ]. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  22. ^ Hsu, Wei-Ning; Zhang, Yu; Glass, James (December 2017). "Unsupervised domain adaptation for robust speech recognition via variational autoencoder-based data augmentation". 2017 IEEE Automatic Speech Recognition and Understanding Workshop (ASRU) . pp. 16– 23. arXiv : 1707.06265 . doi : 10.1109/ASRU.2017.8268911 . ISBN 978-1-5090-4788-8 . S2CID 22681625 . Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  23. ^ Ehsan Abbasnejad, M.; Dick, Anthony; van den Hengel, Anton (2017). Infinite Variational Autoencoder for Semi-Supervised Learning . pp. 5888– 5897. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  24. ^ Xu, Weidi; Sun, Haoze; Deng, Chao; Tan, Ying (2017-02-12). "Variational Autoencoder for Semi-Supervised Text Classification" . Proceedings of the AAAI Conference on Artificial Intelligence . 31 (1). doi : 10.1609/aaai.v31i1.10966 . S2CID 2060721 . Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  25. ^ Kameoka, Hirokazu; Li, Li; Inoue, Shota; Makino, Shoji (2019-09-01). "Supervised Determined Source Separation with Multichannel Variational Autoencoder" . Neural Computation . 31 (9): 1891– 1914. doi : 10.1162/neco_a_01217 . PMID 31335290 . S2CID 198168155 . Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  26. ^ "From Autoencoder to Beta-VAE" . Lil'Log . 2018-08-12. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  27. ^ a b c Kingma, Diederik P.; Welling, Max (2013-12-20). "Auto-Encoding Variational Bayes". arXiv : 1312.6114 [ stat.ML ]. Wikipedia revision 1377688233, retrieved 2026-11-21 · 1795215600.0
  28. Pinheiro Cinelli, Lucas. Variati . · 1790722800.0
  29. Sliced Wasserstein Auto-Encoders . · 1790722800.0
  30. Radon-Sobolev Variational Auto-Encoders . · 1790722800.0
  31. Ehsan Abbasnejad, M. Infinite Variational Autoencoder for Semi-Superv . · 1790722800.0
  32. Xu, Weidi. Variational Autoencoder for Semi-Supervised Text Classification . · 1790722800.0
  33. Kameoka, Hirokazu. Supervised Determined Source Separation with Multichannel Variational . · 1790722800.0
  34. From Autoencoder to Beta-VAE . Lil'Log . 2018-08-12. · 1790722800.0
  35. Stochastic Backpropagation and Approximate Inference in Deep Gen . · 1790722800.0
  36. Cite conference|last1=Higgins|first1=Irina|last2=Matthey|first2=Loic|last3=Pal|first3=Arka|last4=Burgess|first4=Christopher|last5=Glorot|first5=Xavier|last6=Botvinick|first6=Matthew|last7=Mohamed|fi . · 1790722800.0
  37. Learning Structured Output Representation using Deep Conditional Generative Models . · 1790722800.0
  38. Autoencoding beyond pixels using a . · 1790722800.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Variational autoencoder". 1790776812. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1377688233

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·