Gaussian Mixture Models in Depth
Identifiability, singularities and choosing the number of components.
The Gaussian mixture is the simplest latent-variable model, and it still breaks almost every rule of textbook statistics. Its likelihood has no maximum, its parameters are identified only up to relabeling, the number of components escapes the usual tests, and EM provably gets stuck. This lesson takes each failure in turn and says what is known about it.
What you’ll learn
- Prove that the Gaussian mixture likelihood is unbounded, and compare the remedies: constraints, variance floors, priors and local maximizers.
- State the identifiability theorem for finite Gaussian mixtures, prove the univariate case from tail asymptotics, and explain label switching and the slow rate of overfitted mixtures.
- Choose the number of components with BIC, ICL or held-out likelihood, and explain why likelihood-ratio and Laplace asymptotics fail for mixtures.
- Describe Dirichlet-process mixtures through the Chinese restaurant process, and what their posterior on the number of clusters does not estimate.
- Summarize provable algorithms for learning mixtures and the landscape of EM: global convergence for two components, bad local maxima for three or more.
A likelihood with no maximum
Take (any other components get weight 0, or a tiny weight), let component 2 be a fixed Gaussian with positive definite, and let . Component 2 alone keeps every point's density bounded below:
Put component 1 exactly on the first point, , with . At its own center a Gaussian density is :
Add the logarithms and let . The spike contributes while the other terms stay above a fixed constant:
So "the" maximum-likelihood estimate does not exist: the supremum is approached only by degenerate spikes at single points. The useful estimator is a local maximizer in the interior, near the truth, which is what EM from a sensible start finds. To make the problem well posed, practitioners use one of these:
- Constraints. Hathaway (1985) bounded the ratios of the component standard deviations away from zero in the univariate case; the constrained problem has a strongly consistent global solution. A covariance shared by all components cannot collapse onto one point without starving the other points, and keeps the likelihood bounded once there are enough points in general position.
- Floors. Raise every eigenvalue of every to at least , or add (scikit-learn's
reg_covar); the widget does the former with . - Priors. A conjugate (normal–inverse-Wishart) prior turns the problem into MAP estimation, whose objective is bounded (Fraley & Raftery, 2007).
In the plane (), a component sits exactly on one data point and dominates that point's density, while the other points are explained by other components. By how much does the log-likelihood increase each time this component's standard deviation is halved?
Show the answer
1.39
The density at the center is , so halving multiplies it by and adds to the log-likelihood, every time, without end. In dimensions each halving adds , so collapse is even more tempting in high dimension.
Identifiability and label switching
A model is identifiable if implies . A mixture can never pass this test literally: permuting the components gives the same density, so every parameter vector has twins. The right question is whether the density determines the mixing distribution , that is, the set of components and their weights.
Subtract the two mixtures and merge equal components. Identifiability follows if Gaussian densities with distinct are linearly independent: no relation for all with every . Order the components by (largest first), breaking ties by (largest first), and divide the relation by the first density:
If , the log of the ratio has leading term . If and , it is linear, . Either way, as :
Letting in the relation leaves , a contradiction. So the densities are linearly independent, and equal mixtures have equal components and weights. The multivariate case reduces to this one: project onto a generic direction , along which distinct components stay distinct (the exceptional directions form a set of measure zero), and a vanishing combination of multivariate Gaussians would give a vanishing combination of distinct univariate ones.
Label switching. The likelihood, and a posterior under any prior symmetric in the labels, has symmetric copies of every mode. An MCMC sampler that mixes well visits all of them, so the posterior mean of "" is the same as that of "" and meaningless. Remedies: report only label-invariant quantities (the density, the probability that two points share a cluster), relabel the draws after sampling so as to minimize a posterior expected loss (Stephens, 2000), or impose an ordering such as , which can distort the posterior when components are close.
Overfitted mixtures. Identifiability says nothing about rates. If the fitted exceeds the true number , the true distribution is matched by a whole set of parameters (an extra component with zero weight anywhere, or a true component split in two), the Fisher information is singular there, and the standard theory fails. Chen (1995) showed that the mixing distribution can be estimated at rate when the number of components is known, but at best at rate when it is unknown.
A two-component univariate mixture is fitted to data from a single . Which parameter values reproduce the true distribution exactly?
- Only , , , with any
- Only the values with both components equal to , for any
- None: a mixture of two components cannot equal a single Gaussian
- A whole set containing both of the first two families (and the mirror case )
Show the answer
D. A whole set containing both of the first two families (and the mirror case )
Either one component carries all the weight (and the other is arbitrary), or both components equal (and the weight is arbitrary). The truth is a union of curves in parameter space, not a point: this is why overfitted mixtures have singular Fisher information and slower rates.
How many components?
The maximized likelihood never decreases with , so it cannot choose alone. The textbook fix, a likelihood-ratio test of against components, fails too: under the null the extra component sits on the boundary () or duplicates another, its parameters are not identified, and the statistic does not have the usual limit (McLachlan & Peel, 2000, discuss this and the parametric bootstrap used instead).
The Bayesian information criterion of Schwarz (1978), , comes from a Laplace approximation to the log marginal likelihood of a regular model. Mixtures are not regular, but BIC still behaves well for choosing in practice, and singular learning theory explains why it is conservative: for singular models the negative log marginal likelihood is , where the real log canonical threshold replaces half the parameter count and is never larger than it (Watanabe, 2009, 2013).
| best | BIC | AIC | ||
|---|---|---|---|---|
| 1 | 5 | |||
| 2 | 11 | |||
| 3 | 17 | |||
| 4 | 23 | |||
| 5 | 29 | |||
| 6 | 35 |
Other criteria answer other questions. Held-out (cross-validated) log-likelihood targets density estimation directly and needs no asymptotics. ICL (Biernacki, Celeux & Govaert, 2000) adds to BIC twice the entropy of the responsibilities, , so it penalizes components that overlap and prefers for which the clusters are well separated: the right goal when the mixture is a clustering device, not a density model. AIC targets predictive accuracy and tends to pick more components than BIC.
Infinitely many components: Dirichlet-process mixtures
Instead of choosing , a Bayesian can let the number of components be unbounded and let the data decide how many are used. Ferguson's (1973) Dirichlet process is a distribution over discrete probability measures, with concentration and base measure . Sethuraman's stick-breaking construction shows what a draw looks like:
A DP mixture, with the random measure used as a mixing distribution (Antoniak, 1974), draws , then and : infinitely many components, of which only finitely many are occupied by any finite data set.
Integrating out gives the Chinese restaurant process: the -th point joins an existing cluster with members with probability and opens a new one with probability . Rich clusters get richer, and new clusters keep appearing at a slowing rate. By linearity of expectation, the expected number of occupied clusters is the sum of these new-cluster probabilities:
Under a Chinese restaurant process with , how many clusters do points occupy on average?
Show the answer
7.5
With the sum is the harmonic number (the approximation is a little low). A thousand points occupy only about seven or eight clusters a priori, which is why is often given its own prior.
Provable learning and the landscape of EM
Identifiability guarantees that enough data pin down the mixture; it does not say that any efficient algorithm finds it. Theoretical computer science has mapped what is possible:
| Result | Assumption | Guarantee |
|---|---|---|
| Dasgupta (1999) | well-separated Gaussians | the first provably correct algorithm; time linear in , polynomial in |
| Moitra & Valiant (2010) | minimal: no separation condition | time and samples polynomial in and for any fixed ; an exponential dependence on is necessary |
| Hsu & Kakade (2013) | spherical components, means in general position (so ) | a consistent estimator from a spectral decomposition of low-order moments, with no separation condition |
| Regev & Vijayaraghavan (2017) | equal-weight spherical unit-variance components | separation of order suffices for samples, and needs superpolynomially many |
| Li & Liu (2022) | same | polynomial time at separation for any , nearly matching that threshold |
EM itself has been analyzed in this spirit. For two components with known covariance, the picture is benign. Balakrishnan, Wainwright & Yu (2017) proved local convergence from a ball around the truth (Why EM Works). Xu, Hsu & Maleki (2016) characterized EM's limit points from every initialization, and Daskalakis, Tzamos & Zampetakis (2017) proved that population EM converges geometrically to the true means, with finite-sample guarantees from a random initialization; in one dimension, ten steps from an initialization at infinity give less than 1% error.
For three or more components the picture flips. Jin, Zhang, Balakrishnan, Wainwright & Jordan (2016) answered an open question of Srebro (2007): even the population likelihood (infinite data) of an equal-weight mixture of well-separated spherical Gaussians can have local maxima arbitrarily worse than the global one, and on such mixtures EM from random initialization converges to a bad critical point with probability at least . More data cannot fix this; initialization (k-means++ seeding, many restarts) and better algorithms must.
Key takeaways
- The Gaussian mixture likelihood is unbounded: a component collapsing onto one point sends . Useful estimates are interior local maxima, or maxima under constraints, variance floors or priors.
- Finite Gaussian mixtures are identifiable up to relabeling (Teicher; Yakowitz & Spragins): the heaviest tail identifies a component, and induction does the rest. Label switching makes per-component posterior summaries meaningless; overfitted mixtures are only weakly identified, with best rate (Chen, 1995).
- The likelihood cannot choose , and the likelihood-ratio test loses its limit. BIC, , works well in practice; singular learning theory replaces by the real log canonical threshold. ICL targets well-separated clusters, held-out likelihood targets density.
- Dirichlet-process mixtures occupy about clusters a priori and are good density estimators, but their posterior number of clusters is inconsistent for finite mixtures.
- Learning mixtures is efficient for fixed (Moitra & Valiant) and for spherical components above about separation. EM provably works from almost any start for two balanced components with known covariance, but for three or more there are well-separated mixtures on which bad local maxima trap random starts with probability .
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Why is the global maximizer of an unconstrained Gaussian mixture likelihood not a useful estimator?
- It is consistent but too expensive to compute
- It does not exist: the likelihood is unbounded, approached by components collapsing onto single points
- It always has all components equal
- It exists but is not unique, because of label switching
Show the answer
B. It does not exist: the likelihood is unbounded, approached by components collapsing onto single points
Centering a component on a data point and shrinking its covariance sends that point's density, and the log-likelihood, to infinity while the other components keep the remaining points' densities bounded below. Useful fits are interior local maxima, or maxima of a constrained or penalized problem.
What does the identifiability theorem for finite Gaussian mixtures guarantee?
- The density determines the set of components and their weights, though not their labels
- The density determines each component's label
- The MLE is unique
- EM converges to the true parameters
Show the answer
A. The density determines the set of components and their weights, though not their labels
Equal mixture densities with positive weights and distinct components must have the same multiset of (weight, mean, covariance) triples. Which component is called "1" is arbitrary, hence label switching; and identifiability is a statement about the model, not about any estimator or algorithm.
On the widget's three stretched clusters (), the best log-likelihood rises from with to with , at the cost of 6 more parameters. Which does BIC prefer, and by how much?
- , by about 13.6
- , by about 6.8
- , by about 17.1
- Neither: BIC cannot compare different
Show the answer
C. , by about 17.1
, so scores worse and BIC keeps . AIC's penalty, , is smaller than the likelihood gain of , which is why AIC narrowly prefers .
Data come from a mixture of three Gaussians and are fitted with a Dirichlet-process mixture of Gaussians. As , what does the posterior on the number of occupied clusters do?
- It concentrates on 3
- It grows like and so diverges
- It concentrates on 1, because the DP prefers few clusters
- It does not concentrate on 3: small extra clusters keep positive posterior probability
Show the answer
D. It does not concentrate on 3: small extra clusters keep positive posterior probability
Miller & Harrison (2014) proved this inconsistency for Dirichlet- and Pitman–Yor-process mixtures. The DP mixture still estimates the density well, but its cluster count should not be read as an estimate of the number of components; a prior on itself (a mixture of finite mixtures) is the consistent alternative.
Further reading
- G. J. McLachlan & D. Peel, Finite Mixture Models (Wiley, 2000).
- H. Teicher, "Identifiability of finite mixtures," Annals of Mathematical Statistics 34(4), 1265–1269 (1963).
- A. Moitra & G. Valiant, "Settling the polynomial learnability of mixtures of Gaussians," IEEE Symposium on Foundations of Computer Science (2010).
- C. Jin, Y. Zhang, S. Balakrishnan, M. J. Wainwright & M. I. Jordan, "Local maxima in the likelihood of Gaussian mixture models: Structural results and algorithmic consequences," Advances in Neural Information Processing Systems 29 (2016).
- J. W. Miller & M. T. Harrison, "Inconsistency of Pitman–Yor process mixtures for the number of components," Journal of Machine Learning Research 15, 3333–3370 (2014).