No-substitution k-means Clustering with Adversarial Order

Robi Bhattacharjee, Michal Moshkovitz

TL;DR

This paper tackles the challenge of online $k$-means clustering where data arrives in a worst-case, adversarial order and decisions to select cluster centers are instant and irrevocable. By introducing a new complexity metric called the Online Center measure, the authors design a randomized algorithm that guarantees a solid approximation of the optimal clustering cost. Crucially, they prove that for "natural" data distributions (like Gaussian mixtures), this approach requires only a polylogarithmic number of centers, effectively overcoming traditional lower-bound bottlenecks.

What Problem Does This Paper Address?

Imagine running a clinical trial where patients arrive one by one. For each patient, you must instantly decide whether to include them in a small, representative test group (a cluster center) before seeing the next patient. Once a patient is rejected or accepted, that decision cannot be changed. This is the online no-substitution setting for $k$-means clustering.

The core challenge is the arrival order. If the data points arrive in a random order, existing algorithms perform well. However, if an adversary controls the order, they can feed the algorithm a pathological sequence of points that are exponentially far apart. To avoid an infinite clustering cost, any online algorithm would be forced to accept every single point as a center, resulting in $n$ centers for $n$ points—rendering the clustering useless.

Previous attempts to solve this either assumed a friendly, random order or required the dataset's "aspect ratio" (the ratio of the maximum to minimum distance between points) to be strictly bounded. However, the bounded aspect ratio assumption is too restrictive because it rules out standard data models, such as a mixture of Gaussians. This paper aims to find a realistic middle ground: how can we cluster data that arrives in an arbitrary order without making overly restrictive assumptions about the dataset?

Methods

The authors introduce two key contributions: a new complexity measure and a novel randomized algorithm.

  1. The Online Center Measure ($OC_k(X)$): This new metric quantifies how hard a dataset $X$ is to cluster online. It measures the length of the longest subsequence of points where each new point is significantly farther from all previous points than the optimal clustering diameter of those previous points. Essentially, it counts how many times an adversary can force a "surprise" point on the algorithm.
  2. The Adaptive Merging Algorithm (Algorithm 2): The algorithm processes points one by one. When a new point $x_t$ arrives, it runs a standard offline clustering algorithm on all data seen so far. To ensure the algorithm doesn't get tricked by small, unreliable clusters, it merges all clusters that are close to $x_t$. It then treats the size of this merged cluster as an estimate of the true local data density and accepts $x_t$ as a permanent center with a probability inversely proportional to this size.

Datasets

As a purely theoretical paper, no real-world empirical datasets were used. Instead, the authors evaluated their approach mathematically against synthetic data generated from "natural" mixture distributions, including:

  • Mixtures of $k$ Gaussians
  • Mixtures of $k$ Uniform distributions
  • Mixtures of $k$ Exponential distributions

Key Insights and Ideas

  • Pathology is Isolated: The paper demonstrates that the pathological exponential sequence is the only reason an online algorithm would ever be forced to pick a massive number of centers. If a dataset doesn't contain a long embedded exponential sequence, it is inherently clusterable under adversarial order.
  • Natural Data is Safe from Adversaries: The authors prove that for common distributions like Gaussian mixtures, the longest embedded exponential sequence is remarkably short—bounded by $O(k^2 \log n)$. This means that even if an adversary rearranges Gaussian data in the worst possible order, they cannot completely break the algorithm.
  • Bridging the Order Gap: If a dataset has a small Online Center measure, the number of centers needed under a worst-case adversarial order drops down to nearly the same polylogarithmic amount required under a completely random order.

Key Results

  • Performance Guarantees: For a dataset with complexity $d = OC_k(X)$, the proposed algorithm achieves an $O(\alpha k^3)$-approximation of the optimal $k$-means cost while keeping the expected number of centers bounded to $O(d \cdot k \log(k) \log(n))$.
  • Efficiency on Natural Distributions: When data is sampled from a mixture of $k$ Gaussians, uniforms, or exponentials, the complexity measure drops to $O(k^2 \log n)$. Consequently, the algorithm only selects $\text{poly}(k \log n)$ centers.
  • Tight Lower Bounds: The authors complement their algorithm with a lower bound, proving that any $\alpha$-approximation algorithm must select at least $\Omega\left(\frac{OC_k(X)}{k \log(n\alpha)}\right)$ centers.

The trade-offs between random and worst-case orderings relative to the Online Center (OC) measure are summarized in the paper's table:

Summary of center complexity bounds for constant $k$.

Limitations and Future Work

While the paper provides strong theoretical bounds, a few gaps remain:

  • The Approximation Factor: The algorithm provides a $\text{poly}(k)$-approximation. The authors note that it remains an open question whether this can be optimized to a constant $\Theta(1)$-approximation.
  • The Polylogarithmic Gap: There is still a small polylogarithmic gap between the proven lower bound and the upper bound of the expected number of centers.
  • Eliminating $n$ Entirely: Future work could explore whether the number of centers can be made to depend solely on the Online Center measure $OC_k(X)$, completely removing the $\log(n)$ dependence.

Summary updated

BibTeX
@inproceedings{bhattacharjee2021no,
  author = {Robi Bhattacharjee and Michal Moshkovitz},
  title = {{No-substitution k-means Clustering with Adversarial Order}},
  booktitle = {ALT},
  year = {2021},
  url = {https://openreview.net/forum?id=feODU7K3y8},
}
Figure