Abstract
(Neal and Hinton, 1998) recast maximum likelihood estimation of any given latent variable model as the minimization of a free energy functional $F$, and the EM algorithm as coordinate descent applied to $F$. Here, we explore alternative ways to optimize the functional. In particular, we identify various gradient flows associated with $F$ and show that their limits coincide with $F$'s stationary points. By discretizing the flows, we obtain practical particle-based algorithms for maximum likelihood estimation in broad classes of latent variable models. The novel algorithms scale to high-dimensional settings and perform well in numerical experiments.
Introduction
Latent variable models (LVMs) are a cornerstone of modern machine learning, enabling the modeling of observed data $y$ through hidden variables $x$. Training these models typically relies on Maximum Likelihood Estimation (MLE), with the Expectation-Maximization (EM) algorithm serving as the standard approach. However, EM faces significant challenges: it operates via coordinate descent, which can be slow and prone to local optima, and its E-step often becomes intractable in complex models, necessitating expensive approximations like Monte Carlo EM.
This work moves beyond the traditional alternating update scheme by treating LVM training as a joint optimization problem. By identifying gradient flows on a "free energy" functional—utilizing Wasserstein-2 geometry for the distribution space—we derive scalable, particle-based algorithms that outperform traditional variants in high-dimensional settings.
Methodology: Gradient Flows and Particle Discretization
The core insight is that EM is a specific coordinate descent strategy for minimizing the free energy functional $F(\theta, q) = \mathbb{E}_q[-\log p(x, y | \theta)] - H(q)$, where $q$ is a candidate distribution for the latent variables. Instead of alternating, we propose following the gradient flow of $F$ directly.
To define gradients in the space of probability distributions, we employ Wasserstein-2 geometry. This choice leads to a gradient flow for the distribution $q$ that takes the form of a Fokker-Planck equation, which can be efficiently simulated using Langevin dynamics. We approximate $q$ using a cloud of $N$ particles, resulting in three primary algorithms:
- Particle Gradient Descent (PGD): Simultaneous gradient steps for particles and parameters.
- Particle Quasi-Newton (PQN): Incorporates second-order (Hessian) information for parameters $\theta$ to address ill-conditioning.
- Particle Marginal Gradient Descent (PMGD): A hybrid approach for models where the M-step is analytically tractable.
A key advantage is "natural warm-starting": particles evolve continuously, staying near the shifting posterior and avoiding the "burn-in" overhead typical of MCMC-based EM methods.
Experimental Evaluation
We evaluated the proposed algorithms across several tasks, ranging from toy hierarchical models to large-scale image generation using datasets like MNIST and CelebA.
Efficiency and Scalability
In Bayesian logistic regression tasks using the Wisconsin Breast Cancer dataset, our particle-based methods demonstrated significant performance gains. As shown in the table below, PGD, PQN, and PMGD achieved comparable test errors to the SOUL baseline while being approximately 10x faster when using $N=100$ particles.
The scalability of these methods was further demonstrated on the CelebA dataset, where we successfully trained a deep generator network involving over 2.5 million latent variables. On MNIST image inpainting, the PGD-trained generator achieved an MSE of $4.1 \times 10^{-2}$, substantially outperforming Variational Autoencoder (VAE) and Alternating Back-Propagation (ABP) baselines.
Discussion and Key Insights
The success of these algorithms stems from several factors:
- Joint Optimization: Simultaneous updates of $\theta$ and $q$ allow for more effective navigation of the optimization landscape compared to sequential updates.
- Hardware Acceleration: Unlike serial MCMC chains, particle updates are embarrassingly parallel, allowing them to leverage modern GPU/TPU hardware.
- Robust Posterior Approximation: Particle-based approaches handle multimodal posteriors more effectively than methods like SOUL, which can collapse into narrower, less accurate approximations.
While these algorithms are powerful, they share EM's limitation of finding stationary points rather than global optima. Additionally, they require model densities to be differentiable with respect to both parameters and latent variables. Future work may explore extensions to non-Euclidean spaces and methods to further mitigate discretization bias.
Summary updated