[Paper Review] VAEBM: A Symbiosis between Variational Autoencoders and Energy-based Models
VAEBM combines a VAE generator with an energy-based model in data space, trained in two stages, to achieve high-quality image generation with fast sampling and good mode coverage.
Energy-based models (EBMs) have recently been successful in representing complex distributions of small images. However, sampling from them requires expensive Markov chain Monte Carlo (MCMC) iterations that mix slowly in high dimensional pixel space. Unlike EBMs, variational autoencoders (VAEs) generate samples quickly and are equipped with a latent space that enables fast traversal of the data manifold. However, VAEs tend to assign high probability density to regions in data space outside the actual data distribution and often fail at generating sharp images. In this paper, we propose VAEBM, a symbiotic composition of a VAE and an EBM that offers the best of both worlds. VAEBM captures the overall mode structure of the data distribution using a state-of-the-art VAE and it relies on its EBM component to explicitly exclude non-data-like regions from the model and refine the image samples. Moreover, the VAE component in VAEBM allows us to speed up MCMC updates by reparameterizing them in the VAE's latent space. Our experimental results show that VAEBM outperforms state-of-the-art VAEs and EBMs in generative quality on several benchmark image datasets by a large margin. It can generate high-quality images as large as 256$\ imes$256 pixels with short MCMC chains. We also demonstrate that VAEBM provides complete mode coverage and performs well in out-of-distribution detection. The source code is available at https://github.com/NVlabs/VAEBM
Motivation & Objective
- Motivate combining VAEs and EBMs to leverage their complementary strengths.
- Capture the data distribution’s mode structure with a VAE while using an EBM to refine details and exclude non-data regions.
- Enable faster sampling by reparameterizing MCMC in the VAE latent space.
- Provide a training procedure that decomposes into two stages for practicality and stability.
- Demonstrate improved generative quality and mode coverage on multiple image benchmarks.
Proposed method
- Define the generative model as h_{ψ,θ}(x,z) = (1/Z_{ψ,θ}) p_{θ}(x,z) e^{-E_{ψ}(x)}, where p_{θ}(x,z) is a VAE generator and E_{ψ}(x) is an energy function in pixel space.
- Train by maximizing the marginal log-likelihood, decomposed into L_VAE and L_EBM terms, enabling a two-stage optimization (train VAE first, fix θ, then train EBM ψ).
- Use reparameterization to sample from the joint space (x,z) and from the augmented space ε = (ε_x, ε_z), enabling efficient Langevin dynamics in sampling.
- In the negative phase, perform MCMC in the joint (z,x) space with reparameterized sampling to speed up mixing.
- Demonstrate that sampling can be accelerated by performing MCMC in the latent space of the VAE and jointly with the data space via the augmented model.
Experimental results
Research questions
- RQ1Does integrating a VAE with an EBM improve sample quality over purely VAE or purely EBM approaches?
- RQ2Can two-stage training (VAE first, EBM second) yield stable optimization and practical sampling for VAEBMs?
- RQ3Does VAEBM achieve complete mode coverage and robust out-of-distribution detection on image datasets?
- RQ4How does VAEBM perform against state-of-the-art likelihood-based and GAN/score-based models on standard benchmarks?
Key findings
- VAEBM outperforms previous EBMs and state-of-the-art VAEs on CIFAR-10 and other benchmarks under likelihood-based evaluation.
- Short MCMC chains initialized from the pre-trained VAE yield high-quality samples with faster sampling.
- VAEBM achieves competitive or superior results compared to GANs and score-based models while preserving likelihood-based training advantages.
- The model demonstrates complete mode coverage and strong out-of-distribution detection (AUROC higher than several baselines).
- On CelebA 64, CelebA HQ 256, and LSUN Church 64, VAEBM shows substantial improvements over NVAE and related baselines (FID scores).
- In 2D toy experiments (25-Gaussians), VAEBM improves VAE likelihood and better matches the true distribution.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.