
when applied to adaptive thresholding samples. It also provides
justication for heuristic thresholding schemes that do not satisfy
our conditions for unbiased estimation but satisfy an asymptotic
convergence condition which may be easier to verify.
Our contributions to applications exploits our methodological
contributions to develop new or improved sketches and estima-
tors on a range of new and existing problems. For example, we
double the eectiveness of the state-of-the-art in sampling from
sliding windows [
14
] even though we use exactly the same sketch
to construct the sample. We improve merge procedures for distinct
counting sketches, handle budget constraints for samples given
variable length items, and provide a solution to a novel top-k prob-
lem, a more challenging variation of the well-studied heavy hitter
problem, where the top-k items by frequency must be returned
regardless of how small their frequency may be.
1.1 Related work
A long line of work has studied the bottom-k sample [
8
,
12
,
24
,
25
],
showing how it can be used to draw weighted samples while de-
riving good estimators for sums over subpopulations as well as
estimates of their variance. These bottom-k sampling methods can
be considered an adaptive threshold sampling method where the
threshold ensures the sample size is exactly
:
. Extensions [
6
,
9
]
study combining bottom-k samples. Another techniques for e-
ciently drawing xed size : samples is VarOpt sampling [7].
Little work has provided generalizations of the bottom-k thresh-
olding rule while providing a unbiased estimators. One notable
exception is in distinct counting applications using
Uniform(
0
,
1
)
priorities. The Theta sketch [
11
] provides a general 1-goodness
condition. Thresholding rules that satisfy this ensure cardinality
estimates are unbiased. For uniform sampling, a generalized thresh-
olding rule has been used for distributed sampling [33].
In addition to providing an adaptive sampling framework, our
contributions also use it to address novel problems and improve
existing methods. Novel problems include sampling with xed mem-
ory budgets, multi-stratie d sampling, and top-k queries. These
problems are more dicult variations of existing problems. Exam-
ples of existing sketches and sampling methods that are improved
include sampling in sliding windows [
14
] and distinct counting
[
11
,
15
,
29
]. Our applications are provided as examples of our frame-
work’s usefulness. Bottom-k methods have been used in numerous
other applications such as set similarity [
5
], networking [
26
], time-
decayed sampling [10], and distributed sampling [13, 19, 33]
2 SAMPLING DESIGN AND ESTIMATION
We rst review sampling without replacement and the use of xed
thresholds for drawing samples. One key contribution of our pa-
per is under what conditions can a random, adaptive threshold be
treated as if it was a xed threshold.
The notion of weighted or unequal probability sampling is at
the core of many sampling problems. Sampling more informative
items with higher probability leads to lower variance estimates.
Choosing an appropriate measure of informativeness allows for
accurate estimation for problems ranging from simple aggregates
to complex machine learning models [
32
]. Unequal probability
sampling can also arise in other situations, such as in stratied
sampling where strata can have dierent sampling probabilities
or in distributed sampling where nodes may make independent
choices about the sampling rate.
2.1 Poisson sampling with thresholds
The simple sampling scheme where the inclusion decisions for each
item is independent of all others is of particular interest. That is
/
8
⇠ ⌫4A=>D;;8( c
8
) (1)
where
/
8
=
1 if item
G
8
is included in the sample. Such schemes
are called Poisson Sampling designs. This is not to be confused
with Poisson distributed random variables. In this case, the desired
inclusion probability c
8
for each G
8
must be known in advance.
A xe d threshold can be use d to draw such a sample. Associate
an independent auxiliary variable
'
8
for each item along with a
xed threshold
)
8
. The item
G
8
is included if
'
8
< )
8
. If
'
8
is contin-
uous and
8
is its cumulative distribution function (CDF), then the
probability
G
8
is sampled is
? ('
8
< )
8
) =
8
()
8
)
. Choosing a thresh-
old such that
c
8
=
8
()
8
)
yields a sample from the desired sampling
design. We call the variable
'
8
the priority of
G
8
and denote the
inclusion of
G
8
by
/
8
=
1
('
8
< )
8
)
. From this, it is easy to see how
the threshold )
8
can be used to adjust the inclusion probabilities.
2.2 Sampling challenges and estimation
However, unequal probability sampling can lead to challenges
in sampling and estimation. For example, under memory budget
or sample size constraints, Poisson sampling can violate the con-
straints since there is some non-zero probability that all items are
sampled. It is thus natural to consider samplers that draw xed
size samples. The natural extension of Poisson sampling to xed
sizes is Conditional Poisson Sampling (CPS), which is obtained from
a Poisson Sampling design conditional on the sample size being
exactly
:
. The Conditional Poisson Sampling design has the attrac-
tive property of being the maximum entropy sampling procedure
for a set of inclusion probabilities. However, there is no ecient
algorithm known for drawing a CPS sample or for computing the
inclusion probabilities [28].
Estimating quantities of interest can be even more problematic.
A sample is almost useless without good estimators. In une qual
probability sampling designs, an unbiased estimate of the popu-
lation total
(
is given by the Hor vitz-Thompson (HT) estimator,
ˆ
( =
’
8
G
8
/
8
c
8
(HT)
where
/
8
indicates if the item
G
8
is included in the sample and
c
8
= ?(/
8
=
1
)
is the inclusion probability. This also provides
a solution to the subset sum problem [
12
] by zeroing any value
G
8
that is not in the desired subset. The fundamental problem for
Conditional Poisson sampling and other sampling schemes with
dependence between items’ inclusion is that this dependence makes
inclusion probabilities and good estimators dicult to derive.
If the problem of eciently sampling and computing inclusion
probabilities can be overcome, then it is possible to search for an
optimal sampling design given this estimator. When the inclusion
probabilities
c
8
/ G
8
, each term in the HT estimator is constant.
Furthermore, if the sample size is xed at
:
, the HT estimator itself
is constant, and thus has minimal variance. A sample that draws
Session 22: Provenance and Uncertainty
SIGMOD ’22, June 12–17, 2022, Philadelphia, PA, USA
评论