The -means algorithm (Lloyd's algorithm) is a widely used method for clustering unlabeled data. A key bottleneck of the -means algorithm is that each iteration requires time linear in the number of data points, which can be expensive in big data applications. This was improved in recent works proposing quantum and quantum-inspired classical algorithms to approximate the -means algorithm locally, in time depending only logarithmically on the number of data points (along with data dependent parameters) [-means: A quantum algorithm for unsupervised machine learning; Kerenidis, Landman, Luongo, and Prakash, NeurIPS 2019; Do you know what -means?, Doriguello, Luongo, Tang]. In this work, we describe a simple randomized mini-batch -means algorithm and a quantum algorithm inspired by the classical algorithm. We prove worse-case guarantees that significantly improve upon the bounds for previous algorithms. Our improvements are due to a careful use of uniform sampling, which preserves certain symmetries of the -means problem that are not preserved in previous algorithms that use data norm-based sampling.
View on arXiv@article{chen2025_2504.20982, title={ Provably faster randomized and quantum algorithms for k-means clustering via uniform sampling }, author={ Tyler Chen and Archan Ray and Akshay Seshadri and Dylan Herman and Bao Bach and Pranav Deshpande and Abhishek Som and Niraj Kumar and Marco Pistoia }, journal={arXiv preprint arXiv:2504.20982}, year={ 2025 } }