Stochastic Expectation Maximization with Variance Reduction

Jianfei Chen, Jun Zhu, Yee Whye Teh, Tong Zhang

Overview

The Expectation-Maximization (EM) algorithm is the gold standard for learning latent variable models, such as Gaussian Mixtures or Topic Models. However, applying it to modern, large-scale datasets presents a dilemma:

  1. Batch EM (bEM) is highly stable and converges exponentially fast near local optima, but it requires a full pass over the entire dataset for every single update, making it computationally prohibitive for "big data."
  2. Stochastic EM (sEM) scales efficiently by updating parameters using small minibatches. Unfortunately, the noise (variance) introduced by these samples forces the algorithm to converge much more slowly (at a rate of $O(1/\sqrt{T})$) and requires meticulous tuning of a decreasing step-size sequence.

To bridge this gap, the authors introduce sEM-vr (Stochastic EM with Variance Reduction). This new variant combines the scalability of stochastic methods with the fast, exponential convergence of traditional batch EM, achieving state-of-the-art convergence speeds on large-scale latent variable models while only requiring a simple, constant step size.

Methods: The sEM-vr Algorithm

Inspired by variance-reduced gradient descent algorithms like SVRG, sEM-vr introduces a "control variate" to stabilize the stochastic updates.

In standard stochastic EM, estimates are updated based on a single data point or minibatch. In sEM-vr, each "epoch" (a full pass through the data) begins by calculating the full-batch expectation. This serves as a stable anchor or control variate.

During the subsequent minibatch updates within that epoch, the algorithm uses the difference between the current minibatch expectation and the anchor expectation to correct the update. The update rule is defined as:

$$\hat{s}_{e,t+1} = (1 - \rho)\hat{s}_{e,t} + \rho [f_i(\hat{s}_{e,t}) - f_i(\hat{s}_{e,0}) + F(\hat{s}_{e,0})]$$

Where:

  • $F(\hat{s}_{e,0})$ is the full-batch "anchor."
  • $f_i(\hat{s}_{e,t}) - f_i(\hat{s}_{e,0})$ is the correction term that reduces variance.
  • $\rho$ is a constant step size.

Key Insights and Ideas

The "Staircase" Convergence

In practice, sEM-vr displays a highly unique "staircase" convergence pattern. At the start of each epoch, the variance is near zero because the current parameters are close to the anchor, leading to extremely rapid progress. As the parameters drift further from the anchor over the epoch, progress slows down until the next epoch resets the anchor.

Staircase convergence pattern of sEM-vr compared to sEM and bEM.

Constant Step Sizes and Theoretical Parity

Unlike standard sEM, which requires a complex decay schedule (e.g., $\rho_t = (t+10)^{-0.5}$), sEM-vr works beautifully with a constant step size. This significantly reduces the hyperparameter tuning burden.

Furthermore, the authors prove that sEM-vr achieves the same exponential asymptotic convergence rate as batch EM. This is a major theoretical win, proving that we do not have to sacrifice the quality of convergence for the speed of iteration. The authors also note that because EM is a "stochastic approximation" algorithm rather than standard gradient descent, proving this convergence required a novel set of mathematical guarantees.

Key Results

The researchers evaluated sEM-vr on a synthetic Gaussian Mixture Model (GMM) to verify theoretical rates, and on Probabilistic Latent Semantic Analysis (pLSA) / LDA using four large text corpora: NIPS (1.93m tokens), NYTimes (99m tokens), Wiki (524m tokens), and PubMed (731m tokens).

Performance of sEM-vr across multiple datasets compared to baselines.
  • Speedup: On the massive PubMed dataset, sEM-vr reached a high-quality training objective significantly faster than both standard sEM and bEM.
  • Performance vs. Baselines: sEM-vr consistently outperformed modern competitors, including SCVB0 (a popular stochastic inference method for topic models), SVI/SSVI (Stochastic Variational Inference methods, which lagged due to complex inner-loop updates), and GOEM (Gibbs Online EM, which suffered from high Monte-Carlo variance).
  • Robustness: Under strong-concavity assumptions, sEM-vr is globally convergent, meaning it can reliably find a stationary point from any valid initialization.

Limitations and Future Work

While powerful, sEM-vr has a few limitations:

  • Strong Assumptions: The global convergence proof relies on the log-likelihood being strongly concave, which is not always true for complex neural models or non-canonical exponential families.
  • Memory Overhead: The algorithm requires storing the full-batch expectation and the anchor parameters, increasing space complexity by a factor of roughly 3 compared to vanilla sEM.
  • Tractable E-steps: The current formulation assumes the E-step (calculating expectations) is tractable. Extending this variance reduction technique to Variational EM or Monte-Carlo EM—where the E-step must be approximated—is a vital next step for applying it to even more complex models.

Summary updated

BibTeX
@inproceedings{chen2018stochastic,
  author = {Jianfei Chen and Jun Zhu and Yee Whye Teh and Tong Zhang},
  title = {{Stochastic Expectation Maximization with Variance Reduction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
}
Figure