Abstract
Training deep generative models with maximum likelihood remains a challenge. The typical workaround is to use variational inference (VI) and maximize a lower bound to the log marginal likelihood of the data. Variational auto-encoders (VAEs) adopt this approach. They further amortize the cost of inference by using a recognition network to parameterize the variational family. Amortized VI scales approximate posterior inference in deep generative models to large datasets. However it introduces an amortization gap and leads to approximate posteriors of reduced expressivity due to the problem known as posterior collapse. In this paper, we consider expectation maximization (EM) as a paradigm for fitting deep generative models. Unlike VI, EM directly maximizes the log marginal likelihood of the data. We rediscover the importance weighted auto-encoder (IWAE) as an instance of EM and propose a new EM-based algorithm for fitting deep generative models called reweighted expectation maximization (REM). REM learns better generative models than the IWAE by decoupling the learning dynamics of the generative model and the recognition network using a separate expressive proposal found by moment matching. We compared REM to the VAE and the IWAE on several density estimation benchmarks and found it leads to significantly better performance as measured by log-likelihood.
Introduction
Training deep generative models usually involves maximizing the Evidence Lower Bound (ELBO) because the true log-marginal likelihood of the data is mathematically intractable. While successful, this approach has two major "Achilles' heels": the amortization gap and posterior collapse. The amortization gap arises from using a neural network to approximate the posterior, introducing errors compared to exact per-point inference. Posterior collapse occurs when the recognition network reverts to the prior, causing the model to ignore latent variables and resulting in poor data representations.
This paper argues that these issues stem from the coupling of the generative model and recognition network learning in Variational Inference (VI). By returning to the classic Expectation Maximization (EM) algorithm—which directly targets the log-marginal likelihood—the authors propose a framework that overcomes these limitations.
Methods: Reweighted Expectation Maximization (REM)
The core contribution is the REM algorithm, which builds on the realization that the Importance Weighted Auto-encoder (IWAE) is actually a specific instance of the EM algorithm. Unlike standard VAEs where the model and recognition network are trained jointly using the same objective, REM decouples them.
As shown in the table above, REM introduces several key innovations:
- Decoupling via REM: REM separates the learning dynamics of the generative model and the recognition network.
- Moment Matching for Rich Proposals: REM introduces a "hyperproposal" ($s(z)$), a full-covariance Gaussian distribution found by matching the moments (mean and covariance) of the true posterior.
- Inclusive KL Divergence: While VAEs use the "exclusive" KL divergence (which can be mode-seeking), REM uses the inclusive KL divergence to train the recognition network. This encourages "over-dispersed" proposals that cover the entire support of the true posterior, making them more effective for importance sampling.
The paper presents two versions: REM (v1), which uses the recognition network as the primary proposal, and REM (v2), which uses the moment-matched distribution directly to update the generative model.
Experimental Evaluation
The authors evaluated REM on three standard density estimation benchmarks: Fixed MNIST, Stochastic MNIST, and OMNIGLOT. These datasets provide a range of complexity for testing the model's ability to learn data distributions.
Key Results
In all experiments, REM significantly outperformed both the VAE and the IWAE in terms of log-likelihood:
- Performance: On OMNIGLOT, REM (v1) achieved a test log-likelihood of -113.94, compared to IWAE's -114.73 and the significantly lower performance of the VAE.
- Stability: REM maintains high-quality proposals even as the number of particles ($K$) increases, whereas IWAE's posterior quality often deteriorates with large $K$.
- The Power of Decoupling: By using different objectives, REM prevents the generative model and recognition network from "co-adapting" in ways that lead to posterior collapse.
Conclusion and Future Work
REM demonstrates that the inclusive KL divergence is a superior hyperobjective for learning proposals, providing a more robust signal for importance sampling. While the current work focuses on continuous latent variables, future research could extend REM to discrete models using techniques like doubly-reparameterized gradients. Additionally, the authors suggest applying these moment-matching techniques to Variational Sequential Monte Carlo to improve time-series modeling, despite the slight computational overhead introduced by moment matching and self-normalized importance sampling.
Summary updated