Multi-Swap k-Means++

Lorenzo Beretta, Vincent Cohen-Addad, Silvio Lattanzi, Nikos Parotsidis
2/12/2026

No official code found. Best implementation: lorenzo2beretta/multi-swap-k-means-pp (5 stars, last commit 2024-10-25).

Abstract

The $k$-means++ algorithm of Arthur and Vassilvitskii (SODA 2007) is often the practitioners' choice algorithm for optimizing the popular $k$-means clustering objective and is known to give an $O(\log k)$-approximation in expectation. To obtain higher quality solutions, Lattanzi and Sohler (ICML 2019) proposed augmenting $k$-means++ with $O(k \log \log k)$ local search steps obtained through the $k$-means++ sampling distribution to yield a $c$-approximation to the $k$-means clustering problem, where $c$ is a large absolute constant. Here we generalize and extend their local search algorithm by considering larger and more sophisticated local search neighborhoods hence allowing to swap multiple centers at the same time. Our algorithm achieves a $9 + \varepsilon$ approximation ratio, which is the best possible for local search. Importantly we show that our approach yields substantial practical improvements, we show significant quality improvements over the approach of Lattanzi and Sohler (ICML 2019) on several datasets.

View on arXivView PDF

Code Implementations(1)

This repository contains the code used to run experiments on the multi-swap K-means++ algorithm from https://arxiv.org/pdf/2309.16384.

50PythonOct 25, 20241 years ago

Similar Papers

Cite this paper

@article{beretta2026multiswap,
  title  = {Multi-Swap k-Means++},
  author = {Lorenzo Beretta and Vincent Cohen-Addad and Silvio Lattanzi and Nikos Parotsidis},
  year   = {2026},
  eprint = {2309.16384},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2309.16384},
  journal = {NEURIPS 2023 2023}
}

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/2309.16384.svg)](https://codeofpaper.com/paper/2309.16384)

Discussion