AI & Computational Science

The Exact Approximation Ratio of $k$-means++

⚠️ Preprint – Noch nicht peer-reviewed

Dieser Artikel wurde noch nicht von unabhängigen Experten begutachtet. Die Ergebnisse sind vorläufig und sollten mit Vorsicht interpretiert werden.

-cross
Abstract: The $k$-means++ algorithm is the standard initialization for $k$-means clustering, one of the most widely used methods in machine learning and data analysis, adopted both for its empirical performance and its worst-case approximation guarantee. Given a finite Euclidean point set, $k$-means seeks $k$ centers minimizing the sum of squared distances from each point to its nearest center. $k$-means++ picks the first center uniformly at random from the points and each subsequent center with probability proportional to its squared distance to the nearest chosen center. Let $R_k$ be the smallest factor such that, on every input, the expected cost of these $k$ centers is at most $R_k$ times the optimal cost. In their seminal paper introducing $k$-means++, Arthur and Vassilvitskii (SODA 2007) showed that $2ln k le R_k le 8(ln k + 2)$, and Makarychev, Reddy and Shan (NeurIPS 2020) lowered the upper bound to $5(ln k + 2)$. We determine $R_k$ exactly for all $k$ and discover a striking phase transition. For $k ge 19$, $R_k = 2H_{k-1} + 2,$ where $H_j = 1 + frac12 + frac13 + dots + frac1j$ is the $j$th harmonic number. For $2 le k le 18$, $R_k$ is the maximum of an explicit rational function of one variable and strictly exceeds $2H_{k-1} + 2$, with $R_2 = 5$ and $R_3 = 185/32$. In particular, $2ln k + 2 le R_k le 2ln k + 4$ for every $k ge 1$. When a cluster is first sampled, previous analyses bound its expected cost by a constant times its optimal cost and charge that cost for the rest of the run. We instead track what happens to a cluster after its first hit. At each later draw, the probability of sampling that cluster equals its share of the total cost. A poor first choice can therefore make a second hit more likely, and that second hit can bring the cluster’s cost back down. The full result is formally verified in Lean 4, and the formalization is included as ancillary files.

Source: The Exact Approximation Ratio of $k$-means++