potentialpaper

Do you know what k-means? Clustering with constant number of samples

Arjan Cornelissen, Joao F. Doriguello, Alessandro Luongo, Ewin Tang

ICLR 2026 submission

Edit this page

Or clone it with git

The page gets its repository with its first edit, so start in the web editor.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Clustering is one of the most important tools for analysis of large datasets, and perhaps the most popular clustering algorithm is Lloyd's algorithm for kk-means. This algorithm takes nn vectors V=[v1,…,vn]∈Rd×nV=[v_1,\dots,v_n]\in\mathbb{R}^{d\times n} and outputs kk centroids c1,…,ck∈Rdc_1,\dots,c_k\in\mathbb{R}^d; these partition the vectors into clusters based on which centroid is closest to a particular vector. We present a classical ε\varepsilon-kk-means algorithm that performs an approximate version of one iteration of Lloyd's algorithm with time complexity O~(∥V∥F2nk2dε2(k+log⁡n))\widetilde{O}\big(\frac{\|V\|_F^2}{n}\frac{k^{2}d}{\varepsilon^2}(k + \log{n})\big), exponentially improving the dependence on the data size nn and matching that of the "qq-means" quantum algorithm originally proposed by Kerenidis, Landman, Luongo, and Prakash (NeurIPS'19). Moreover, we propose an improved qq-means quantum algorithm with time complexity O~(∥V∥Fnk3/2dε(k+d)(k+log⁡n))\widetilde{O}\big(\frac{\|V\|_F}{\sqrt{n}}\frac{k^{3/2}d}{\varepsilon}(\sqrt{k}+\sqrt{d})(\sqrt{k} + \log{n})\big) that quadratically improves the runtime of our classical ε\varepsilon-kk-means algorithm in several parameters. Our quantum algorithm does not rely on quantum linear algebra primitives of prior work, but instead only uses QRAM to prepare simple states based on the current iteration's clusters and multivariate quantum mean estimation. Our upper bounds are complemented with classical and quantum query lower bounds, showing that our algorithms are optimal in most parameters. Finally, we conduct numerical experiments that evidence the substantially improved runtime our classical algorithm over the standard Lloyd's algorithm, thus being one of the first cases of a practical dequantised algorithm.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…