BRAGA

02 Writing02-02 Notes02-02-427

Latent Variable Expected Log-Likelihood

Published 16 Apr 20263 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
Eq[log⁡p(X,Z∣θ)]=∑i=1n∑k=1Krik[log⁡πk+log⁡N(xi∣μk,Σk)]\mathbb{E}_q[\log p(X, Z \mid \theta)] = \sum_{i=1}^{n}\sum_{k=1}^{K} r_{ik} \left[ \log \pi_k + \log \mathcal{N}(x_i \mid \mu_k, \Sigma_k) \right]
(1)

We are working on the latent variable expected log-likelihood in the EM algorithm for Gaussian Mixture Models, where the canonical formula is

Eq[log⁡p(X,Z∣θ)]=∑i=1n∑k=1Krik[log⁡πk+log⁡N(xi∣μk,Σk)],\mathbb{E}_q[\log p(X, Z \mid \theta)] = \sum_{i=1}^{n}\sum_{k=1}^{K} r_{ik} \left[ \log \pi_k + \log \mathcal{N}(x_i \mid \mu_k, \Sigma_k) \right],
(2)

with rikr_{ik} playing the role of the variational distribution over latent component assignments. This is the expected complete-data log-likelihood term inside the EM lower bound, under the assumptions of a finite GMM, categorical latent assignments, and responsibilities satisfying rik≥0r_{ik} \ge 0 and ∑k=1Krik=1\sum_{k=1}^{K} r_{ik} = 1.

Deep Breakdown

In a Gaussian Mixture Model, every observed data point xix_i is assumed to come from one of KK Gaussian components. The problem is that we do not observe which component generated each point. That missing information is represented by a latent variable, often written as ziz_i. If the latent assignments were known, GMM estimation would be much easier, because the complete-data log-likelihood would separate cleanly across components. But since ZZ is hidden, EM works by alternating between:

  • estimating a distribution over latent assignments, and
  • optimizing parameters using that distribution.

The key quantity that makes this work is the expected complete-data log-likelihood:

Eq[log⁡p(X,Z∣θ)]\mathbb{E}_q[\log p(X, Z \mid \theta)]
(3)

For GMMs, if the auxiliary distribution q(Z)q(Z) factorizes through responsibilities rikr_{ik}, then this expectation becomes:

Eq[log⁡p(X,Z∣θ)]=∑i=1n∑k=1Krik[log⁡πk+log⁡N(xi∣μk,Σk)]\mathbb{E}_q[\log p(X, Z \mid \theta)] = \sum_{i=1}^{n}\sum_{k=1}^{K} r_{ik} \left[ \log \pi_k + \log \mathcal{N}(x_i \mid \mu_k, \Sigma_k) \right]
(4)

Inputs:

  • observed data X={x1,…,xn}X = \{x_1, \dots, x_n\},
  • latent assignment distribution q(Z)q(Z), represented by responsibilities rikr_{ik},
  • model parameters θ={πk,μk,Σk}k=1K\theta = \{\pi_k, \mu_k, \Sigma_k\}_{k=1}^{K}.

Output:

  • a scalar objective value, the expectation of the complete-data log-likelihood under the current soft assignments.

Why it matters in DA/DS:

  • it is the core quantity optimized in the M-step,
  • it explains EM as coordinate ascent on a lower bound,
  • it turns hard unknown component labels into soft probabilistic weights,
  • it makes the update formulas for weights, means, and covariances natural,
  • it gives a variational interpretation of EM.

This quantity is not the full ELBO by itself. The full EM lower bound also includes an entropy term from q(Z)q(Z). But this expected log-likelihood term is the part that depends directly on the GMM parameters in a way that leads to the M-step updates.

This object links directly to:

  • GMM log-likelihood objective, because it is part of a lower bound on the observed-data log-likelihood,
  • responsibilities, because they define the expectation under qq,
  • EM algorithm, because EM alternates between optimizing qq and θ\theta,
  • variational view, because EM can be seen as coordinate ascent on a bound.

Flowchart

Start withobserved data Xand latentassignments ZWrite joint modelp(X, Z | θ)Introduceauxiliarydistribution q(Z)Represent q(Z)usingresponsibilitiesr_ikTakeexpectation oflog p(X, Z | θ)under qObtain Σ_i Σ_kr_ik [log π_k +log N(x_i | μ_k,Σ_k)]E-Step updatesr_ikM-Stepmaximizes thisquantity withrespect to θRecover weight,mean, andcovarianceupdatesInterpret EM ascoordinateascent on alower bound

#machine-learning#machine-learning-algorithms#density-estimation-gaussian-mixture-models-gmm

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close