Free access
Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA)

Consistent k-Clustering for General Metrics


Given a stream of points in a metric space, is it possible to maintain a constant approximate clustering by changing the cluster centers only a small number of times during the entire execution of the algorithm?
This question received attention in recent years in the machine learning literature and, before our work, the best known algorithm performs Õ(k2) center swaps (the Õ(·) notation hides polylogarithmic factors in the number of points n and the aspect ratio Δ of the input instance). This is a quadratic increase compared to the offline case — the whole stream is known in advance and one is interested in keeping a constant approximation at any point in time — for which Õ(k) swaps are known to be sufficient and simple examples show that Ω(k log(nΔ)) swaps are necessary. We close this gap by developing an algorithm that, perhaps surprisingly, matches the guarantees in the offline setting. Specifically, we show how to maintain a constant-factor approximation for the k-median problem by performing an optimal (up to polylogarithimic factors) number Õ(k) of center swaps. To obtain our result we leverage new structural properties of k-median clustering that may be of independent interest.

Formats available

You can view the full content in the following formats:

Information & Authors


Published In

cover image Proceedings
Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA)
Pages: 2660 - 2678
Editor: Dániel Marx, CISPA Helmholtz Center for Information Security, Germany
ISBN (Online): 978-1-61197-646-5


Published online: 7 January 2021



Metrics & Citations



If you have the appropriate software installed, you can download article citation data to the citation manager of your choice. Simply select your manager software from the list below and click Download.

Cited By

There are no citations for this item

View Options

View options


View PDF

Get Access







Copy the content Link

Share with email

Email a colleague

Share on social media

On May 28, 2024, our site will enter Read Only mode for a limited time in order to complete a platform upgrade. As a result, the following functions will be temporarily unavailable: registering new user accounts, any updates to existing user accounts, access token activations, and shopping cart transactions. Contact [email protected] with any questions.