Polylogarithmic Sketches for Clustering

Moses Charikar, Erik WaingartenarXiv 2022 · DOI

Introduction

Clustering is a cornerstone of modern data science, yet it faces significant scalability hurdles in the era of "big data." When datasets comprise millions of points ($n$) across thousands of dimensions ($d$), even compressed representations can become prohibitively expensive to store and process. Traditional approaches to this "double-scale" problem—where both $n$ and $d$ are large—often fail to address both dimensions simultaneously. While coresets effectively reduce the number of points, they typically retain the full dimensionality of the data. Conversely, dimensionality reduction techniques like the Johnson-Lindenstrauss transform are highly effective for Euclidean distances ($\ell_2$) but do not generalize to other critical metrics like the Manhattan distance ($\ell_1$).

This paper presents a breakthrough by introducing the first polylogarithmic sketches for clustering in high-dimensional $\ell_p$ spaces (for $p \in [1, 2]$). By combining coreset theory with a novel "sketching the sketches" framework, the authors demonstrate how to estimate optimal clustering costs using space that scales only with the logarithm of $n$ and $d$.

The Problem: The Dimensionality Bottleneck

The primary challenge addressed is the estimation of the optimal clustering cost—specifically for $k$-median and $k$-means—when the data is too large to fit in memory. In high-dimensional settings, the linear dependence on $d$ in existing coreset constructions becomes a bottleneck. For non-Euclidean metrics, there is no simple projection that preserves distances as efficiently as the JL transform does for $\ell_2$. The authors seek a solution that provides a $(1+\epsilon)$-approximation of the clustering cost while maintaining a space complexity of $poly(\log(nd), k, 1/\epsilon)$.

Methodology: Sketching the Sketches

The authors achieve their results through a sophisticated algorithmic pipeline that merges coreset construction with randomized sketching:

  1. Coordinate Additivity: The authors leverage the fact that in $\ell_p^p$ spaces, the clustering cost is additive across coordinates. This allows the high-dimensional problem to be decomposed into $d$ independent one-dimensional optimization problems.
  2. Importance Sampling via $\ell_p$-Sampling: To avoid the linear dependence on $d$, the algorithm does not track every coordinate. Instead, it employs $\ell_p$-sampling to identify "important" coordinates—those that contribute most significantly to the total cost.
  3. Compressed Storage: The identified coordinate-wise sketches are stored using a Count-Min Sketch structure. This "sketch of a sketch" allows for the recovery of the total cost approximation without ever explicitly reconstructing the full-dimensional vectors.
  4. Public Coins and Linearity: The resulting sketch is linear, making it highly suitable for distributed environments and insertion-only data streams. By using "public coins" (shared randomness), multiple nodes can compute sketches independently that remain compatible when merged.

Theoretical Insights

A key conceptual contribution of the paper is the distinction between cost estimation and solution recovery. The authors prove that it is possible to accurately estimate the value of the optimal clustering cost even when the space is too constrained to identify the actual cluster centers or the specific partition of points.

Furthermore, the paper highlights a fundamental structural difference between medians (where centers can be any point in the space) and medoids (where centers must be points from the dataset). The authors establish a lower bound showing that while median costs can be sketched in polylogarithmic space, medoid costs require space that scales polynomially with $n$ in a single-pass streaming setting.

Key Results and Complexity

The proposed algorithm achieves a space complexity of $poly(\log(nd), k, 1/\epsilon)$ bits, a significant improvement over the previous $O(d \cdot poly(\log n))$ standard.

  • Approximation: It provides a $(1+\epsilon)$-approximation of the optimal clustering cost with a probability of at least 0.9.
  • Metric Support: The framework is robust for all $\ell_p$ spaces where $p \in [1, 2]$.
  • Efficiency: The linearity of the sketch ensures it is well-suited for streaming and distributed architectures.

Limitations and Future Work

While the paper marks a significant advancement, several avenues for future research remain:

  • The $p > 2$ Barrier: The current reliance on $p$-stable distributions limits the approach to $p \leq 2$. Extending these results to metrics like $\ell_\infty$ remains an open problem.
  • Dynamic Streams: The current framework is "insertion-only" and does not support deletions (the turnstile model).
  • Query Time: Although the space complexity is polylogarithmic, the time required to extract the final estimate from the sketch can scale exponentially with the number of clusters $k$. Improving query efficiency is a priority for practical implementations.

Conclusion

By breaking the linear dependence on dimensionality, this work provides a theoretical foundation for analyzing massive, high-dimensional datasets that were previously computationally intractable. The "sketching the sketches" approach offers a powerful new tool for the randomized algorithms toolkit, particularly for problems where coordinate-wise additivity can be exploited.

Summary updated

BibTeX
@misc{charikar2022polylogarithmic,
  author = {Moses Charikar and Erik Waingarten},
  title = {{Polylogarithmic Sketches for Clustering}},
  year = {2022},
  eprint = {2204.12358},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.12358},
}
Figure