Modified K-means Algorithm with Local Optimality Guarantees

Mingyi Li, Michael R. Metel, Akiko Takeda
6/8/2025
cs.LGmath.OCstat.ML

Official code: lmingyi/LO-K-means (3 stars, MIT, last commit 2026-02-13).

Abstract

The K-means algorithm is one of the most widely studied clustering algorithms in machine learning. While extensive research has focused on its ability to achieve a globally optimal solution, there still lacks a rigorous analysis of its local optimality guarantees. In this paper, we first present conditions under which the K-means algorithm converges to a locally optimal solution. Based on this, we propose simple modifications to the K-means algorithm which ensure local optimality in both the continuous and discrete sense, with the same computational complexity as the original K-means algorithm. As the dissimilarity measure, we consider a general Bregman divergence, which is an extension of the squared Euclidean distance often used in the K-means algorithm. Numerical experiments confirm that the K-means algorithm does not always find a locally optimal solution in practice, while our proposed methods provide improved locally optimal solutions with reduced clustering loss. Our code is available at https://github.com/lmingyi/LO-K-means.

View on arXivView PDF

Code Implementations(1)

lmingyi/LO-K-meansOfficial100%
MIT

Modified K-means Algorithm with Local Optimality Guarantees (ICML 2025)

30C++, PythonMay 31, 20258 months agoMIT

Similar Papers

Cite this paper

@article{li2025modified,
  title  = {Modified K-means Algorithm with Local Optimality Guarantees},
  author = {Mingyi Li and Michael R. Metel and Akiko Takeda},
  year   = {2025},
  eprint = {2506.06990},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.06990v2},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.06990.svg)](https://codeofpaper.com/paper/2506.06990)

Discussion