Learning Poisson Binomial Distributions
Constantinos Daskalakis, Ilias Diakonikolas, Rocco A. Servedio
Introduction
We begin by considering a somewhat fanciful scenario: You are the manager of an independent weekly newspaper in a city of people. Each week the -th inhabitant of the city independently picks up a copy of your paper with probability . Of course you do not know the values ; each week you only see the total number of papers that have been picked up. For many reasons (advertising, production, revenue analysis, etc.) you would like to have a detailed “snapshot” of the probability distribution (pdf) describing how many readers you have each week. Is there an efficient algorithm to construct a high-accuracy approximation of the pdf from a number of observations that is independent of the population ? We show that the answer is “yes.”
A Poisson Binomial Distribution of order is the distribution of a sum
where are independent Bernoulli (0/1) random variables. The expectations need not all be the same, and thus these distributions generalize the Binomial distribution and, indeed, comprise a much richer class of distributions. (See Section 1.2 below.) It is believed that Poisson [Poi37] was the first to consider this extension of the Binomial distributionWe thank Yuval Peres and Sam Watson for this information [PW11]. and the distribution is sometimes referred to as “Poisson’s Binomial Distribution” in his honor; we shall simply call these distributions PBDs.
PBDs are one of the most basic classes of discrete distributions; indeed, they are arguably the simplest -parameter probability distribution that has some nontrivial structure. As such they have been intensely studied in probability and statistics (see Section 1.2) and arise in many settings; for example, we note here that tail bounds on PBDs form an important special case of Chernoff/Hoeffding bounds [Che52, Hoe63, DP09]. In application domains, PBDs have many uses in research areas such as survey sampling, case-control studies, and survival analysis, see e.g., [CL97] for a survey of the many uses of these distributions in applications. Given the simplicity and ubiquity of these distributions, it is quite surprising that the problem of density estimation for PBDs (i.e., learning an unknown PBD from independent samples) is not well understood in the statistics or learning theory literature. This is the problem we consider, and essentially settle, in this paper.
Let be an unknown PBD.
[Learning PBDs from constantly many samples] There is an algorithm with the following properties: given and access to independent draws from , the algorithm uses
[Properly learning PBDs from constantly many samples] There is an algorithm with the following properties: given and access to independent draws from , the algorithm uses
We note that, since every sample drawn from is a -bit string, for constant the number of bit-operations performed by our first algorithm is quasilinear in the length of its input. Moreover, the sample complexity of both algorithms is close to optimal, since samples are required even to distinguish the (simpler) Binomial distributions and , which have total variation distance Indeed, in view of this observation, our second algorithm is essentially sample-optimal.
Let be a weighted sum of unknown independent Bernoullis such that there are at most different values among Then there is an algorithm with the following properties: given and access to independent draws from , it uses
To complement Theorem 2, we also show that if there are many distinct weights in the sum, then even for weights with a very simple structure any learning algorithm must use many samples:
2 Related work.
At a high level, there has been a recent surge of interest in the theoretical computer science community on fundamental algorithmic problems involving basic types of probability distributions, see e.g., [KMV10, MV10, BS10, VV11] and other recent papers; our work may be considered as an extension of this theme. More specifically, there is a broad literature in probability theory studying various properties of PBDs; see [Wan93] for an accessible introduction to some of this work. In particular, many results study approximations to the Poisson Binomial distribution via simpler distributions. In a well-known result, Le Cam [Cam60] shows that for any PBD with , it holds that
Our approach, which removes completely from the sample complexity, requires a refined understanding of the structure of the set of all PBDs on variables, in fact one that is more refined than the understanding provided by the aforementioned results (approximating a PBD by a Poisson, Normal, or Binomial distribution). We give an outline of the approach in the next section.
3 Our approach.
The general learning result that we use (Lemma 10) is the following: We show that for any class of target distributions, if has an -cover of size then there is a generic algorithm for learning an unknown distribution from to accuracy that uses samples. Our approach is rather similar to the algorithm of [DL01] for choosing a density estimate (but different in some details); it works by carrying out a tournament that matches every pair of distributions in the cover against each other. Our analysis shows that with high probability some -accurate distribution in the cover will survive the tournament undefeated, and that any undefeated distribution will with high probability be -accurate.
Applying this general result to the -cover of size described above, we obtain a PBD that is -close to the target (this accounts for the increased running time in Part (2) versus Part (1)). We stress that for both the non-proper and proper learning algorithms sketched above, many technical subtleties and challenges arise in implementing the high-level plan given above, requiring a careful and detailed analysis.
We prove Theorem 2 using the general approach of Lemma 10 specialized to weighted sums of independent Bernoullis with constantly many distinct weights. We show how the tournament can be implemented efficiently for the class of weighted sums of independent Bernoullis with constantly many distinct weights, and thus obtain Theorem 2. Finally, the lower bound of Theorem 3 is proved by a direct information-theoretic argument.
4 Preliminaries.
For a distribution supported on we write to denote the value of the probability density function (pdf) at point , and to denote the value of the cumulative density function (cdf) at point . For , we write to denote and to denote the conditional distribution of restricted to Sometimes we write and for a subset , meaning and respectively.
Total Variation Distance.
Recall that the total variation distance between two distributions and over a finite domain is
Covers.
Poisson Binomial Distribution.
A Poisson binomial distribution can be represented uniquely as a vector satisfying . To go from to its corresponding vector, we find a collection of mutually independent Bernoullis such that is distributed according to and . (Such a collection exists by the definition of a Poisson binomial distribution.) Then we set for all . Lemma 1 of [DP13] shows that the resulting vector is unique.
We denote by the distribution of the sum of mutually independent indicators with expectations , for all . Given the above discussion is unique up to permutation of the ’s. We also sometimes write to denote the distribution of Note the difference between , which refers to the distribution of , and , which refers to the underlying collection of mutually independent Bernoulli random variables.
Translated Poisson Distribution.
We will make use of the translated Poisson distribution for approximating the Poisson Binomial distribution. We define the translated Poisson distribution, and state a known result on how well it approximates the Poisson Binomial distribution.
We say that an integer random variable is distributed according to the translated Poisson distribution with parameters and , denoted , iff can be written as
where is a random variable distributed according to , where represents the fractional part of .
The following lemma gives a useful bound on the variation distance between a Poisson Binomial Distribution and a suitable translated Poisson distribution. Note that if the variance of the Poisson Binomial Distribution is large, then the lemma gives a strong bound.
Let be independent random indicators with . Then
where and .
The following bound on the total variation distance between translated Poisson distributions will be useful.
Running Times, and Bit Complexity.
Throughout this paper, we measure the running times of our algorithms in numbers of bit operations. For a positive integer , we denote by its description complexity in binary, namely . Moreover, we represent a positive rational number as , where and are relatively prime positive integers. The description complexity of is defined to be . We will assume that all ’s and ’s input to our algorithms are rational numbers.
In this section, we prove Theorem 1 by providing a sample- and time-efficient algorithm for learning an unknown PBD . We start with an important ingredient in our analysis.
A cover for PBDs. We make use of the following theorem, which provides a cover of the set of all PBDs of order-. The theorem was given implicitly in [DP11] and explicitly as Theorem 1 in [DP13].
For all , there exists an -cover of such that
; and
can be constructed in time linear in its representation size, i.e., .
Moreover, if , then the collection of Bernoulli random variables has one of the following forms, where is a positive integer, for some absolute constant :
Finally, for every for which there is no -neighbor in that is in sparse form, there exists some in -heavy Binomial form such that
We remark that the cover theorem as stated in [DP13] does not include the part of the above statement following “finally.” We provide a proof of this extension in Appendix A.
The Basic Learning Algorithm. The high-level structure of our learning algorithms which give Theorem 1 is provided in Algorithm Learn-PBD of Figure 1. We instantiate this high-level structure, with appropriate technical modifications, in Section 2.4, where we give more detailed descriptions of the non-proper and proper algorithms that give parts (1) and (2) of Theorem 1.
At a high level, the subroutine Learn-Sparse is given sample access to and is designed to find an -accurate hypothesis with probability at least , if the unknown PBD is -close to some sparse form PBD inside the cover . Similarly, Learn-Poisson is designed to find an -accurate hypothesis , if is not -close to a sparse form PBD (in this case, Theorem 4 implies that must be -close to some -heavy Binomial form PBD). Finally, Choose-Hypothesis is designed to choose one of the two hypotheses as being -close to The following subsections specify these subroutines, as well as how the algorithm can be used to establish Theorem 1. We note that Learn-Sparse and Learn-Poisson do not return the distributions and as a list of probabilities for every point in . They return instead a succinct description of these distributions in order to keep the running time of the algorithm logarithmic in . Similarly, Choose-Hypothesis operates with succinct descriptions of these distributions.
Our starting point here is the simple observation that any PBD is a unimodal distribution over the domain . (There is a simple inductive proof of this, or see Section 2 of [KG71].) This enables us to use the algorithm of Birgé [Bir97] for learning unimodal distributions. We recall Birgé’s result, and refer the reader to Appendix B for an explanation of how Theorem 5 as stated below follows from [Bir97].
For all , there is an algorithm that draws
samples from an unknown unimodal distribution over , does
The main result of this subsection is the following:
For all , there is an algorithm Learn-Sparse that draws
samples from a target PBD over , does
The high-level idea of Lemma 3 is quite simple. We truncate of the probability mass from each end of to obtain a conditional distribution ; since is unimodal so is . If is larger than then the algorithm outputs “fail” (and could not have been close to a sparse-form distribution in the cover). Otherwise, we use Birgé’s algorithm to learn the unimodal distribution . A detailed description of the algorithm is given in Figure 2 below.
Proof of Lemma 3: As described in Figure 2, algorithm Learn-Sparse first draws samples from and sorts them to obtain a list of values We claim the following about the values and defined in Step 2 of the algorithm:
With probability at least , we have and .
We only show that with probability at least , since the arguments for , and are identical. Given that each of these conditions is met with probability at least , the union bound establishes our claim.
To show that is satisfied with probability at least we argue as follows: Let . Clearly, while . Given this, if samples are drawn from then the expected number of them that are is at most . It follows then from the Chernoff bound that the probability that more than samples are is at most . Hence except with this failure probability, we have , which implies that . ∎
As specified in Steps 3 and 4, if , where is the constant in the statement of Theorem 4, the algorithm outputs “fail”, returning the trivial hypothesis which puts probability mass on the point . Otherwise, the algorithm runs Birgé’s unimodal distribution learner (Theorem 5) on the conditional distribution , and outputs the result of Birgé’s algorithm. Since is unimodal, it follows that is also unimodal, hence Birgé’s algorithm is appropriate for learning it. The way we apply Birgé’s algorithm to learn given samples from the original distribution is the obvious one: we draw samples from , ignoring all samples that fall outside of , until the right number of samples fall inside , as required by Birgé’s algorithm for learning a distribution of support of size with probability at least . Once we have the right number of samples in , we run Birgé’s algorithm to learn the conditional distribution . Note that the number of samples we need to draw from until the right number of samples fall inside is still , with probability at least . Indeed, since , it follows from the Chernoff bound that with probability at least , if samples are drawn from , at least fall inside .
Analysis: It is easy to see that the sample complexity of our algorithm is as promised. For the running time, notice that, if Birgé’s algorithm is invoked, it will return two lists of numbers through and through , as well as a list of probability masses assigned to each subinterval , , by the hypothesis distribution , where . In linear time, we can compute a list of probabilities , representing the probability assigned by to every point of subinterval , for . So we can represent our output hypothesis via a data structure that maintains pointers, having one pointer per point inside . The pointers map points to probabilities assigned by to these points. Thus turning the output of Birgé’s algorithm into an explicit distribution over incurs linear overhead in our running time, and hence the running time of our algorithm is also as promised. (See Appendix B for an explanation of the running time of Birgé’s algorithm.) Moreover, we also note that the output distribution has the promised structure, since in one case it has a single atom at and in the other case it is the output of Birgé’s algorithm on a distribution of support of size .
2 Learning when X𝑋X is close to a k𝑘k-heavy Binomial Form PBD.
For all , there is an algorithm Learn-Poisson that draws
samples from a target PBD over , does
Our proof plan is to exploit the structure of the cover of Theorem 4. In particular, if is not -close to any sparse form PBD in the cover, it must be -close to a PBD in heavy Binomial form with approximately the same mean and variance as , as specified by the final part of the cover theorem. Hence, a natural strategy is to obtain estimates and of the mean and variance of the unknown PBD , and output as a hypothesis a translated Poisson distribution with parameters and . We show that this strategy is a successful one. Before providing the details, we highlight two facts that we will establish in the subsequent analysis and that will be used later. The first is that, assuming is not -close to any sparse form PBD in the cover , its variance satisfies
The second is that under the same assumption, the estimates and of the mean and variance of that we obtain satisfy the following bounds with probability at least :
See Figure 3 and the associated Figure 4 for a detailed description of the Learn-Poisson algorithm.
Proof of Lemma 5: We start by showing that we can estimate the mean and variance of the target PBD .
We treat the estimation of and separately. For both estimation problems we show how to use samples to obtain estimates and achieving the required guarantees with probability at least (we refer to these as “weak estimators”). Then a routine procedure allows us to boost the success probability to at the expense of a multiplicative factor on the number of samples. While we omit the details of the routine boosting argument, we remind the reader that it involves running the weak estimator times to obtain estimates and outputting the median of these estimates, and similarly for estimating .
We proceed to specify and analyze the weak estimators for and separately:
Weak estimator for : Let be independent samples from , and let . Then
Choosing and , the above imply that with probability at least .
Weak estimator for : Let be independent samples from , and let be the unbiased sample variance. (Note the use of Bessel’s correction.) Then it can be checked [Joh03] that
where is the excess kurtosis of the distribution of (i.e. ). To bound in terms of suppose that , where for all . Then
Choosing and , the above imply that with probability at least .
We proceed to prove Lemma 5. Learn-Poisson runs from Lemma 6 with appropriately chosen and , given below, and then outputs the translated Poisson distribution , where and are the estimated mean and variance of output by . Next, we show how to choose and , as well as why the desired guarantees are satisfied by the output distribution.
In particular, conditions (b) and (d) above imply that
for some universal constant , establishing (1). In terms of this , we choose and for the application of Lemma 6 to obtain—from samples—estimates and of and .
From our choice of parameters and the guarantees of Lemma 6, it follows that, if is not -close to any PBD in sparse form inside the cover , then with probability at least the estimates and satisfy:
establishing (2). Moreover, if is a random variable distributed according to the translated Poisson distribution , we show that and are within in total variation distance, concluding the proof of Lemma 5.
We make use of Lemma 1. Suppose that , where for all . Lemma 1 implies that
It remains to bound the total variation distance between the translated Poisson distributions and . For this we use Lemma 2. Lemma 2 implies
The claim follows from (3), (4) and the triangle inequality. ∎
The proof of Lemma 5 is concluded. We remark that the algorithm described above does not need to know a priori whether or not is -close to a PBD in sparse form inside the cover of Theorem 4. The algorithm simply runs the estimator of Lemma 6 with and and outputs whatever estimates and the algorithm of Lemma 6 produces.
3 Hypothesis testing.
Our hypothesis testing routine Choose-HypothesisX uses samples from the unknown distribution to run a “competition” between two candidate hypothesis distributions and over that are given in the input. We show that if at least one of the two candidate hypotheses is close to the unknown distribution , then with high probability over the samples drawn from the routine selects as winner a candidate that is close to . This basic approach of running a competition between candidate hypotheses is quite similar to the “Scheffé estimate” proposed by Devroye and Lugosi (see [DL96b, DL96a] and Chapter 6 of [DL01], as well as [Yat85]), but our notion of competition here is different.
We obtain the following lemma, postponing all running-time analysis to the next section.
There is an algorithm Choose-Hypothesis which is given sample access to distribution , two hypothesis distributions for , an accuracy parameter , and a confidence parameter It makes
Proof of Lemma 8: Figure 5 describes how the competition between and is carried out.
The correctness of Choose-Hypothesis is an immediate consequence of the following claim. (In fact for Lemma 8 we only need item (i) below, but item (ii) will be handy later in the proof of Lemma 10.)
For part (ii): If then the competition declares a draw, hence is not the winner. Otherwise we have and the above arguments imply that the competition between and will declare as the winner with probability at most .
In view of Claim 9, the proof of Lemma 8 is concluded.
Our Choose-Hypothesis algorithm implies a generic learning algorithm of independent interest.
Let be an arbitrary set of distributions over a finite domain. Moreover, let be an -cover of of size , for some . For all , there is an algorithm that uses
The algorithm performs a tournament, by running Choose-Hypothesis for every pair , , of distributions in . Then it outputs any distribution that was never a loser (i.e., won or tied against all other distributions in the cover). If no such distribution exists in then the algorithm says “failure,” and outputs an arbitrary distribution from .
We note that Devroye and Lugosi (Chapter 7 of [DL01]) prove a similar result, but there are some differences. They also have all pairs of distributions in the cover compete against each other, but they use a different notion of competition between every pair. Moreover, their approach chooses a distribution in the cover that wins the maximum number of competitions, whereas our algorithm chooses a distribution that is never defeated (i.e., won or tied against all other distributions in the cover).
Recent work [DK14, AJOS14, SOAJ14] improves the running time of the tournament approaches of Lemma 10, Devroye-Lugosi and other related tournaments to have a quasilinear dependence of on the size . In particular, they avoid running Choose-Hypothesis for all pairs of distributions in .
4 Proof of Theorem 1.
We first show Part (1) of the theorem, where the learning algorithm may output any distribution over and not necessarily a PBD. The algorithm for this part of the theorem, Non-Proper-Learn-PBD, is given in Figure 6. This algorithm follows the high-level structure outlined in Figure 1 with the following modifications: (a) first, if the total variation distance to within which we want to learn is , the second argument of both Learn-Sparse and Learn-Poisson is set to , where and are respectively the constants from Lemmas 3 and 5; (b) the third step of Learn-PBD is replaced by Choose-Hypothesis, where is defined in terms of as described in Definition 2 below; and (c) if Choose-Hypothesis returns , then Learn-PBD also returns , while if Choose-Hypothesis returns , then Learn-PBD returns .
(Definition of :) is defined in terms of and the support of in three steps:
for all points such that , we let ;
for all points such that , we describe in Appendix C an efficient deterministic algorithm that numerically approximates to within an additive error of , where is the cardinality of the support of . If is the approximation to output by the algorithm, we set ; notice then that ; finally,
for an arbitrary point such that , we set , to make sure that is a probability distribution.
We remark that the reason why we do not wish to use directly in Choose-Hypothesis is purely computational. In particular, since is a translated Poisson distribution, we cannot compute its probabilities exactly, and we need to approximate them. On the other hand, we need to make sure that using approximate values will not cause Choose-Hypothesis to make a mistake. Our is carefully defined so as to make sure that Choose-Hypothesis selects a probability distribution that is close to the unknown , and that all probabilities that Choose-Hypothesis needs to compute can be computed without much overhead. In particular, we remark that, in running Choose-Hypothesis, we do not a priori compute the value of at every point; we do instead a lazy evaluation of , as explained in the running-time analysis below.
Now we turn to Part (2) of Theorem 1, the proper learning result. The algorithm for this part of the theorem, Proper-Learn-PBD, is given in Figure 7. The algorithm is essentially the same as Non-Proper-Learn-PBD but with the following modifications, to produce a PBD that is within of the unknown : First, we replace Learn-Sparse with a different learning algorithm, Proper-Learn-Sparse, which is based on Lemma 10, and always outputs a PBD. Second, we add a post-processing step to Learn-Poisson that converts the translated Poisson distribution output by this procedure to a PBD (in fact, to a Binomial distribution). After we describe these new ingredients in detail, we explain and analyze our proper learning algorithm.
The procedure Proper-Learn-Sparse is given in Figure 8; we explain the procedure in tandem with a proof of correctness. As in Learn-Sparse, we start by truncating of the probability mass from each end of to obtain a conditional distribution . In particular, we compute and as described in the beginning of the proof of Lemma 3 (setting and ). Claim 4 implies that, with probability at least , . (Let us denote this event by .) We distinguish the following cases:
If , where is the constant in the statement of Theorem 4, the algorithm outputs “fail,” returning the trivial hypothesis that puts probability mass on the point . Observe that, if and , then cannot be -close to a sparse-form distribution in the cover.
Locate-Binomial: This routine takes as input the output of Learn-Poisson and computes a Binomial distribution , without any additional samples from . The guarantee is that, if is not -close to any sparse form distribution in the cover of Theorem 4, then, with probability at least (over the randomness in the output of Learn-Poisson), will be -close to .
Locate-Binomial is presented in Figure 9; we proceed to explain the algorithm and establish its correctness. This routine has three steps. The first two eliminate corner-cases in the values of and , while the last step defines a Binomial distribution with that is -close to and hence to under our working assumptions. (We note that a significant portion of the work below is to ensure that , which does not seem to follow from a more direct approach. Getting is necessary in order for our learning algorithm for order- PBDs to be truly proper.) Throughout (a), (b) and (c) below we assume that our working assumptions hold. In particular, our assumptions are used every time we employ the bounds (1) and (2) of Section 2.2.
Tweaking : If , we set ; otherwise, we set . (As intuition for this tweak, observe that the largest possible variance of a Binomial distribution is ) We note for future reference that in both cases (2) gives
where the lower bound follows from (2) and the fact that any PBD satisfies .
where we used the fact that from (1).
Observe first that and , where the last assertion follows from the fact that by construction.
Next, suppose that . Then from Cauchy-Schwarz we get that
where the first inequality follows from (2), the second inequality follows from (7) and the fact that any PBD over variables satisfies and the last one from (1).
where we used that from (1).
Note that, from the way that is set in Step (b) above, we have that and , as required for to be a valid Binomial distribution and a valid output for Part 2 of Theorem 1.
Let us bound the total variation distance between and . First, using Lemma 1 we have:
where the second inequality uses (8) (or (5) depending on which case of Step (b) we fell into) and the last one uses the fact that from (1). So plugging this into (10) we get:
The next step is to compare and . Lemma 2 gives:
Learning weighted sums of independent Bernoullis
Theorem 2. Let be a weighted sum of unknown independent Bernoulli random variables such that there are at most different values in the set Then there is an algorithm with the following properties: given and access to independent draws from , it uses
samples from the target distribution , runs in time
Given a vector of weights, we refer to a distribution (where are independent Bernoullis which may have arbitrary means) as an -weighted sum of Bernoullis, and we write to denote the space of all such distributions.
To prove Theorem 2 we first show that has an -cover that is not too large. We then show that by running a “tournament” between all pairs of distributions in the cover, using the hypothesis testing subroutine from Section 2.3, it is possible to identify a distribution in the cover that is close to the target -weighted sum of Bernoullis.
Let denote the set of distinct weights in , and let n_{j}=\big{|}\{i\in[n]\mid a_{i}=b_{j}\}\big{|}. With this notation, we can write , where with each a sum of many independent Bernoulli random variables and . Clearly we have . By Theorem 4, for each the space of all possible ’s has an explicit -cover of size . By independence across ’s, the product is an -cover for the space of all possible ’s, and hence the set
is an -cover for So has an explicit -cover of size . ∎
where the sum is over all -tuples such that for all and (as noted above there are at most such -tuples). To complete the proof of Theorem 2 we note that can be computed in time by standard dynamic programming.
2 Sample complexity lower bound for learning sums of weighted independent Bernoulli random variables
The intuition underlying this lower bound is straightforward: Suppose there are variables , chosen uniformly at random, which have (call these the “relevant variables”), and the rest of the ’s are zero. Given at most draws from for a small constant , with high probability some constant fraction of the relevant ’s will not have been “revealed” as relevant, and from this it is not difficult to show that any hypothesis must have constant error. A detailed argument follows.
Proof of Theorem 3: We define a probability distribution over possible target probability distributions as follows: A subset of size is drawn uniformly at random from all possible outcomes.. The vector is defined as follows: for each the value equals and for all other the value equals 0. The -th Bernoulli random variable has , and the target distribution is
Fix any as described above. For any we have if and only if . For any the value is exactly (for sufficiently large), and hence (again for sufficiently large).
The first claim of the lemma holds because any set of numbers from must sum to more than . The second claim holds because the only way a draw from can have is if and all other are 0 (here we are using ).
The next lemma is an easy consequence of Chernoff bounds:
Fix any as defined above, and consider a sequence of independent draws from . With probability the total number of indices such that is ever 1 in any of the draws is at most .
We are now ready to prove Theorem 3. Let be a learning algorithm that receives samples. Let and be chosen randomly as defined above, and set the target to
We consider an augmented learner that is given “extra information.” For each point in the sample, instead of receiving the value of that draw from the learner is given the entire vector . Let denote the set of elements for which the learner is ever given a vector that has By Lemma 16 we have with probability at least ; we condition on the event going forth.
Conclusion and open problems
References
Appendix A Extension of the Cover Theorem: Proof of Theorem 4
Theorem 4 is restating the main cover theorem (Theorem 1) of [DP13], except that it claims an additional property, namely what follows the word “finally” in the statement of the theorem. (We will sometimes refer to this property as the last part of Theorem 4 in the following discussion.) Our goal is to show that the cover of [DP13] already satisfies this property without any modifications, thereby establishing Theorem 4. To avoid reproducing the involved constructions of [DP13], we will assume that the reader has some familiarity with them. Still, our proof here will be self-contained.
First, we note that the -cover of Theorem 1 of [DP13] is a subset of a larger -cover of size , which includes all the -sparse and all the -heavy Binomial PBDs (up to permutations of the underlying ’s), for some . Let us call the “large -cover” to distinguish it from , which we will call the “small -cover.” The reader is referred to Theorem 2 in [DP13] (and the discussion following that theorem) for a description of the large -cover, and to Section 3.2 of [DP13] for how this cover is used to construct the small -cover. In particular, the small -cover is a subset of the large -cover, including only a subset of the sparse form distributions in the large -cover. Moreover, for every sparse form distribution in the large -cover, the small -cover includes at least one sparse form distribution that is -close in total variation distance. Hence, if the large -cover satisfies the last part of Theorem 4 (with instead of and instead of ), it follows that the small -cover also satisfies the last part of Theorem 4.
For , and as above, let , and denote respectively the (mean, variance) pairs of the variables , and . We argue first that the pair satisfies and . Next we argue that, if the collection output by the Stage 2 filter is in heavy Binomial form, then satisfies and , concluding the proof.
Proof for : The Stage 1 filter only modifies the indicators with , for some well-chosen . For convenience let us define and as in [DP13]. The filter of Stage 1 rounds the expectations of the indicators indexed by to some value in so that no single expectation is altered by more than an additive , and the sum of these expectations is not modified by more than an additive . Similarly, the expectations of the indicators indexed by are rounded to some value in . See the details of how the rounding is performed in Section 4.1 of [DP13]. Let us then denote by the expectations of the indicators resulting from the rounding. We argue that the mean and variance of is close to the mean and variance of . Indeed,
We proceed to bound the two terms of the RHS separately. Since the argument is symmetric for and we only do . We have
Using the above (and a symmetric argument for index set ) we obtain:
Proof for : After the Stage 1 filter is applied to the collection , the resulting collection of random variables has expectations , for all . The Stage 2 filter has different form depending on the cardinality of the set . In particular, if the output of the Stage 2 filter is in heavy Binomial form, while if the output of the Stage 2 filter is in sparse form. As we are only looking to provide guarantee for the distributions in heavy Binomial form, it suffices to only consider the former case next.
: Let be the collection produced by Stage 2 and let . Then Lemma 4 of [DP13] implies that
Appendix B Birgé’s theorem: Learning unimodal distributions
Here we briefly explain how Theorem 5 follows from [Bir97]. We assume that the reader is moderately familiar with the paper [Bir97].
Birgé (see his Theorem 1 and Corollary 1) upper bounds the expected variation distance between the target distribution (which he denotes ) and the hypothesis distribution that is constructed by his algorithm (which he denotes ; it should be noted, though, that his “” parameter denotes the number of samples used by the algorithm, while we will denote this by “”, reserving “” for the domain of the distribution). More precisely, [Bir97] shows that this expected variation distance is at most that of the Grenander estimator (applied to learn a unimodal distribution when the mode is known) plus a lower-order term. For our Theorem 5 we take Birgé’s “” parameter to be . With this choice of by the results of [Bir87a, Bir87b] bounding the expected error of the Grenander estimator, if samples are used in Birgé’s algorithm then the expected variation distance between the target distribution and his hypothesis distribution is at most To go from expected error to an -accurate hypothesis with probability at least , we run the above-described algorithm times so that with probability at least some hypothesis obtained is -accurate. Then we use our hypothesis testing procedure of Lemma 8, or, more precisely, the extension provided in Lemma 10, to identify an -accurate hypothesis from within this pool of hypotheses. (The use of Lemma 10 is why the running time of Theorem 5 depends quadratically on and why the sample complexity contains the second term.)
Appendix C Efficient Evaluation of the Poisson Distribution
In this section we provide an efficient algorithm to compute an additive approximation to the Poisson probability mass function. It seems that this should be a basic operation in numerical analysis, but we were not able to find it explicitly in the literature. Our main result for this section is the following.
There is an algorithm that, on input a rational number , and integers and , produces an estimate such that
Clearly we cannot just compute , and separately, as this will take time exponential in the description complexity of and . We follow instead an indirect approach. We start by rewriting the target probability as follows
Note that . Our goal is to approximate to within high enough accuracy and then use this approximation to approximate .
In particular, the main part of the argument involves an efficient algorithm to compute an approximation to satisfying
We show that if we had such an approximation, then we would be able to complete the proof. For this, we claim that it suffices to approximate to within an additive error . Indeed, if were the result of this approximation, then we would have:
To approximate given , we need the following lemma:
Let be a rational number. There is an algorithm that computes an estimate such that
Since , the point of the additive grid closest to achieves error at most . Equivalently, in a logarithmic scale, consider the grid and let j^{\ast}:=\arg\min_{j}\left\{\Big{|}\alpha-{\ln({j\over 4t})}\Big{|}\right\}. Then, we have that
The idea of the algorithm is to approximately identify the point , by computing approximations to the points of the logarithmic grid combined with a binary search procedure. Indeed, consider the “rounded” grid where each is an approximation to that is accurate to within an additive . Notice that, for :
Given that our approximations are accurate to within an additive , it follows that the rounded grid is monotonic in .
The algorithm outputs as its final approximation to . We argue next that the achieved error is at most an additive . Since the distance between two consecutive points of the grid is more than and our approximations are accurate to within an additive , a little thought reveals that . This implies that is within an additive of as desired, and the proof of the lemma is complete. ∎
Given Lemma 17, we describe how we could approximate given . Recall that we want to output an estimate such that . We distinguish the following cases:
If , we output . Indeed, given that \Big{|}\widehat{\widehat{{E}_{k}}}-E_{k}\Big{|}\leq{1\over 4t} and , if then . Hence, because , , so is within an additive of the right answer.
In view of the above, we only need to show how to compute . There are several steps to our approximation:
(Stirling’s Asymptotic Approximation): Recall Stirling’s asymptotic approximation (see e.g., [Whi80] p.193), which says that equals
where are the Bernoulli numbers. We define an approximation of as follows:
for
(Definition of an approximate exponent ): Define . Given the above discussion, we can calculate the distance of to the true exponent as follows:
So we can focus our attention to approximating . Note that is the sum of terms. To approximate it within error , it suffices to approximate each summand within an additive error of . Indeed, we so approximate each summand and our final approximation will be the sum of these approximations. We proceed with the analysis:
Note that, with this approximation, we have
(Floating-Point Representation): We will also need accurate approximations to , and . We think of and as multiple-precision floating point numbers base . In particular,
can be described with a binary fraction of , i.e., , bits and an exponent of length , i.e., .
Also, since is a positive rational number, , where and are positive integers of at most bits. Hence, for , we can think of as a multiple-precision floating point number base with a binary fraction of bits and an exponent of length . Hence, if we choose , we can represent all numbers as multiple precision floating point numbers with a binary fraction of bits and an exponent of bits.
; and similarly
, for ;
(Estimating the terms of the series): To complete the analysis, we also need to approximate each term of the form up to an additive error of . We do this as follows: We compute the numbers and exactly, and we perform the division approximately.
Let be the approximation arising if we use all the aforementioned approximations. It follows from the above computations that
(Overall Error): Combining the above computations we get: