English

Space-Optimal Profile Estimation in Data Streams with Applications to Symmetric Functions

Data Structures and Algorithms 2023-11-30 v1

Abstract

We revisit the problem of estimating the profile (also known as the rarity) in the data stream model. Given a sequence of mm elements from a universe of size nn, its profile is a vector ϕ\phi whose ii-th entry ϕi\phi_i represents the number of distinct elements that appear in the stream exactly ii times. A classic paper by Datar and Muthukrishan from 2002 gave an algorithm which estimates any entry ϕi\phi_i up to an additive error of ±ϵD\pm \epsilon D using O(1/ϵ2(logn+logm))O(1/\epsilon^2 (\log n + \log m)) bits of space, where DD 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 ϕ\phi up to small overall error. We give an algorithm which, with constant probability, produces an estimated profile ϕ^\hat\phi with the following guarantees in terms of space and estimation error: - For any constant τ\tau, with O(1/ϵ2+logn)O(1 / \epsilon^2 + \log n) bits of space, i=1τϕiϕ^iϵD\sum_{i=1}^\tau |\phi_i - \hat\phi_i| \leq \epsilon D. - With O(1/ϵ2log(1/ϵ)+logn+loglogm)O(1/ \epsilon^2\log (1/\epsilon) + \log n + \log \log m) bits of space, i=1mϕiϕ^iϵm\sum_{i=1}^m |\phi_i - \hat\phi_i| \leq \epsilon m. In addition to bounding the error across multiple coordinates, our space bounds separate the terms that depend on 1/ϵ1/\epsilon and those that depend on nn and mm. We prove matching lower bounds on space in both regimes. Application of our profile estimation algorithm gives estimates within error ±ϵD\pm \epsilon D of several symmetric functions of frequencies in O(1/ϵ2+logn)O(1/\epsilon^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.

Keywords

Cite

@article{arxiv.2311.17868,
  title  = {Space-Optimal Profile Estimation in Data Streams with Applications to Symmetric Functions},
  author = {Justin Y. Chen and Piotr Indyk and David P. Woodruff},
  journal= {arXiv preprint arXiv:2311.17868},
  year   = {2023}
}

Comments

To appear in ITCS 2024

R2 v1 2026-06-28T13:35:46.694Z