Abstract
The $k$-means++ algorithm is a cornerstone of modern clustering, providing a provable $\mathcal{O}(\log k)$ approximation guarantee by initializing centers via $D^2$-sampling. This paper explores the theoretical limits of two common practical variations: "greedy" $k$-means++, which picks the best of $\ell$ candidates, and "noisy" $k$-means++, which models imperfect sampling probabilities. We show that while the greedy heuristic can degrade worst-case performance to $\Omega(\ell \log k)$, the algorithm remains remarkably robust to noise, maintaining an $\mathcal{O}(\log^2 k)$ guarantee even under adversarial skewing.
Introduction
Lloyd’s algorithm is the standard method for $k$-means clustering, but its performance is highly dependent on the initial set of centers. Poor initialization often leads to suboptimal local minima. To address this, the $k$-means++ algorithm was introduced, using a randomized seeding process known as $D^2$-sampling. In this process, each subsequent center is chosen with a probability proportional to its squared distance from the nearest existing center.
Since its inception, practitioners have often employed a "greedy" variant of $k$-means++. Instead of sampling a single point, the algorithm samples $\ell$ candidates and greedily selects the one that minimizes the current clustering cost. While intuitively appealing, the theoretical implications of this change remained unproven until now.
The Greedy Trap
The core insight of this paper is that "greed is not always good." The authors demonstrate that the greedy variant can be significantly worse than the standard randomized approach in adversarial scenarios.
The intuition is that by always picking the "best" immediate candidate, the algorithm may systematically ignore clusters that are essential for a globally optimal solution but offer less immediate cost reduction. In a worst-case geometric instance—such as a simplex with dense clusters at vertices and a sparse center—the probability of selecting a "good" vertex point can drop exponentially if it is consistently outperformed by a "mediocre" candidate in the short term.
The authors prove a lower bound for greedy $k$-means++, showing it yields an expected approximation of $\Omega(\min\{\ell, k/\log k\} \cdot \log k)$. For the common choice of $\ell = \log k$, this results in an $\Omega(\log^2 k)$ bound, which is asymptotically worse than the $\mathcal{O}(\log k)$ guarantee of standard $k$-means++.
Robustness to Noise
While greed can be a liability, the authors find that $k$-means++ is surprisingly resilient to "noise." In real-world applications, $D^2$-sampling is rarely exact due to floating-point errors or the use of fast approximation heuristics.
The paper formalizes "noisy $k$-means++" by allowing an adversary to skew the sampling probabilities within a constant factor. Despite this interference, the authors prove that the algorithm still achieves an $\mathcal{O}(\log^2 k)$ approximation. This result provides a strong theoretical foundation for the various approximate $k$-means++ implementations used in large-scale industrial settings.
A Balanced Approach: Moderately Greedy
To bridge the gap between empirical performance and theoretical safety, the authors propose a "moderately greedy" approach. By mixing standard $k$-means++ steps with greedy selections (e.g., via a randomized choice at each step), one can prevent the probability of selecting any optimal point from becoming too small. This hybrid method maintains a solid theoretical guarantee of $\mathcal{O}(\ell^3 \log^2 k)$ while still allowing the algorithm to benefit from the local optimizations of the greedy heuristic.
Conclusion
This work clarifies the theoretical landscape of $k$-means++ variants. It warns against pure greed in worst-case scenarios while validating the robustness of the algorithm against the inevitable noise of practical implementations. Future work remains to determine if the $\mathcal{O}(\log^2 k)$ bound for noisy sampling is tight or if it can be improved to match the original $\mathcal{O}(\log k)$ guarantee.
Summary updated