Fully Dynamic k-Clustering with Fast Update Time and Small Recourse

Sayan Bhattacharya, Martín Costa, Naveen Garg, Silvio Lattanzi, Nikos Parotsidis

Introduction

In the era of streaming data and real-time analytics, datasets are rarely static. Maintaining high-quality clusterings as points are continuously added or removed is a fundamental challenge in computational geometry and data mining. This paper introduces a new algorithmic framework for fully dynamic $k$-clustering that bridges the long-standing gap between fast update times and stable solutions (low recourse). By combining a novel "consistency hierarchy" with randomized local search, the authors achieve performance bounds that approach the theoretical "holy grail": $O(1)$ approximation with near-optimal update time and recourse.

The Challenge of Dynamic Clustering

Dynamic $k$-clustering problems, such as $k$-median, $k$-means, and $k$-center, require maintaining a set of $k$ representative centers as the underlying dataset changes. Algorithms are typically evaluated across three competing metrics:

  1. Approximation Ratio: The quality of the clustering cost compared to the optimal static solution.
  2. Update Time: The computational cost of processing a single insertion or deletion.
  3. Recourse: The number of centers changed per update, representing the stability of the solution.

Historically, researchers faced a trade-off: algorithms either offered fast updates with high recourse or low recourse with slow updates. For instance, in the classic $k$-median problem, the state-of-the-art update time was $\tilde{O}(k^2)$, far from the ideal $\tilde{O}(k)$ target.

Technical Innovations

The authors propose three primary technical innovations to overcome these trade-offs:

1. The Consistency Hierarchy

The algorithm maintains a nested sequence of center sets across multiple layers. Each layer is a subset of the one above it. This structure enables "lazy" updates: a layer is only recomputed when enough changes have accumulated to justify the cost. This mechanism naturally minimizes recourse while maintaining solution quality.

Standard local search is often prohibitively slow because it evaluates every possible swap between current centers and potential new ones. The authors demonstrate that a randomized approach—sampling a few candidates and performing the best swap among them—is sufficient to maintain a high-quality solution. This is the first rigorous proof that such randomization works effectively in a dynamic setting with both fast updates and low recourse.

3. Lagrangian Relaxation

To estimate the optimal solution's value efficiently, the authors adapt the Jain-Vazirani and Mettu-Plaxton frameworks to the dynamic setting. This allows the algorithm to maintain a $O(1)$-approximate estimate of the optimal $k$-median cost in just $\tilde{O}(k)$ update time.

Breakthrough Results

The paper provides the first algorithms to simultaneously achieve near-optimal bounds for several core clustering problems.

Dynamic $k$-Median and $k$-Means

For any $\epsilon > 0$, the new algorithm achieves an $O(1/\epsilon)$ approximation for $k$-median with $\tilde{O}(k^{1+\epsilon})$ update time and $\tilde{O}(k^\epsilon)$ recourse. This effectively breaks the $O(k^2)$ update time barrier that previously limited large-scale applications.

Comparison of results for the dynamic k-median problem.

Dynamic $k$-Center

The framework also yields a new trade-off for the $k$-center problem, offering $O(\log n \log k)$ approximation with $\tilde{O}(k)$ update time and $\tilde{O}(1)$ recourse.

Comparison of results for the dynamic k-center problem.

Conclusion and Future Work

While this work significantly advances the state of the art, several challenges remain. The approximation ratios for $k$-median and $k$-means depend on $1/\epsilon$, meaning tighter constants require more computational resources. Additionally, while the $k$-center algorithm is exceptionally fast, its approximation factor is logarithmic; closing the gap to the static factor of 2 remains an open problem. Finally, exploring purely deterministic algorithms that match these randomized bounds is a promising direction for future research.

This summary is based on the research paper "Fully Dynamic k-Clustering with Fast Update Time and Small Recourse" by Sayan Bhattacharya, Martín Costa, Naveen Garg, Silvio Lattanzi, and Nikos Parotsidis.

Summary updated

Abstract

In the dynamic metric $k-\mathbf{median}$ problem, we wish to maintain a set of $k$ centers $S\subseteq V$ in an input metric space $(V, d)$ that gets updated via point insertions/deletions, so as to minimize the objective $\sum\nolimits_{x\in V}\min\nolimits_{y\in S}d(x, y)$. The quality of a dynamic algorithm is measured in terms of its approximation ratio, “recourse” (the number of changes in $S$ per update) and “update time” (the time it takes to handle an update). The ultimate goal in this line of research is to obtain a dynamic $O(1)$ approximation algorithm with $\tilde{O}(1)$ recourse and $\tilde{O}(k)$ update time. Dynamic $k-\mathbf{median}$ is a canonical example of a class of problems known as dynamic $k-\mathbf{clustering}$, that has received significant attention in recent years [Fichtenberger et al, SODA'21], [Bateni et al, SODA'23], [Lacki et al, SODA'24]. To the best of our knowledge, however, all these previous papers either attempt to minimize the algorithm's recourse while ignoring its update time, or minimize the algorithm's update time while ignoring its recourse. For dynamic $k-\mathbf{median}$ in particular, the state-of-the-art results get $\tilde{O}(k^{2})$ update time and $O(k)$ recourse [Cohen-Addad et al, ICML'19], [Henzinger and Kale, ESA'20], [Bhattacharya et al, NeurIPS'23]. But, this recourse bound of $O(k)$ can be trivially obtained by recomputing an optimal solution from scratch after every update, provided we ignore the update time. In addition, the update time of $\tilde{O}(k^{2})$ is polynomially far away from the desired bound of $\tilde{O}(k)$. We come arbitrarily close to resolving the main open question on this topic, with the following results. (I) We develop a new framework of randomized local search that is suitable for adaptation in a dynamic setting. For every $\epsilon > 0$, this gives us a dynamic $k-\mathbf{median}$ algorithm with $O(k^{\epsilon})$ approximation ratio, $\tilde{O}(k^{\epsilon})$ recourse and $\tilde{O}(k^{1+\epsilon})$ update time. This framework also generalizes to dynamic $k-\mathbf{clustering}$ with $\ell^{p}$ -norm objectives. As a corollary, we obtain similar bounds for the dynamic $k-\mathbf{means}$ problem, and a new trade-off between approximation ratio, recourse and update time for the dynamic $k-\mathbf{center}$ problem. (II) If it suffices to maintain only an estimate of the value of the optimal $k-\mathbf{median}$ objective, then we obtain a $O(1)$ approximation algorithm with $\tilde{O}(k)$ update time. We achieve this result via adapting the Lagrangian Relaxation framework of [Jain and Vazirani, JACM'01], and a facility location algorithm of [Mettu and Plaxton, FOCS'00] in the dynamic setting.
BibTeX
@inproceedings{bhattacharya2024fully,
  author = {Sayan Bhattacharya and Martín Costa and Naveen Garg and Silvio Lattanzi and Nikos Parotsidis},
  title = {{Fully Dynamic k-Clustering with Fast Update Time and Small Recourse}},
  booktitle = {FOCS},
  year = {2024},
  url = {https://openreview.net/forum?id=jGJ5JoK0KS},
}
Figure