How is k-means a limiting case of EM for a Gaussian mixture model, and what assumptions about the clusters does this reveal?
Unsupervised learning, Mixture models
Level L4 Advanced. Length Medium. Nature Th+Mat Both.
What's being asked
Whether you can take the small-variance limit of the responsibilities, and spot the hidden assumptions of k-means.
Key idea
Give every component the same fixed covariance (a round Gaussian of width ) and equal weights. Then the responsibility of component for point is . As this becomes 1 for the nearest centre and 0 for the rest. So the E-step becomes the k-means assignment step, and the M-step mean becomes the cluster mean.
Steps
- Fix for every component and . Then , and the shared constants cancel in .
- Divide the top and bottom by the numerator: . If is strictly the nearest centre, every term with has a negative exponent and goes to 0 as , so . If some is nearer, its term goes to , so .
- M-step: becomes the plain mean of the points assigned to , which is exactly the k-means update.
- Objective: times the expected complete-data log-likelihood equals plus terms of size about , which vanish as . So it tends to , the k-means objective, where is the cluster of point .
- Read off the assumptions: clusters are round (the same spread in every direction), have equal spread, have roughly equal weight, and each point belongs to exactly one cluster. That is why k-means struggles with stretched, unequal or overlapping clusters, which a full GMM can handle.
Common mistakes
- Taking while still letting each be learned. The limit needs a shared, fixed covariance.
- Saying k-means and a GMM always give the same clusters.
- Forgetting ties (a point exactly equidistant from two centres), which need a tie-breaking rule.
How long your answer should be
Half a page; about 4 minutes.
Last checked on 4 December 2026.
Read this
Previous in Unsupervised learning: t-SNE maps points to by minimising , where in the original space and in the embedding. (a) What happens to the embedding if is very large, or very small? (b) How is chosen in practice?
Next in Unsupervised learning: How can the principal components in a feature space be found by solving an eigenvalue problem for the kernel matrix , with ? How are the coefficients normalised, how is centred, and how is a new point projected?