Skip to content
Vibe Math Lab.

News · · Preprint, not peer reviewed; Lean proof in the ancillary files, which I did not run; not yet independently verified · Reported December 1, 2026 · Updated December 1, 2026

How badly can k-means++ start? A paper made with AI agent teams gives the exact answer, with a Lean proof

k-means clustering is one of the most common ways to sort data into groups. You pick how many groups you want, a number called k, and place k centers; each data point joins its nearest center, each center moves to the middle of its group, and the two steps repeat until nothing changes. How well it ends up depends on where the centers start, and k-means++ is the standard way to pick the starting centers; the paper notes it is the default in MATLAB and in Julia's clustering package.

Since 2007 k-means++ has carried a guarantee. A clustering's cost is the total squared distance from each point to its nearest center. On any data, the starting centers k-means++ picks cost, on average, at most a fixed number of times as much as the best possible clustering. Nobody knew that number exactly. It was known to lie between about 2 ln k and 5(ln k + 2), where ln k, the natural logarithm, grows slowly as k grows. Aravind Reddy of the Indian Institute of Technology Madras, a co-author of that 5(ln k + 2) bound, now claims the exact value for every k, with the full result checked in Lean, a language in which a computer checks every step.

It is a preprint, not peer reviewed, and I found no report of anyone outside the project checking it. The paper says the mathematics was "jointly developed" by AI agents working in "multi-agent swarms" under his direction, using several AI models from OpenAI, Anthropic and Google. One team wrote the Lean proof. Another, led by a different company's model, wrote its own independent Lean description of the algorithm and audited the rest. That split matters for trust: a computer can only check that a proof matches the statement it is given, so if the statement is wrong the check means little, and a second, separately written statement guards against that.

The exact answer comes in two pieces. For 19 or more centers the worst case is 2(1 + 1/2 + ... + 1/(k-1)) + 2, which is close to 2 ln k + 3.15. For 2 to 18 centers a different worst-case data set does a little worse than that formula: with 2 centers the answer is exactly 5, where the formula gives 4, and with 3 it is about 5.78, where the formula gives 5. The paper calls the switch between the two a phase transition. For 10 centers it gives about 7.897: on any data set k-means++ starts, on average, at most that many times the best clustering's cost, and some inputs come arbitrarily close. In every case the answer is 2 ln k plus a number between 2 and 4, near the old lower bound and far below the old upper one.

Status: preprint, not peer reviewed; Lean proof in the files posted with the paper, which I did not run; not yet independently verified.

What the paper claims and how it was made

  • The paper. "The Exact Approximation Ratio of k-means++" by Aravind Reddy, Centre for Responsible AI, Wadhwani School of Data Science and AI, IIT Madras, posted on arXiv in data structures and algorithms. It has gone through three versions with three titles at the same address: version 1 (November 9) proved new upper bounds with leading coefficient 2.108 on ln k and the exact values for k = 2 and 3; version 2 (November 20) claimed the ratio is 2 ln k + O(1), with upper and lower bounds three apart; version 3 (November 29), "Major revision" in its comments, claims the exact value for every k.
  • The claim in more detail. The paper calls the exact worst-case factor R_k, the name in the quote below. For 19 or more centers it is twice the sum 1 + 1/2 + ... + 1/(k-1), plus 2. For 2 to 18 centers it is strictly larger and comes from a separate formula in one variable; with 2 centers it is 5, and with 3 it is 185/32, about 5.78. In every case it lies between 2 ln k + 2 and 2 ln k + 4. The history of the bounds: David Arthur and Sergei Vassilvitskii, who introduced k-means++ in 2007, showed the factor lies between 2 ln k and 8(ln k + 2), and Konstantin Makarychev, Reddy and Liren Shan lowered the upper bound to 5(ln k + 2) in 2020.
  • The idea, in the abstract's words. Earlier analyses bound a cluster's expected cost when it is first sampled and charge that cost for the rest of the run. This one tracks what happens after the first hit: a poor first choice makes the cluster more likely to be sampled again, and "that second hit can bring the cluster's cost back down."
  • How AI was used, per the paper. Its AI use statement says AI agents "jointly developed the mathematical results in this paper over hundreds of agent-hours" with eight models from OpenAI, Anthropic and Google. A Claude model prepared the first draft and a Gemini model wrote the main Lean proof. A team led by an OpenAI model wrote an independent Lean description of the step that picks the starting centers, and audited the manuscript, the Lean proof and the finite checks, and a Claude model reviewed the manuscript separately. For specialists, the eight are five versions of OpenAI's GPT-6 (the audit team was led by GPT-6.2 Astra), Anthropic's Claude Fable 5.2, and Google's Gemini 4 Carbon and Gemini 4 Neon (Neon wrote the Lean proof); Claude Opus 5.5 drafted and reviewed the manuscript. The statement ends: "The author takes responsibility for the paper's contents."
  • The Lean check. The arXiv comments say the full result is formally verified in Lean 4, with the formalization in the ancillary files, the extra files arXiv lets authors post beside a paper. They list Lean sources for the main theorem, the sampling model and the separate specification. The paper says every finite inequality is checked in exact rational arithmetic, with no floating-point approximation. I did not download, read or build the Lean files, and I found no report of an outside build. That is why the separate team's specification matters most here.
  • Related work. Haim Kaplan and David Naori posted a paper on November 13 that gives the exact worst-case factor for k-median++, the same starting method when cost is measured with plain rather than squared distances, as 2 times (2 + 1/2 + ... + 1/(k-1)), and improved bounds for k-means++.

From the paper

“We determine R_k exactly for all k and discover a striking phase transition.”

Aravind Reddy, abstract of arXiv 2611.14573, version 3, November 29, 2026

“The author takes responsibility for the paper's contents.”

The paper's AI use statement

The full record: the dated log, with sources

The rest of the record

  • Edit history: reported here 11:45 a.m. Pacific time, December 1, 2026; rewritten for clarity 5:35 p.m. Pacific time, December 1, 2026; rewritten again for clarity 5:49 p.m. Pacific time, December 1, 2026.

Sources

Did this make sense?

Was this helpful?

Share this page