stat.MLJul 28, 2026

Lloyd's KK-Means Clustering Algorithm Is Frank-Wolfe in Disguise

Authors: Michael Pokojovy, J. Marcus Jobe, Simon Lacoste-Julien

Abstract

Lloyd's KK-means algorithm, also known as naïve KK-means, is a widely used ad hoc optimization heuristic, designed to minimize the sum of squared errors (SSE) across all KK-partitions of a dataset via iterative cluster refinement. In this work, we establish a novel connection between Lloyd's algorithm and the Frank-Wolfe (FW) algorithm, a prominent first-order method for projection-free optimization. We demonstrate that Lloyd's algorithm is a special case of FW. Leveraging recent advances in FW methods for concave objectives, we derive a non-asymptotic O(1/t)\mathcal{O}(1/t) convergence rate to a local minimum of the SSE objective. To account for empty clusters, an outcome possible under Lloyd's greedy assignment, we develop an FW variant for semismooth objectives while retaining the same convergence rate that is solely controlled by the initial SSE value. We illustrate our findings with a simulation study for spherical Gaussian mixtures and a real-world image segmentation dataset.

Explore similar work

Apr 23, 2026cs.LG

An effective variant of the Hartigan kk-means algorithm

The k-means problem is perhaps the classical clustering problem and often synonymous with Lloyd's algorithm (1957). It has become clear that Hartigan's algorithm (1975) gives better results in almost all cases, Telgarsky-Vattani note a typical improvement of 5%5\% -- 10%10\%. We point out that a very minor variation of Hartigan's method leads to another 2%2\% -- 5%5\% improvement; the improvement tends to become larger when either dimension or kk increase.
François Clément, Stefan Steinerberger
Aug 11, 2026math.OC

Gromov-Wasserstein Quantization and Clustering: Structure, Rates, and Algorithms

Clustering is a fundamental class of data analysis techniques with the most important representatives being centroid-based methods like kk-means. Such methods are strongly connected to quantization problems, which aim to approximate general probability measures with discrete ones. For example, kk-means corresponds to quantization with respect to the Wasserstein distance. While Wasserstein quantization clusters points within a fixed space, this paper studies Gromov-Wasserstein (GW) quantization, which additionally aims at clustering the ambient geometry of the space. We show existence of solutions to the GW quantization problem and give a characterization that justifies an analogue to the kk-means algorithm (Lloyd's algorithm) to approximate them numerically. We further calculate the quantization rate for usual Euclidean geometries that are used in the GW context, and relate it to standard Wasserstein quantization rates. Finally, numerical experiments show that GW quantization opens up many modeling possibilities beyond normal clustering methods (e.g., for geodesic distances of 3D shapes or structured pruning of neural networks) and that the introduced algorithm leads to useful numerical solutions with approximation quality often in line with theoretically optimal rates.
Florian Beier, Stephan Eckstein
Jul 15, 2024cs.DS

Faster and Simpler Greedy Algorithm for kk-Median and kk-Means

Clustering problems such as kk-means and kk-median are staples of unsupervised learning, and many algorithmic techniques have been developed to tackle their numerous aspects. In this paper, we focus on the class of greedy approximation algorithm, that attracted less attention than local-search or primal-dual counterparts. In particular, we study the recursive greedy algorithm developed by Mettu and Plaxton [SIAM J. Comp 2003]. We provide a simplification of the algorithm, allowing for faster implementation, in graph metrics or in Euclidean space, where our algorithm matches or improves the state-of-the-art.
Max Dupré la Tour, David Saulpic