Differentially Private Clustering in Data Streams

Alessandro Epasto, Tamalika Mukherjee, Peilin Zhong

TL;DR

This paper introduces the first differentially private (DP) streaming algorithms for $k$-means and $k$-median clustering that run in sublinear space relative to the stream length $T$. Crucially, the approach provides rigorous privacy guarantees in both the one-shot setting (releasing centers at the end of the stream) and the harder continual release setting (releasing updated centers at every timestep), incurring only poly-logarithmic additive error in $T$.

What Problem Does This Paper Address?

Clustering algorithms like $k$-means and $k$-median are core tools for unsupervised learning, but real-world data frequently arrives as an ongoing, high-volume stream containing sensitive personal information (e.g., location traces or browsing histories).

While differentially private clustering has been extensively analyzed for offline batch settings, existing approaches fall short in data streams:

  • Offline DP algorithms assume the entire dataset fits in memory at once.
  • Simple streaming baselines—such as reservoir sampling $\tilde{O}(k)$ points and clustering them at the end—suffer from massive additive error on the order of $O(\sqrt{T})$ in the worst case.

The authors tackle the challenge of computing an $\varepsilon$-differentially private clustering in real time using memory that scales sublinearly with stream size $T$ (specifically $\tilde{O}(k)$ space), while achieving low additive and multiplicative approximation error.

Methods

The paper decomposes private streaming clustering into a two-step framework: constructing a private weighted coreset (a compact summary of candidate centers and noisy weights) in an online fashion, followed by running an offline, non-private clustering algorithm on that coreset via post-processing (which preserves DP for free).

The core technical pipeline involves:

  • Randomly Shifted Quadtrees: The algorithm builds $\log \Lambda$ parallel quadtrees (where $\Lambda$ bounds the space diameter) to embed input points into a Hierarchically Separated Tree (HST) metric across multiple geometric grid scales.
  • Hashed Heavy Hitters: For each quadtree level, the goal is to discover the heaviest $O(k)$ cells. Cells are hashed into $O(k)$ substreams to prevent collisions, and an online continual-release DP heavy hitter subroutine identifies dominant cells without leaking individual points.
  • Pruning via Binary Mechanism: To avoid storing a ballooning number of false-positive candidate centers, cells with noisy counts below a threshold are pruned. Bucket sizes and center weights are tracked continually using instantiations of the Binary Mechanism (tree-based counter aggregation), keeping noise down to $O(\text{poly}(\log T))$.

Datasets

Not discussed in the paper. (The authors note in the introduction that theoretical results are complemented by empirical analysis on real data, but the experimental evaluation and specific dataset details are deferred to the supplementary materials in this workshop version.)

Key Insights and Ideas

  • Sub-sampling is insufficient: Naively taking a random sample of size $\tilde{O}(k)$ over the stream gives poor representation for small but distinct clusters, blowing up additive error to $O(\sqrt{T})$. The quadtree-plus-heavy-hitter framework actively hunts for dense clusters at multiple spatial resolutions, reducing additive error dependence on stream length to $O(\text{poly}(\log T))$.
  • Continual release heavy hitters enable one-shot clustering: Even if the goal is only to output clusters once at the very end of the stream (one-shot), the algorithm must still identify candidate centers on the fly to assign incoming points to them. Thus, an online continual release heavy hitter primitive is indispensable for both settings.
  • Space efficiency matches non-private streaming: The total space required is $\tilde{O}(k \log^2(\Lambda))$ (ignoring poly-logarithmic factors in $T$ and $k$), matching the space bounds of classic non-private streaming algorithms.

Key Results

  • Continual Release Guarantees (Theorem 1.1): Achieves an $\varepsilon$-DP clustering output at every timestep $t \in [T]$ with:
  • Multiplicative error: $\Theta(\rho) \cdot d^{O(1)}$ (where $\rho$ is the approximation ratio of an offline non-DP algorithm and $d$ is the dimension).
  • Additive error: $\tilde{O}\left(\frac{k \rho \Lambda^2}{\varepsilon} \cdot (d \log T)^{O(1)}\right)$.
  • Space: $O(k \log^2(\Lambda) \log(k) \text{poly}(\log(T \Lambda k)))$.
  • One-Shot Guarantees (Theorem 1.2): Achieves the same multiplicative error, additive error, and space efficiency when releasing the clustering solely at the end of the stream.
  • Bicriteria DP Coreset (Theorem 1.3): The intermediate coreset contains at most $O(k \log(k) \log^2(\Lambda) \log T)$ candidate centers while satisfying $3\varepsilon$-differential privacy via composition.

Limitations and Future Work

  • Dimensionality dependence: The multiplicative approximation factor carries a $d^{O(1)}$ dependence, inherited from standard quadtree/HST embeddings in Euclidean space, which can become loose in high dimensions.
  • Bounded diameter requirement: The algorithm requires an a priori known upper bound $\Lambda$ on the diameter of the input space, which may not always be readily available in open-ended streaming scenarios.
  • Constant factors: The theoretical bounds involve several poly-logarithmic factors ($\log^2 \Lambda$, $\log k$, $\log T$) and composition overheads that could impact empirical constants in small-scale applications.

Summary updated

BibTeX
@inproceedings{epasto2023differentially,
  author = {Alessandro Epasto and Tamalika Mukherjee and Peilin Zhong},
  title = {{Differentially Private Clustering in Data Streams}},
  booktitle = {TAGML @ ICML},
  year = {2023},
  url = {https://openreview.net/forum?id=5yU7rYxm49},
}
Figure