Consistent k-Clustering for General Metrics

Hendrik Fichtenberger, Silvio Lattanzi, Ashkan Norouzi-Fard, Ola Svensson

Introduction

In modern data processing, information often arrives as a continuous stream rather than a static dataset. While clustering algorithms like $k$-median are well-understood for fixed data, applying them to streams introduces a significant challenge: consistency. If an algorithm re-calculates cluster centers every time new data arrives, the centers may shift drastically, disrupting downstream applications that rely on stable categories. This paper introduces a breakthrough algorithm that maintains high-quality clustering while minimizing these disruptive shifts.

The Consistency Challenge

The goal of consistent $k$-clustering is to maintain a high-quality approximation of the optimal clustering cost while minimizing the number of center swaps—the total number of times the set of cluster centers is updated. Historically, a gap existed between "offline" algorithms (which know the future and require $O(k)$ swaps) and "online" algorithms, which previously required $O(k^2)$ swaps. This research demonstrates that it is possible to achieve $O(k \cdot \text{polylog}(n, \Delta))$ swaps, effectively matching the performance of offline algorithms without knowing the future stream in advance.

Methodology: Achieving Stability in Flux

The authors achieve their results through a combination of sketching techniques and a novel structural concept called Robust Centers.

1. Sketching and Epochs

To handle massive streams, the algorithm employs a Multi-Meyerson Sketch, compressing $n$ points into a smaller set of $O(k \cdot \text{polylog})$ weighted points. Processing is further stabilized by dividing the stream into epochs. A new epoch—and thus a potential major re-clustering—only begins when the optimal clustering cost increases by a significant factor (e.g., 18x), preventing overreaction to minor data fluctuations.

2. Robust Centers

The core innovation is the concept of Robust Centers. A center is considered robust if it remains a strong representative for its cluster across multiple spatial scales, even as the cluster evolves.

Figure 2: A robust center (red) remains stable relative to the cluster's core and its surrounding points across different radii (blue circles).

By selecting centers that are "good enough" across exponentially growing distances, the algorithm avoids "center drift," where a center slowly migrates as new points are added to the periphery. This multi-scale optimality ensures that small changes in the periphery of a cluster don't force a center to move.

3. LP-Based Swapping and Removal

Within each epoch, the algorithm uses Linear Programming (LP) relaxations to manage the swap budget. It identifies redundant centers that can be safely removed and determines how to incorporate new data points with minimal changes to the existing center set.

Figure 1: Visualization of center selection and swapping logic, showing the identification of redundant centers (marked with an X) to maintain consistency.

Key Insights and Results

  • The "Future" is Overrated: The most surprising insight is that knowing the future doesn't actually help you be more consistent. The authors show that an online algorithm can match the swap-count of an offline one (up to polylog factors).
  • Well-Separated Pairs: The algorithm leverages the idea that if a computed center and an optimal center are very close to each other and far from everything else, they form a "well-separated pair." Identifying these pairs allows the algorithm to safely "lock in" certain centers while focusing its swap budget on more volatile areas of the metric space.
  • Optimal Consistency: The algorithm performs $O(k \cdot \text{polylog}(n, \Delta))$ center swaps over the entire stream while maintaining a constant-factor approximation to the optimal $k$-median cost at every point in time.

Conclusion and Future Work

This work provides a near-optimal theoretical solution to the consistent $k$-median problem. While the current algorithm involves high constant factors that may limit immediate practical deployment, the underlying principles—particularly the "Robust Center" framework—offer a promising path for developing more stable and efficient streaming clustering tools. Future research will likely focus on optimizing these constants and evaluating the approach on real-world high-velocity data streams.

Summary updated

BibTeX
@inproceedings{fichtenberger2021consistent,
  author = {Hendrik Fichtenberger and Silvio Lattanzi and Ashkan Norouzi-Fard and Ola Svensson},
  title = {{Consistent k-Clustering for General Metrics}},
  booktitle = {SODA},
  year = {2021},
  doi = {10.1137/1.9781611976465.158},
}
Figure