An Empirical Evaluation of k-Means Coresets

Chris Schwiegelshohn, Omar Ali Sheikh-OmararXiv 2022 · DOI

Introduction

In the era of "big data," the computational cost of running complex algorithms on billions of points is often prohibitive. Coresets offer a promising solution: they compress a massive dataset $A$ into a tiny, weighted subset $\Omega$ such that the cost of any clustering query on the subset is nearly identical to the cost on the original data. While the theoretical foundations of $k$-means coresets are well-established, the field has lacked a systematic empirical comparison. This paper provides the first comprehensive evaluation of $k$-means coresets, revealing that standard evaluation metrics are often misleading and introducing a more rigorous procedure for assessing summary quality.

The Coreset Evaluation Problem

Most practitioners evaluate coresets by running an optimizer on the summary and checking if the resulting cost is low. The authors argue this approach is fundamentally flawed because it conflates the quality of the summary with the quality of the optimizer. A coreset might yield a great "optimal" clustering but fail miserably at approximating the cost of other potential solutions. This is particularly dangerous for "composable" coresets used in parallel computing, where a local optimum might not be the global optimum.

Furthermore, calculating the true "distortion"—the worst-case error across all possible queries—is co-NP hard. To address this, the authors developed a new evaluation procedure. Instead of looking for the best clustering, they use $k$-means++ to actively search for "meaningful" candidate solutions that result in the maximal distortion. This provides a much tighter lower bound on the true error of the coreset than traditional methods.

Experimental Setup

Algorithms Evaluated

The study evaluates five prominent coreset algorithms representing different theoretical approaches:

  1. StreamKM++: A popular streaming algorithm based on $k$-means++ seeding.
  2. BICO: A fast, tree-based algorithm that scales well but relies on "movement-based" analysis.
  3. Ray Maker: A method that projects points onto random rays.
  4. Sensitivity Sampling: A technique that samples points based on their "importance" to the total clustering cost.
  5. Group Sampling: A complex sampling scheme with state-of-the-art theoretical bounds.

Datasets and Benchmarks

The authors utilized a mix of high-dimensional real-world datasets and a novel synthetic benchmark. The real-world datasets, summarized in the table below, range from low-dimensional image data to extremely high-dimensional text features.

Summary of the real-world datasets used in the empirical evaluation, showing the scale and dimensionality of the test cases.

In addition to these, the authors introduced a new synthetic dataset generator using Kronecker products. This benchmark is specifically designed to contain many dissimilar, low-cost clusterings. This "traps" coreset algorithms; if a summary misses even one of these structures, its distortion spikes, making it an ideal "stress test" for coreset quality.

Key Insights and Results

Sampling vs. Movement-Based Methods

The evaluation reveals that algorithms based on Importance Sampling (Sensitivity and Group Sampling) are significantly more robust than "movement-based" ones (BICO, Ray Maker), especially as dimensionality increases. In high-dimensional datasets like Caltech, movement-based methods showed distortion factors as high as 5.0 or 7.0, while Sensitivity Sampling consistently stayed near the ideal 1.0.

The PCA Requirement

For movement-based algorithms, Principal Component Analysis (PCA) is not just a luxury—it is a requirement. Without denoising the data via PCA, these algorithms produce summaries with high distortion in high-dimensional spaces. This highlights a significant practical limitation of these methods compared to sampling-based approaches.

Performance Surprises

  • Sensitivity Sampling is the Champion: Despite Group Sampling having theoretically "better" bounds in recent literature, Sensitivity Sampling consistently provided the lowest distortion across nearly all tests.
  • StreamKM++ Robustness: While its theoretical guarantees are weaker than sampling methods, StreamKM++ performed remarkably well in practice, sitting comfortably between the sampling methods and the movement-based ones.
  • The "L-Shaped" Trap: On many real-world datasets, the clustering cost drops so sharply as $k$ increases that almost any coreset looks "good" if you only measure the final cost. This often masks poor summary quality, reinforcing the need for the authors' new distortion-based evaluation metric.

Conclusion and Future Work

The study exposes a significant gap between theory and practice. StreamKM++ performs much better than current mathematical proofs suggest, indicating that a tighter theoretical analysis is possible. Conversely, while Sensitivity Sampling is the empirical winner, its current provable coreset size bounds are worse than those for Group Sampling. Future research is needed to reconcile these observations, potentially exploring different weighting schemes for StreamKM++ centers or refining the bounds for Sensitivity Sampling to match its observed excellence.

Summary updated

BibTeX
@misc{schwiegelshohn2022empirical,
  author = {Chris Schwiegelshohn and Omar Ali Sheikh-Omar},
  title = {{An Empirical Evaluation of k-Means Coresets}},
  year = {2022},
  eprint = {2207.00966},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2207.00966},
}
Figure