On-Line Expectation–Maximization Algorithm for latent Data Models

Olivier Cappé, Éric Moulines

TL;DR

This paper introduces a new online version of the Expectation-Maximization (EM) algorithm designed for large-scale datasets and streaming data. By updating sufficient statistics via stochastic approximation rather than re-processing the entire dataset, the authors achieve optimal convergence rates without the heavy computational burden of matrix inversions required by previous methods.

What Problem Does This Paper Address?

The Expectation-Maximization (EM) algorithm is a cornerstone of statistics, used to find maximum likelihood estimates in models with "latent" (hidden) variables—think mixture models, missing data, or hidden Markov models. However, the classic "batch" EM algorithm has a major flaw: it requires the entire dataset to be available at every iteration. As datasets grow into the millions or arrive as continuous streams, batch EM becomes computationally paralyzed.

Previous attempts at "online" EM (like Titterington’s 1984 approach) relied on stochastic gradient descent. These methods often required calculating and inverting the Fisher Information Matrix (FIM), which is computationally expensive and numerically unstable. Furthermore, earlier proofs of convergence often assumed the model was "well-specified" (i.e., the data actually follows the model), a luxury rarely found in the real world.

Methods

The authors propose a "recursive" EM algorithm that sticks closer to the original EM philosophy but adapts it for a one-pass data setting.

  1. Stochastic E-Step: Instead of calculating the expectation over the whole dataset, the algorithm maintains a running average of the sufficient statistics. When a new observation arrives, the sufficient statistics are updated using a step-size (learning rate) mechanism.
  2. Standard M-Step: The parameters are then updated by applying the standard M-step formula to these updated statistics.
  3. Exponential Family Focus: The method is particularly efficient for models where the complete-data likelihood belongs to an exponential family, as the E-step reduces to simply updating a vector of statistics.
  4. Polyak-Ruppert Averaging: To ensure the algorithm reaches the optimal convergence rate ($1/\sqrt{n}$) without needing to perfectly tune the learning rate, the authors recommend a post-processing step that averages the parameter estimates over time.

Datasets

The paper focuses on theoretical validation and uses simulated datasets to illustrate performance:

  • Poisson Mixture Model: A simple mixture of $m$ Poisson distributions used to compare the new method against Titterington’s algorithm.
  • Mixture of Gaussian Regressions: A more complex conditional model where the response variable depends on explanatory covariates. The authors used a variation of a simulation from the flexmix R package, involving two classes with ambiguous labels to test the algorithm's robustness.

Key Insights and Ideas

  • Bypassing the Matrix Inversion: The most significant "aha" moment is that by updating sufficient statistics rather than the parameters directly, the algorithm implicitly handles the geometry of the parameter space. You get the benefits of a second-order method (like Newton's method) without ever having to explicitly invert a Hessian or Fisher Information Matrix.
  • Robustness to Misspecification: The authors prove that the algorithm converges to the stationary points of the Kullback-Leibler (KL) divergence even if the model is wrong. This makes it much more practical for real-world engineering applications.
  • Optimal Rate via Averaging: They show that while a simple online update might be slow or biased, adding Polyak-Ruppert averaging makes the estimator "asymptotically efficient"—meaning it’s as good as the best possible batch estimator you could build.

Key Results

  • Convergence: The authors provide a rigorous proof that the algorithm converges to stationary points of the likelihood surface with probability one.
  • Efficiency: In the mixture of regressions simulation, the proposed online EM with averaging (OL06a) was the only method that remained consistent with the theoretical optimal variance as the number of samples increased.
  • Computational Gains: For large $n$ (e.g., 10,000 observations), the online approach was significantly more efficient than batch EM, which requires multiple passes over the data to reach the same level of accuracy.

Limitations and Future Work

  • Explicit M-Step Required: The algorithm relies on the existence of an explicit, closed-form solution for the M-step ($\bar{\theta}(s)$). If your model requires an internal numerical optimization for the M-step (like some Generalized Linear Models), this specific approach isn't directly applicable.
  • Independence Assumption: The current work assumes observations are independent. The authors note that extending this to dependent data—specifically Hidden Markov Models (HMMs) or Markov Random Fields—is a vital next step for the field.
  • Step-Size Sensitivity: While Polyak-Ruppert averaging helps, the initial choice of step-size sequence still influences early-stage stability, especially in complex models.

Summary updated

BibTeX
@article{cappe2009line,
  author = {Olivier Cappé and Éric Moulines},
  title = {{On-Line Expectation–Maximization Algorithm for latent Data Models}},
  journal = {Journal of the Royal Statistical Society Series B (Statistical Methodology)},
  year = {2009},
  doi = {10.1111/j.1467-9868.2009.00698.x},
}
Figure