paper

Universal Perfect Samplers for Incremental Streams

arXiv:2407.04931

Abstract

If , the -moment of a vector is and the -sampling problem is to select an index according to its contribution to the -moment, i.e., such that . Approximate -samplers may introduce multiplicative and/or additive errors to this probability, and some have a non-trivial probability of failure. In this paper we focus on the exact -sampling problem, where is selected from the class of Laplace exponents of non-negative, one-dimensional Lévy processes, which includes several well studied classes such as th moments , , logarithms , Cohen and Geri's soft concave sublinear functions, which are used to approximate concave sublinear functions, including cap statistics. We develop -samplers for a vector that is presented as an incremental stream of positive updates. In particular: * For any , we give a very simple -sampler that uses 2 words of memory and stores at all times a , such that is exactly . * We give a ``universal'' -sampler that uses words of memory w.h.p., and given any at query time, produces an exact -sample. With an overhead of a factor of , both samplers can be used to -sample a sequence of indices with or without replacement. Our sampling framework is simple and versatile, and can easily be generalized to sampling from more complex objects like graphs and hypergraphs.

Universal Perfect Samplers for Incremental Streams · wovepaper