A Nearly Optimal Size Coreset Algorithm with Nearly Linear Time

Yichuan Deng, Zhao Song, Yitan Wang, Yuanyuan YangarXiv 2022

Introduction

In the era of Big Data, running complex machine learning algorithms on massive datasets is often computationally prohibitive. Coresets have emerged as a powerful solution: they are small, weighted summaries of the original data that preserve its geometric properties. By finding optimal clusters for a coreset, one can obtain a solution that is nearly as good as one derived from the entire dataset, but at a fraction of the computational cost.

While the theory behind coreset size has matured significantly, the time required to construct them has remained a bottleneck. Traditional high-quality algorithms typically scale with $O(ndk)$, where $n$ is the number of points, $d$ is the dimension, and $k$ is the number of clusters. This paper introduces a breakthrough algorithm that reduces this complexity to a "nearly linear" running time of $\tilde{O}(nd + nk)$, effectively decoupling the dimensionality from the number of clusters in the main computational bottleneck.

The $(k, z)$-Clustering Problem

The paper focuses on the $(k, z)$-clustering problem, a general framework that encompasses popular objectives like $k$-median ($z=1$) and $k$-means ($z=2$). The goal is to find a set of $k$ centers that minimize the sum of the $z$-th powers of the distances from each point to its nearest center.

Constructing a coreset for this problem usually involves calculating sensitivity-based sampling scores. Historically, calculating these scores required an initial "rough" clustering, which was the source of the $O(ndk)$ complexity. This paper asks whether it is possible to build these coresets in time essentially linear relative to the input size without sacrificing the optimality of the coreset size.

Methodology

The authors propose a two-pronged approach to break the $O(ndk)$ barrier:

  1. Sketching-based Distance Estimation: Instead of calculating exact distances in high-dimensional space, the algorithm employs the Johnson-Lindenstrauss (JL) transform. By projecting points into a lower-dimensional "sketch" space, distances can be estimated much faster while remaining within a $(1 \pm \epsilon)$ factor of the original distances.
  2. Faster Center Set Construction: The authors improved the classic Mettu-Plaxton algorithm for initial clustering. By integrating their sketching data structure, they reduced its complexity from $O(ndk)$ to $\tilde{O}(nd + nk)$.
  3. Sensitivity-based Sampling: A new weighting score was designed using these sketched distances. This allows the algorithm to sample the original dataset to form the coreset without ever performing a full $O(ndk)$ distance matrix calculation.

Key Results and Comparison

The primary contribution of this work is the achievement of a runtime of $\tilde{O}(nd + nk)$. As shown in the comparison table below, this is a substantial improvement over previous state-of-the-art methods, particularly for high-dimensional datasets where $k$ is large.

Comparison of coreset size and construction time for various clustering objectives across literature.

Importantly, this speedup does not come at the cost of coreset quality. The size of the generated coreset remains $\epsilon^{-\Theta(z)} \cdot \tilde{O}(k)$, matching the best known results in the field. Given that $\Omega(nd)$ is a trivial lower bound for reading the data, this algorithm is considered "nearly optimal" in terms of time complexity.

Conclusion and Future Directions

This research provides a robust tool for various clustering objectives by making coreset construction feasible for much larger datasets than previously possible. While the $\tilde{O}(nd + nk)$ runtime is a major leap forward, future work may investigate if the $nk$ term can be further reduced or if similar sketching-based approaches can be adapted for online and streaming data environments. Additionally, while the algorithm is theoretically faster, the authors note that the implementation of randomized structures requires careful consideration of computational energy footprints in large-scale machine learning pipelines.

Summary updated

BibTeX
@misc{deng2022nearly,
  author = {Yichuan Deng and Zhao Song and Yitan Wang and Yuanyuan Yang},
  title = {{A Nearly Optimal Size Coreset Algorithm with Nearly Linear Time}},
  year = {2022},
  eprint = {2210.08361},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.08361},
}
Figure