Introduction
In traditional online algorithms, decisions are often irrevocable. When a data point arrives, it must be assigned to a cluster immediately, and that assignment can never be changed. However, online clustering is notoriously difficult under these constraints; previous research has shown that any algorithm making strictly irrevocable choices will eventually perform poorly compared to an "offline" optimum that sees all data at once.
Yet, in many real-world systems—such as load balancers or machine learning feature pipelines—changing a decision (re-clustering) isn't impossible, just expensive. For example, moving a task to a different server or updating a feature ID requires computational overhead. This paper introduces the concept of consistent $k$-clustering, a framework for online clustering where the algorithm can occasionally change its previous decisions at a cost. The central question is: How few times can we change our cluster centers while still maintaining a high-quality (constant-factor) approximation of the optimal clustering?
The authors prove that while $\Omega(k \log n)$ changes are necessary to maintain a good solution, their proposed algorithm requires only $O(k^2 \log^4 n)$ reclusterings—an exponential improvement over the naive approach of reclustering at every time step.
The Consistent Clustering Framework
The authors formalize the $(\alpha, \beta)$-consistent clustering problem, where $\alpha$ is the approximation ratio (solution quality) and $\beta$ is the number of times the set of cluster centers changes (stability).
Their primary contribution is an algorithm based on the Meyerson Sketch, originally designed for online facility location. The key steps include:
- Phase-based Estimation: The algorithm divides time into phases based on the estimated optimal cost. When the cost doubles, a new phase begins, and the algorithm "reboots" its sketch.
- Meyerson Sketching: For each arriving point, the algorithm adds it to a set of potential centers with a probability proportional to its distance from existing centers. This effectively reduces $n$ points down to a much smaller set of $O(k \log^2 n)$ candidate centers.
- Weighted Reclustering: Instead of reclustering every time a point arrives, the algorithm maintains weights for each center in the sketch (representing how many points are assigned to it). It only triggers a full reclustering if a new point is added to the sketch, the weight of an existing sketch point doubles, or the overall cost of the current solution exceeds the estimated optimum by a certain factor.
This approach allows the algorithm to "lazily" update its centers, only performing heavy computation when the current solution significantly degrades.
Empirical Evaluation and Insights
The authors evaluated their approach on three diverse datasets from the UCI Machine Learning Repository: SKINTYPE (245,057 points, 4D), SHUTTLE (58,000 points, 9D), and COVERTYPE (581,012 points, 54D). They tested these across various values of $k$ (10, 50, and 100) to ensure consistency across different scales and complexities.
The "Stair-Step" Quality Pattern
A key insight from the experiments is the "stair-step" behavior in solution quality. As new points arrive, the approximation ratio slowly drifts upward (degrades) until a reclustering event is triggered. At that point, the quality "snaps" back down toward an approximation ratio of 1.
Despite reclustering very rarely, the algorithm maintains an approximation ratio typically below 4, which is highly competitive for online settings.
Stability in Practice
While the theoretical upper bound of $O(k^2 \log^4 n)$ reclusterings is a significant achievement, the authors found it to be quite pessimistic in practice. In real-world datasets, the number of reclusterings grows much more slowly, roughly following $O(\log n)$. The rate of reclustering (the fraction of time steps where a change occurs) tends toward zero as the dataset size grows.
Limitations and Future Directions
While this work establishes a strong foundation for consistent clustering, several avenues for future research remain:
- Theoretical Gap: There is still a gap between the $\Omega(k \log n)$ lower bound and the $O(k^2 \log^4 n)$ upper bound. Closing this gap remains an open problem.
- Implementation Simplification: To improve performance in experiments, the authors used a single Meyerson sketch rather than the $O(\log n)$ parallel sketches required by the theory for high-probability guarantees. While it worked well empirically, it can lead to occasional fluctuations in solution quality.
- Broader Applications: The authors suggest that this "consistency" framework could be applied to other online problems beyond clustering, such as online matching or maintaining the densest subgraph in a streaming setting.
Summary updated