[Paper Review] Revisiting k-means: New Algorithms via Bayesian Nonparametrics
This paper proposes DP-means and hard Gaussian HDP, scalable hard clustering algorithms derived from Bayesian nonparametric models—specifically Dirichlet process and hierarchical Dirichlet process mixtures. By taking a limit as the covariance shrinks to zero, the Gibbs sampler for these models converges to a k-means-like algorithm that automatically determines the number of clusters via a penalty term, achieving monotonic convergence to a local optimum while retaining the flexibility of nonparametric Bayesian clustering.
Bayesian models offer great flexibility for clustering applications---Bayesian nonparametrics can be used for modeling infinite mixtures, and hierarchical Bayesian models can be utilized for sharing clusters across multiple data sets. For the most part, such flexibility is lacking in classical clustering methods such as k-means. In this paper, we revisit the k-means clustering algorithm from a Bayesian nonparametric viewpoint. Inspired by the asymptotic connection between k-means and mixtures of Gaussians, we show that a Gibbs sampling algorithm for the Dirichlet process mixture approaches a hard clustering algorithm in the limit, and further that the resulting algorithm monotonically minimizes an elegant underlying k-means-like clustering objective that includes a penalty for the number of clusters. We generalize this analysis to the case of clustering multiple data sets through a similar asymptotic argument with the hierarchical Dirichlet process. We also discuss further extensions that highlight the benefits of our analysis: i) a spectral relaxation involving thresholded eigenvectors, and ii) a normalized cut graph clustering algorithm that does not fix the number of clusters in the graph.
Motivation & Objective
- To bridge the gap between the scalability of k-means and the flexibility of Bayesian nonparametric clustering by deriving hard clustering algorithms from Dirichlet process mixture models.
- To extend this framework to multiple data sets using hierarchical Dirichlet processes, enabling shared cluster structure across data sets while maintaining automatic cluster count selection.
- To develop practical, scalable alternatives to sampling-based inference in Bayesian nonparametric models that retain the theoretical advantages of Bayesian modeling.
- To demonstrate that the resulting algorithms optimize a k-means-like objective with a penalty for the number of clusters, ensuring monotonic convergence.
- To provide spectral and graph-based relaxations that generalize the approach beyond standard k-means, including a normalized cut algorithm without fixed cluster count.
Proposed method
- Derive a hard clustering algorithm from the Dirichlet process mixture model by taking the limit as the covariance of each component approaches zero, transforming the Gibbs sampler into a k-means-like algorithm with automatic cluster creation.
- Formulate a k-means-like objective function that includes a penalty term for the number of clusters, which the algorithm monotonically minimizes.
- Extend the framework to multiple data sets using the hierarchical Dirichlet process (HDP), resulting in a model that learns both local clusters per data set and global clusters shared across data sets.
- Propose a spectral relaxation for the DP-based objective that uses thresholded eigenvectors instead of top-k eigenvectors, linking Bayesian nonparametrics to spectral clustering.
- Design a normalized cut-based graph clustering algorithm that does not fix the number of clusters in advance, using the same underlying penalized objective.
- Implement and evaluate DP-means and hard Gaussian HDP on synthetic and real-world data, comparing with k-means, Gibbs sampling, and baseline clustering methods.
Experimental results
Research questions
- RQ1Can a Bayesian nonparametric model like the Dirichlet process mixture be used to derive a scalable, hard clustering algorithm that automatically determines the number of clusters?
- RQ2How does the asymptotic behavior of the Gibbs sampler in a Dirichlet process mixture model relate to the k-means algorithm as the component covariance tends to zero?
- RQ3Can the hierarchical Dirichlet process be used to derive a k-means-like algorithm that clusters multiple data sets with shared global clusters and local clusters per data set?
- RQ4What is the relationship between the penalized k-means objective optimized by the derived algorithm and the underlying Bayesian nonparametric model?
- RQ5Can spectral and graph-based relaxations of the derived objective lead to new clustering algorithms that do not fix the number of clusters in advance?
Key findings
- DP-means achieves higher normalized mutual information (NMI) than k-means on 5 out of 8 UCI data sets and outperforms Gibbs sampling on 4 out of 8, demonstrating comparable or better accuracy with much faster convergence.
- On the Photo Tourism data set of 312,320 image patches, DP-means converged in 63 iterations, while Gibbs sampling failed to converge within feasible time, highlighting the scalability advantage of the proposed method.
- For the synthetic multi-data-set problem, the hard Gaussian HDP achieved an average NMI of 0.81, significantly outperforming k-means on the full data set (0.77) and DP-means (0.73), and surpassing individual clustering with no cluster sharing.
- The hard Gaussian HDP produced 17 global clusters and 4.4 local clusters per data set on average, showing effective cluster sharing across data sets while maintaining high clustering accuracy.
- The spectral relaxation for the DP-based objective uses thresholded eigenvectors rather than top-k eigenvectors, revealing a novel connection between Bayesian nonparametrics and spectral clustering.
- The normalized cut-based graph clustering algorithm derived from the penalized objective does not fix the number of clusters in advance, offering a flexible alternative to standard normalized cut.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.