AI Glossary / Probabilistic machine learning / Intermediate

Generalized expectation maximization

Definition

Generalized expectation maximization, usually called generalized EM or GEM, is a version of expectation maximization that improves the expected complete-data log likelihood without necessarily maximizing it at every parameter update. With an exact E-step and the usual EM conditions, this sufficient improvement preserves the nondecreasing observed-data likelihood property.

What it means

EM is useful when a model contains unobserved variables, such as unknown mixture-component memberships. It alternates between estimating a distribution over those hidden variables and updating the model parameters. Sometimes the parameter update is too difficult or expensive to solve completely.

GEM relaxes that requirement. The update can take a partial optimization step as long as it satisfies the appropriate improvement condition. This creates flexibility in how the model is fitted, but does not mean that an arbitrary approximate update is valid. The quantity being improved and the hidden-variable distribution used to evaluate it must remain clear.

How it works

At iteration k, the E-step calculates the conditional distribution of hidden variables given the observations and current parameters theta_k. Using that fixed distribution, define Q(theta; theta_k) as the expectation of the complete-data log likelihood under a candidate parameter theta.

An ordinary exact M-step selects a maximizer of Q. A generalized M-step instead chooses an admissible theta_(k+1) with Q(theta_(k+1); theta_k) at least as large as Q(theta_k; theta_k). A line search or another controlled optimization procedure can establish this condition without finding the full maximizer.

The next E-step then recomputes the hidden-variable distribution. The improvement argument compares candidates within the same E-step distribution; simply comparing arbitrary Q values from different iterations is not the same test. If the E-step is approximate or numerical error is material, the classical guarantee does not automatically apply. Monotonic likelihood alone also does not establish a global optimum.

Three practical examples

1. Mixture fitting: update a difficult component parameter using a checked partial optimizer while holding the current responsibilities fixed. Recompute responsibilities only when moving to the next E-step.

2. Missing-data models: replace an expensive complete M-step with a less costly improvement when the conditional expectations are tractable. Track whether the computational saving offsets any additional outer iterations.

3. Structured latent models: optimize a parameter block while preserving other blocks and model constraints. When conditional maximization steps are organized appropriately, this relates to the ECM subclass of generalized EM methods.

Think of it this way

Think of climbing using a temporary map that is refreshed after each stage. A full M-step seeks the highest point on that map; a generalized step accepts a verified ascent before refreshing it. The analogy captures partial improvement. It does not imply that every uphill direction on an arbitrary surrogate map improves the actual likelihood, or that the mountain has only one peak.

Worked example

Suppose an exact E-step for a ten-observation, two-component mixture gives expected memberships totaling eight for component one and two for component two. Hold all component-distribution parameters fixed and update only the mixing probability p. Ignoring constants, the relevant Q function is 8 log(p) + 2 log(1-p), using natural logarithms.

Start at p=0.5. Q is approximately -6.9315. The full maximizing update is p=8/10=0.8, with Q approximately -5.0040. But consider a partial move to p=0.65: its Q is approximately -5.5459, an increase of about 1.3856 over the starting value.

Therefore the move from 0.5 to 0.65 satisfies the generalized M-step improvement condition for this fixed E-step, even though it does not maximize Q. The observed-data log likelihood is nondecreasing under the stated EM assumptions. We cannot calculate its exact change from these expected counts alone; that would require the observed data and component likelihoods. The example demonstrates one valid parameter update, not a complete mixture-fitting run.

Illustrative case study

Fictional case: Cedar Analytics fits a latent customer-behavior model whose parameter maximization is costly. Engineers try a small number of numerical optimization steps per E-step. They retain a proposed update only after checking the same fixed-responsibility Q objective and parameter constraints.

A reviewer also asks for the actual observed-data likelihood trace and comparisons across starting values. The team avoids describing every early stop as convergence. This fictional case illustrates a controlled computational tradeoff, not a measured speed improvement or evidence that the resulting customer segments are meaningful.

Common misconceptions and mistakes

GEM does not mean replacing expected hidden-variable assignments with their most likely values. That is a different approximation, often associated with hard EM. Nor does taking one gradient step automatically satisfy GEM: an excessive step can reduce Q or leave the valid parameter domain.

A sequence of increasing likelihood values can progress very slowly or approach an undesirable solution. Tiny permitted improvements are not a general convergence-rate guarantee. Singularities, flat directions and numerical precision still matter. Finally, improving a training likelihood does not establish predictive usefulness, model identifiability or the validity of a missing-data assumption.

Business use

Use generalized EM when full maximization is an actual computational bottleneck and a reliable improvement test is available. Compare total runtime to a meaningful stopping criterion, not just time per iteration. A cheaper iteration can be a poor trade if it makes almost no progress.

Document initialization, parameter constraints, inner-optimizer tolerances and the treatment of failed updates. Separate a numerical stopping rule from substantive model validation. For decisions based on fitted latent groups or missing quantities, assess stability and held-out performance as well as likelihood behavior. The flexibility of GEM should make computation manageable while preserving an understandable optimization target.

People also ask

Must GEM find the best parameter at every step?

No. An admissible improvement of the current Q objective is sufficient for the generalized update condition.

Is its E-step necessarily approximate?

No. The standard GEM relaxation concerns the M-step; approximate E-steps require their own analysis.

Does monotonic likelihood guarantee the global maximum?

No. Initialization and the objective's geometry can lead to different limiting solutions.

Check your understanding

Why is p=0.65 acceptable in the example even though p=0.8 is better?

Answer: Its Q value improves on the starting p=0.5 under the fixed E-step distribution. GEM does not require the maximum at each update.

Related terms

  • Expectation-maximization
  • Latent variable
  • Q-function
  • Likelihood
  • Line search
  • Hard expectation maximization
  • conditional maximization
  • mixture model

Learn next

Derive the mixing-probability update from expected component counts, then compare a full update with several checked partial moves. Study the EM likelihood-improvement argument before implementing more complicated approximate variants.

  • Likelihood

More in Probabilistic machine learning

  • Gaussian scale mixture - A Gaussian scale mixture is a probability distribution formed by combining Gaussian distributions that share a location but vary in scale.
  • Generalized advantage estimation - Generalized advantage estimation, or GAE, is a reinforcement learning method for estimating how much better an action was than the value predicted for its...
  • Generalized belief propagation - Generalized belief propagation, or GBP, is a family of probabilistic inference methods that exchange messages between regions containing groups of variables.
  • Generalized linear mixed model - A generalized linear mixed model, or GLMM, combines a generalized linear response model with random effects that represent variation among groups or other...
  • Gibbs kernel - The Gibbs kernel is a Gaussian-process covariance function that allows the characteristic length scale to vary with the input location.
  • Graphite graph generative model - Graphite is a graph generative modeling framework that combines latent node representations with an iterative graph-neural-network decoder.

Sources

Neal and Hinton, A View of the EM Algorithm that Justifies Incremental, Sparse, and Other Variants: https://www.cs.toronto.edu/~hinton/absps/emk.pdf

Neal–Hinton text extraction remains garbled. Independent review verified GEM’s fixed-Q ascent condition in Meng, EM Algorithm, section 1: https://statistics.fas.harvard.edu/sites/g/files/omnuum10116/files/statistics-2/files/xlm_emalg_218-227.pdf . Original mixture calculations verified.

Previous: Generalized estimating equation Next: Generalized Few-shot Learning

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer