Skip to main content
QUICK REVIEW

[Paper Review] The K-modes algorithm for clustering

Miguel Á. Carreira-Perpiñán, Weiran Wang|arXiv (Cornell University)|Apr 24, 2013
Advanced Clustering Algorithms ResearchComputer Science21 references22 citations
TL;DR

This paper proposes the K-modes algorithm, a clustering method that finds exactly K representative, valid patterns (modes) in data by combining density maximization (like mean-shift) with cluster assignment (like K-means). It produces interpretable, noise-robust centroids even in nonconvex clusters, outperforming K-means and mean-shift in centroid validity and robustness while maintaining computational efficiency.

ABSTRACT

Many clustering algorithms exist that estimate a cluster centroid, such as K-means, K-medoids or mean-shift, but no algorithm seems to exist that clusters data by returning exactly K meaningful modes. We propose a natural definition of a K-modes objective function by combining the notions of density and cluster assignment. The algorithm becomes K-means and K-medoids in the limit of very large and very small scales. Computationally, it is slightly slower than K-means but much faster than mean-shift or K-medoids. Unlike K-means, it is able to find centroids that are valid patterns, truly representative of a cluster, even with nonconvex clusters, and appears robust to outliers and misspecification of the scale and number of clusters.

Motivation & Objective

  • To address the lack of a clustering algorithm that returns exactly K meaningful, valid patterns (modes) as centroids, especially in nonconvex or manifold-structured data.
  • To overcome the limitations of K-means, which produces non-valid centroids (e.g., averaged noisy patterns) in nonconvex clusters, and mean-shift, which conflates bandwidth and cluster count and struggles in high dimensions.
  • To develop a method that ensures centroids are both representative of their cluster and valid patterns in the input space, even when clusters are irregular or manifold-structured.
  • To provide a computationally efficient alternative to mean-shift and K-medoids that maintains high centroid quality without requiring centroids to be actual data points.
  • To decouple the roles of cluster count (K) and smoothing (bandwidth), enabling independent control over the number of clusters and the level of noise averaging in centroids.

Proposed method

  • Proposes a K-modes objective function that combines K-means cluster assignment with density maximization via kernel density estimation (KDE), using a bandwidth σ to control smoothing.
  • Uses a homotopy algorithm that iteratively decreases the bandwidth σ from large to small values, tracking mode evolution and ensuring convergence to K distinct modes.
  • Centroids are computed as weighted averages of data points in each cluster using a kernel function (e.g., Gaussian), where weights depend on distance to the current mode estimate.
  • In the limit of large σ, K-modes reduces to K-means; in the limit of small σ, it approaches a K-medoids-like behavior where centroids are close to actual data points.
  • Employs a local bandwidth strategy per cluster, allowing adaptive smoothing that balances noise reduction and pattern fidelity.
  • Relies on the EM-like iterative update: assign points to the nearest mode, then recompute each mode as a kernel-weighted mean of its assigned points, ensuring convergence to a local optimum.

Experimental results

Research questions

  • RQ1Can a clustering algorithm be designed to return exactly K valid, interpretable patterns (modes) as centroids, even in nonconvex or manifold-structured data?
  • RQ2How can the roles of cluster count (K) and smoothing (bandwidth) be decoupled to improve robustness and interpretability compared to mean-shift and K-means?
  • RQ3Does combining cluster assignment with density maximization yield centroids that are more representative and less sensitive to outliers than K-means or mean-shift?
  • RQ4Can the algorithm maintain computational efficiency comparable to K-means while achieving the representativeness of mean-shift and the validity of K-medoids?
  • RQ5What is the optimal bandwidth strategy for balancing noise averaging and pattern fidelity in the resulting centroids?

Key findings

  • K-modes produces centroids that are valid patterns—such as recognizable digit images—even in nonconvex clusters where K-means fails by averaging across orientations.
  • The algorithm is robust to outliers and parameter misspecification, as demonstrated by stable centroid behavior under varying K and σ.
  • With intermediate bandwidth values, K-modes produces centroids that average out noise and idiosyncrasies, yielding more typical and representative patterns than individual data points.
  • Computationally, K-modes is slightly slower than K-means but significantly faster than mean-shift, with complexity comparable to running K-means multiple times.
  • The homotopy algorithm enables a smooth transition from coarse to fine clustering, presenting a sequence of centroids across the smoothing spectrum, useful for exploratory data analysis.
  • K-modes can be extended to use local bandwidths and non-Gaussian kernels (e.g., Epanechnikov), potentially improving speed and robustness in future implementations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.