Skip to main content
QUICK REVIEW

[Paper Review] Space-Optimal Profile Estimation in Data Streams with Applications to Symmetric Functions

Justin Y. Chen, Piotr Indyk|arXiv (Cornell University)|Nov 29, 2023
Machine Learning and AlgorithmsComputer Science2 citations
TL;DR

This paper presents a space-optimal streaming algorithm for estimating the profile of a data stream—specifically, the number of elements appearing exactly i times—simultaneously for multiple frequencies. It achieves optimal space complexity: O(1/ǫ² + log n) bits for L1 error ≤ ǫD over the first τ entries, and O(1/ǫ² log(1/ǫ) + log n + log log m) bits for total L1 error ≤ ǫm over all frequencies, with matching lower bounds proving optimality.

ABSTRACT

We revisit the problem of estimating the profile (also known as the rarity) in the data stream model. Given a sequence of $m$ elements from a universe of size $n$, its profile is a vector $ϕ$ whose $i$-th entry $ϕ_i$ represents the number of distinct elements that appear in the stream exactly $i$ times. A classic paper by Datar and Muthukrishan from 2002 gave an algorithm which estimates any entry $ϕ_i$ up to an additive error of $\pm εD$ using $O(1/ε^2 (\log n + \log m))$ bits of space, where $D$ is the number of distinct elements in the stream. In this paper, we considerably improve on this result by designing an algorithm which simultaneously estimates many coordinates of the profile vector $ϕ$ up to small overall error. We give an algorithm which, with constant probability, produces an estimated profile $\hatϕ$ with the following guarantees in terms of space and estimation error: - For any constant $τ$, with $O(1 / ε^2 + \log n)$ bits of space, $\sum_{i=1}^τ|ϕ_i - \hatϕ_i| \leq εD$. - With $O(1/ ε^2\log (1/ε) + \log n + \log \log m)$ bits of space, $\sum_{i=1}^m |ϕ_i - \hatϕ_i| \leq εm$. In addition to bounding the error across multiple coordinates, our space bounds separate the terms that depend on $1/ε$ and those that depend on $n$ and $m$. We prove matching lower bounds on space in both regimes. Application of our profile estimation algorithm gives estimates within error $\pm εD$ of several symmetric functions of frequencies in $O(1/ε^2 + \log n)$ bits. This generalizes space-optimal algorithms for the distinct elements problems to other problems including estimating the Huber and Tukey losses as well as frequency cap statistics.

Motivation & Objective

  • To design a streaming algorithm that estimates the profile vector φ (frequency of frequencies) with minimal space while maintaining small L1 error across multiple coordinates.
  • To generalize space-optimal estimation of symmetric functions such as distinct elements, Huber loss, and frequency caps by leveraging profile estimation.
  • To separate the space dependence on 1/ǫ, n, and m, enabling tighter and more modular space bounds.
  • To prove matching lower bounds for both error regimes, establishing the optimality of the proposed algorithm.
  • To improve upon prior work by reducing space complexity for estimating symmetric functions, especially when accounting for randomness and hash function storage.

Proposed method

  • Uses a randomized reduction from the Indexing (IND) problem to establish space lower bounds, simulating Hamming distance estimation via profile estimation.
  • Employs a layered sampling strategy over geometric frequency scales (buckets) to estimate φi across different frequency ranges efficiently.
  • Applies a public-coin randomized reduction to map the IND problem to profile estimation, using shared randomness to simulate communication complexity.
  • Constructs a stream where the frequency of elements corresponds to the Hamming distance between two strings, enabling φ1 to estimate ∆(w,z).
  • Uses a multi-scale approach with frequency buckets Bj = [2^{j-1}+1, 2^j], ensuring that for a constant fraction of buckets, estimation error per coordinate is bounded.
  • Relies on concentration inequalities and error propagation analysis to bound the L1 error across all coordinates, ensuring overall error ≤ ǫD or ǫm.

Experimental results

Research questions

  • RQ1Can we estimate multiple coordinates of the profile vector φ simultaneously with small total L1 error using less space than estimating each coordinate independently?
  • RQ2What is the optimal space complexity for estimating the profile vector φ with L1 error ≤ ǫD over the first τ entries?
  • RQ3What is the optimal space complexity for estimating the full profile vector φ with L1 error ≤ ǫm?
  • RQ4Can we separate the space dependence on 1/ǫ, n, and m in profile estimation algorithms?
  • RQ5Are the proposed space bounds tight, and can we prove matching lower bounds for both error regimes?

Key findings

  • The algorithm achieves O(1/ǫ² + log n) bits of space for L1 error ≤ ǫD over the first τ entries, with constant probability.
  • For full profile estimation with total L1 error ≤ ǫm, the algorithm uses O(1/ǫ² log(1/ǫ) + log n + log log m) bits of space, matching the lower bound.
  • The paper proves matching Ω(1/ǫ²) space lower bounds for estimating φ1 up to additive error ǫD, establishing optimality.
  • The algorithm improves upon prior work by accounting for the space cost of randomness and hash functions, leading to tighter bounds for symmetric function estimation.
  • The method enables space-optimal estimation of symmetric functions such as Huber loss, Tukey loss, and frequency caps using only O(1/ǫ² + log n) bits.
  • The analysis shows that for at least 9/10 of the frequency buckets, the L1 error per bucket is bounded by O(γ/ǫ), enabling accurate estimation of individual φi values with high probability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.