Perfect Sampling in Turnstile Streams Beyond Small Moments
Abstract
Given a vector induced by a turnstile stream , a non-negative function , a perfect -sampler outputs an index with probability . Jayaram and Woodruff (FOCS 2018) introduced a perfect -sampler, where , for . In this paper, we solve this problem for by a sampling-and-rejection method. Our algorithm runs in bits of space, which is tight up to polylogarithmic factors in . Our algorithm also provides a -approximation to the sampled item with high probability using an additional bits of space. Interestingly, we show our techniques can be generalized to perfect polynomial samplers on turnstile streams, which is a class of functions that is not scale-invariant, in contrast to the existing perfect samplers. We also achieve perfect samplers for the logarithmic function and the cap function . Finally, we give an application of our results to the problem of norm/moment estimation for a subset of coordinates of a vector, revealed only after the data stream is processed, e.g., when the set represents a range query, or the set represents a collection of entities who wish for their information to be expunged from the dataset.
Cite
@article{arxiv.2504.07237,
title = {Perfect Sampling in Turnstile Streams Beyond Small Moments},
author = {David P. Woodruff and Shenghao Xie and Samson Zhou},
journal= {arXiv preprint arXiv:2504.07237},
year = {2025}
}
Comments
To appear in PODS 2025