k-Means for Streaming and Distributed Big Sparse Data

Artem Barger, Dan Feldman

This paper, published by Artem Barger and Dan Feldman from the University of Haifa, introduces a breakthrough in handling "Big Sparse Data" for clustering. It presents the first streaming algorithm for $k$-means that produces a provable approximation while keeping memory usage independent of both the number of data points ($n$) and their dimensionality ($d$).

TL;DR

The authors develop a "sparse coreset"—a tiny, weighted version of a massive dataset—that allows for accurate $k$-means clustering on high-dimensional sparse data without the memory explosion caused by traditional compression. Their deterministic algorithm enables efficient streaming and distributed processing, outperforming standard sampling methods on real-world datasets like MNIST and NIPS.

What Problem Does This Paper Address?

Clustering via $k$-means is a cornerstone of data science, but it breaks down when faced with "Big Sparse Data." Imagine a matrix of Wikipedia terms: it might have millions of documents ($n$) and hundreds of thousands of unique words ($d$), but each document only contains a few dozen words.

Standard approaches face a "Sparsity Trap":

  1. Dimensionality Reduction: Techniques like PCA or Johnson-Lindenstrauss projections turn sparse vectors (mostly zeros) into dense ones. This often results in a "compressed" dataset that actually requires more memory than the original.
  2. Coresets: Existing "coresets" (small subsets of data that represent the whole) usually have a size that scales with the dimension $d$. When $d$ is in the millions, the coreset is no longer "small."

The authors set out to create a coreset that is truly small, preserves the sparsity of the original points, and has a size that depends only on $k$ (the number of clusters) and the desired error $\epsilon$.

Methods

The core contribution is a deterministic algorithm called $k$-Mean-Coreset.

  • The Sparse Coreset: Unlike randomized sampling, this algorithm identifies a weighted subset of points (or linear combinations of a few points) that approximates the "cost" of the entire dataset for any possible set of $k$ centers.
  • Merge-and-Reduce: To handle streaming data, the authors use a binary tree framework. Data arrives in small chunks; a coreset is computed for each chunk, and these coresets are then merged and reduced again. This keeps the memory footprint logarithmic relative to the number of points seen.
  • Preserving Sparsity: Instead of projecting data into a lower-dimensional subspace, the algorithm uses the Frank-Wolfe optimization method to ensure that the points in the coreset remain sparse linear combinations of the input data.
  • Deterministic Logic: The algorithm finds a specific number of "intermediate" centers ($m$) such that adding more centers doesn't significantly reduce the error. This "leveling off" point allows them to bound the coreset size without needing to know the data's dimension.

Datasets

The authors evaluated their algorithm against uniform and importance sampling on three well-known benchmarks:

  • MNIST: 60,000 handwritten digits ($d=784$).
  • Pendigits: ~11,000 samples of digit trajectories ($d=16$).
  • NIPS Dataset: A very sparse word-count matrix representing 13 years of NIPS proceedings ($n=2,865$ authors, $d=14,036$ words).

Key Insights and Ideas

  • Breaking the Dimension Barrier: This is the first coreset construction where the size is $k^{O(1/\epsilon^2)}$, completely independent of $d$. This is a massive win for "wide" data where features far outnumber samples.
  • The "Coupon Collector" Problem: The authors highlight why randomized sampling (importance sampling) often fails. In datasets with many small, distant clusters, randomized methods might miss an entire cluster unless you take a very large sample. Their deterministic approach ensures these "outlier" clusters are represented.
  • Heuristic Boosting: A practical "aha" moment is that you don't need to solve the $k$-means problem perfectly to build the coreset. You can use a fast heuristic (like Lloyd’s algorithm) to build the coreset, and then run a more intensive search for the optimal centers on the resulting tiny coreset.

Key Results

  • Superior Accuracy: In both offline and streaming tests, the proposed algorithm consistently achieved lower error than uniform or importance sampling for the same "memory budget" (coreset size).
  • Stability: The error distribution (shown in box-plots) for the new algorithm was much tighter than sampling methods, which often had high variance and "failed" on certain runs.
  • Logarithmic Scaling: Experimental results confirmed that memory usage grows only logarithmically with the number of streamed points, making it viable for truly infinite data streams.
  • Communication Efficiency: In distributed settings with $M$ machines, the algorithm reduces communication costs to a factor independent of $d$, which is critical for limited-bandwidth networks.

Limitations and Future Work

  • Computational Complexity: One step in the algorithm (Line 1) is theoretically exponential in $k$. While the authors suggest using heuristics to bypass this in practice, the formal "provable" version might be slow for very large values of $k$.
  • Constant Factors: The $O(1/\epsilon^2)$ exponent in the coreset size can still lead to large coresets if a extremely high precision (very small $\epsilon$) is required.
  • Generalization: The paper focuses on $k$-means (squared Euclidean distance). Future work could involve extending this sparse, dimension-independent approach to other clustering metrics like $k$-median or M-estimators.

Summary updated

BibTeX
@inproceedings{barger2016k,
  author = {Artem Barger and Dan Feldman},
  title = {{k-Means for Streaming and Distributed Big Sparse Data}},
  booktitle = {SDM},
  year = {2016},
  doi = {10.1137/1.9781611974348.39},
}
Figure