Learning mixtures of structured distributions over discrete domains
Siu-on Chan, Ilias Diakonikolas, Rocco A. Servedio, Xiaorui Sun
Introduction
Learning an unknown probability distribution given access to independent samples is a classical topic with a long history in statistics and probability theory. Theoretical computer science researchers have also been interested in these problems at least since the 1990s [KMR+94, Das99], with an explicit focus on the computational efficiency of algorithms for learning distributions. Many works in theoretical computer science over the past decade have focused on learning and testing various kinds of probability distributions over high-dimensional spaces, see e.g. [Das99, FM99, DS00, AK01, VW02, FOS05, RS05, BS10, KMV10, MV10, ACS10] and references therein. There has also been significant recent interest in learning and testing various types of probability distributions over the discrete domain , see e.g. [BKR04, VV11b, VV11a, DDS12a, DDS12b].
A natural type of distribution learning problem, which is the focus of this work, is that of learning an unknown mixture of “simple” distributions. Mixtures of distributions have received much attention in statistics [Lin95, RW84, TSM85] and in recent years have been intensively studied in computer science as well (see many of the papers referenced above). Given distributions and non-negative values that sum to 1, we say that is a -mixture of components with mixing weights . A draw from is obtained by choosing with probability and then making a draw from .
We focus on density estimation rather than, say, clustering or parameter estimation, for several reasons. First, clustering samples according to which component in the mixture each sample came from is often an impossible task unless restrictive separation assumptions are made on the components; we prefer not to make such assumptions. Second, the classes of distributions that we are chiefly interested in (such as log-concave, MHR and unimodal distributions) are all non-parametric classes, so it is unclear what “parameter estimation” would even mean for these classes. Finally, even in highly restricted special cases, parameter estimation provably requires sample complexity exponential in , the number of components in the mixture. Moitra and Valiant [MV10] have shown that parameter estimation for a mixture of Gaussians inherently requires samples. Their argument can be translated to the discrete setting, with translated Binomial distributions in place of Gaussians, to provide a similar lower bound for parameter estimation of translated Binomial mixtures. Thus, parameter estimation even for a mixture of translated Binomial distributions over (a highly restricted special case of all the mixture classes we consider, since translated Binomial distributions are log-concave, MHR and unimodal) requires samples. This rather discouraging lower bound motivates the study of other variants of the problem of learning mixture distributions.
Returning to our density estimation framework, it is not hard to show that from an information-theoretic perspective, learning a mixture of distributions from a class of distributions is never much harder than learning a single distribution from . In Appendix A we give a simple argument which establishes the following:
While the generic algorithm uses relatively few samples, it is computationally highly inefficient, with running time exponentially higher than the runtime of algorithm (since tries all possible partitions of its input sample into separate subsamples). Indeed, naive approaches to learning mixture distributions run into a “credit assignment” problem of determining which component distribution each sample point belongs to.
As the main contributions of this paper, we (i) give a general algorithm which efficiently learns mixture distributions over provided that the component distributions satisfy a mild condition; and (ii) show that this algorithm can be used to obtain highly efficient algorithms for natural mixture learning problems.
2 A general algorithm.
The mild condition which we require of the component distributions in our mixtures is essentially that each component distribution must be close to a (variable-width) histogram with few bins. More precisely, let us say that a distribution over is -flat (see Section 2) if there is a partition of into disjoint intervals such that is -close (in total variation distance) to the distribution obtained by “flattening” within each interval (i.e., by replacing , for , with ). Our general result for learning mixture distributions is a highly efficient algorithm that learns any -mixture of -flat distributions:
As we show in Section 1.3 below, Theorem 1.1 yields near-optimal sample complexity for a range of interesting mixture learning problems, with a running time that is nearly linear in the sample size. Another attractive feature of Theorem 1.1 is that it always outputs hypothesis distributions with a very simple structure (enabling a succinct representation), namely histograms with at most bins.
3 Applications of the general approach.
We apply our general approach to obtain a wide range of learning results for mixtures of various natural and well-studied types of discrete distributions. These include mixtures of log-concave distributions, mixtures of monotone hazard rate (MHR) distributions, and mixtures of unimodal distributions. To do this, in each case we need a structural result stating that any distribution of the relevant type can be well-approximated by a histogram with few bins. In some cases (unimodal distributions) the necessary structural results were previously known, but in others (log-concave and MHR distributions) we establish novel structural results that, combined with our general approach, yield nearly optimal algorithms.
Log-concave distributions. Discrete log-concave distributions are essentially those distributions that satisfy (see Section 4 for a precise definition). They are closely analogous to log-concave distributions over continuous domains, and encompass a range of interesting and well-studied types of discrete distributions, including binomial, negative binomial, geometric, hypergeometric, Poisson, Poisson Binomial, hyper-Poisson, Pólya-Eggenberger, and Skellam distributions (see Section 1 of [FBR11]). In the continuous setting, log-concave distributions include uniform, normal, exponential, logistic, extreme value, Laplace, Weibull, Gamma, Chi and Chi-Squared and Beta distributions, see [BB05]. Log-concave distributions over have been studied in a range of different contexts including economics, statistics and probability theory, and algebra, combinatorics and geometry, see [An95, FBR11, Sta89] and references therein.
Our main learning result for mixtures of discrete log-concave distributions is:
Our main learning result for mixtures of MHR distributions is:
This theorem is also nearly optimal. We show that for and , any algorithm for learning a mixture of MHR distributions to accuracy must use samples.
Unimodal distributions. A distribution over is said to be unimodal if its probability mass function is monotone non-decreasing over for some and then monotone non-increasing on . Every log-concave distribution is unimodal, but the MHR and unimodal conditions are easily seen to be incomparable. Many natural types of distributions are unimodal and there has been extensive work on density estimation for unimodal distributions and related questions [Rao69, Weg70, BKR04, Bir97, Fou97].
Our main learning result for mixtures of unimodal distributions is:
Our approach in fact extends to learning a -mixture of -modal distributions (see Section 6). The same lower bound argument that we use for mixtures of MHR distributions also gives us that for and , any algorithm for learning a mixture of unimodal distributions to accuracy must use samples.
4 Related work.
Achlioptas and McSherry [AM05] and Kannan et al. [KSV08] gave algorithms for clustering points drawn from a mixture of high-dimensional log-concave distributions, under various separation assumptions on the distance between the means of the components. We are not aware of prior work on density estimation of mixtures of arbitrary log-concave distributions in either the continuous or the discrete setting.
MHR distributions: As noted above, MHR distributions appear frequently and play an important role in reliability theory and in economics (to the extent that the MHR condition is considered a standard assumption in these settings). Surprisingly, the problem of learning an unknown MHR distribution or mixture of such distributions has not been explicitly considered in the statistics literature. We note that several authors have considered the problem of estimating the hazard rate of an MHR distribution in different contexts, see e.g. [Wan86, HW93, GJ11, Ban08].
Unimodal distributions: The problem of learning a single unimodal distribution is well-understood: Birgé [Bir97] gave an efficient algorithm for learning continuous unimodal distributions (whose density is absolutely bounded); his algorithm, when translated to the discrete domain , requires samples. This sample size is also known to be optimal (up to constant factors)[Bir87a]. In recent work, Daskalakis et al. [DDS12a] gave an efficient algorithm to learn -modal distributions over . We remark that their result does not imply ours, as even a mixture of two unimodal distributions over may have modes. We are not aware of prior work on efficiently learning mixtures of unimodal distributions.
Paper Structure. Following some preliminaries in Section 2, Section 3 presents our general framework for learning mixtures. Sections 4, 5 and 6 analyze the cases of log-concave, MHR and unimodal mixtures respectively.
Preliminaries and notation
For a probability distribution over we write to denote the probability of element under , so for all and For we write to denote . We write to denote the sub-distribution over induced by , i.e., if and otherwise.
A distribution over is non-increasing (resp. non-decreasing) if (resp. ), for all ; is monotone if it is either non-increasing or non-decreasing.
Finally, the following notation and terminology will be useful: given independent samples , drawn from distribution the empirical distribution is defined as follows: for all , .
Let be a partition of into disjoint intervals, and be a partition of into disjoint intervals. We say that is a refinement of if each interval in is a union of intervals in , i.e., for every there is a subset such that .
For and two partitions of into and intervals respectively, we say that the common refinement of and is the partition of into intervals obtained from and in the obvious way, by taking all possible nonempty intervals of the form It is clear that is both a refinement of and of and that contains at most intervals.
We recall some basic tools from probability.
The VC inequality. Given a family of subsets over , define . The VC–dimension of is the maximum size of a subset that is shattered by (a set is shattered by if for every some satisfies ).
Let be an empirical distribution of samples from . Let be a family of subsets of VC–dimension . Then
Uniform convergence. We will also use the following uniform convergence bound:
Let be a family of subsets over , and be an empirical distribution of samples from . Let be the random variable . Then we have
Learning mixtures of (ε,t)𝜀𝑡(\varepsilon,t)-flat distributions
In this section we present and analyze our general algorithm for learning mixtures of -flat distributions. We proceed in stages by considering three increasingly demanding learning scenarios, each of which builds on the previous one.
We start with the simplest scenario, in which the learning algorithm is given a partition which is a -flat decomposition of for the target distribution being learned.
Algorithm Learn-Known-Decomposition:
Input: sample access to unknown distribution over ; -flat decomposition of ; accuracy parameter ; confidence parameter
Draw samples to obtain an empirical distribution .
An application of the triangle inequality yields
The first term on the right-hand side is at most by the definition of a -flat decomposition. The second term is also at most , as follows by Proposition 3.1, stated and proved below. ∎
where . Since contains at most intervals, is a union of at most intervals. Consequently the above right-hand side is at most , where is the family of all unions of at most intervals over .Formally, define as the collection of all intervals over , including the empty interval. Then . Since the VC-dimension of is , Theorem 2.1 implies that the considered quantity has expected value at most . The claimed result now follows by applying Theorem 2.2 with ∎
2 Second scenario: unknown flat distribution.
The second algorithm deals with the scenario in which the target distribution is -flat but no flat decomposition is provided to the learner. We show that in such a setting we can construct a -flat decomposition of , and then we can simply use this to run Learn-Known-Decomposition.
The basic subroutine Right-Interval will be useful here (and later). It takes as input an explicit description of a distribution over , an interval , and a threshold It returns the longest interval in that ends at and has mass at most under . If no such interval exists then must exceeds , and the subroutine simply returns the singleton interval .
Input: explicit description of distribution ; interval ; threshold
If then set , otherwise set .
The algorithm to construct a decomposition is given below:
Algorithm Construct-Decomposition:
Input: sample access to unknown distribution over ; parameter ;
accuracy parameter ; confidence parameter
Draw samples to obtain an empirical distribution .
Let be the interval returned by Right-Interval.
Add to and set .
To prove the above theorem we will need the following elementary fact about refinements:
Let be any distribution over and let be a -flat decomposition of . If is a refinement of , then is a -flat decomposition of .
We will also use the following simple observation about the Right-Interval subroutine:
Suppose Right-Interval returns an interval and Right-Interval returns . Then .
of to . If then the contribution to is zero; on the other hand, if then the contribution to is at most . Thus the total contribution summed across all is at most . Now we observe that with probability at least we have
Our algorithm to learn an unknown -flat distribution is now very simple:
Algorithm Learn-Unknown-Decomposition:
Input: sample access to unknown distribution over ; parameter ;
accuracy parameter ; confidence parameter
Run Construct-Decomposition to obtain a -flat decomposition of .
Run Learn-Known-Decomposition and return the hypothesis that it outputs.
3 Main result (third scenario): learning a mixture of flat distributions.
We have arrived at the scenario of real interest to us, namely learning an unknown mixture of distributions each of which has an (unknown) flat decomposition. The key to learning such distributions is the following structural result, which says that any such mixture must itself have a flat decomposition:
Let be a class of -flat distributions over , and let be any -mixture of distributions in Then is a -flat distribution.
Let be a -mixture of components Let denote the -flat decomposition of corresponding to , and let be the common refinement of . It is clear that contains at most intervals. By Lemma 3.1, is a -flat decomposition for every . Hence we have
where (2) is the triangle inequality and (3) follows from the fact that the expression in (2) is a nonnegative convex combination of terms bounded from above by . ∎
Given Lemma 3.2, the desired mixture learning algorithm follows immediately from the results of the previous subsection:
Learning mixtures of log-concave distributions
In this section we apply our general method from Section 3 to learn log-concave distributions over and mixtures of such distributions. We start with a formal definition:
A probability distribution over is said to be log-concave if it satisfies the following conditions: (i) if are such that then ; and (ii) for all
We note that while some of the literature on discrete log-concave distributions states that the definition consists solely of item (ii) above, item (i) is in fact necessary as well since without it log-concave distributions need not even be unimodal (see the discussion following Definition 2.3 of [FBR11]).
We recall the well-known fact that log-concavity implies unimodality (see e.g. [KG71]). Thus, it is useful to analyze log-concave distributions which additionally are monotone (since a general log-concave distribution can be viewed as consisting of two such pieces). With this motivation we give the following lemma:
Let be a distribution over that is non-decreasing and log-concave on . Let be an interval of mass , and suppose that the interval has mass . Then
for . Eq. (4) holds for , since by the non-decreasing property. The general case follows by induction and using the fact that the ratio is non-decreasing in for any log-concave distribution (an immediate consequence of the definition of log-concavity).
for . Since the intervals have geometrically decreasing mass, this implies that
Rearranging yields the desired inequality. ∎
We will also use the following elementary fact:
We are now ready to present and analyze our algorithm Decompose-Log-Concave that draws samples from an unknown log-concave distribution and outputs a flat decomposition. The algorithm simply runs the general algorithm Construct-Decomposition with an appropriate choice of parameters. However the analysis will not go via the “generic” Theorem 3.2 (which would yield a weaker bound) but instead uses Lemma 4.1, which is specific to log-concave distributions.
Algorithm Decompose-Log-Concave:
Input: sample access to unknown log-concave distribution over ;
accuracy parameter ; confidence parameter
Set .
Run Construct-Decomposition and return the decomposition that it yields.
Our main theorem in this section is the following:
For any log-concave distribution over , Algorithm Decompose-LogConcave draws samples from and with probability at least constructs a decomposition that is -flat.
by the -closeness of and in Kolmogorov distance and the definition of Right-Interval. Also, by Observation 3.1, , and hence
again by closeness in Kolmogorov distance.
Since is non-decreasing on , we have
The right-hand side above is at most by our choice of (with an appropriate constant in the big-oh).
Similarly, let be the collection of intervals to the right of . An identical analysis (using the obvious analogue of Lemma 4.1 for non-increasing log-concave distributions on ) shows that the contribution of intervals in to is at most .
Finally, let be the interval containing . If is a singleton, it does not contribute to . Otherwise, and , hence the contribution of to is at most .
Our claimed upper bounds follow from the above theorem by using our framework of Section 3. Indeed, it is clear that we can learn any unknown log-concave distribution by running Algorithm Decompose-Log-Concave to obtain a decomposition and then Algorithm Learn-Known-Decomposition to obtain a hypothesis distribution :
Theorem 4.2 of course implies that every log-concave distribution is -flat. We may thus apply Corollary 3.1 and obtain our main learning result for -mixtures of log-concave distributions:
Lower bounds. It is shown in [DL01, Lemma 15.1] that learning a continuous distribution whose density is bounded and convex over $\varepsilon\Omega((1/\varepsilon)^{5/2})[n]\Omega((1/\varepsilon)^{5/2})\varepsilon\geq 1/n^{\Omega(1)}.kki[1+(i-1)n/k,in/k][n]\varepsilon9/1010\varepsilonk\leq n^{1-\Omega(1)}\varepsilon\geq 1/n^{\Omega(1)}k\varepsilon\Omega(k\varepsilon^{-5/2})$ samples.
Learning mixtures of MHR distributions
In this section we apply our general method from Section 3 to learn monotone hazard rate (MHR) distributions over and mixtures of such distributions.
It is known that every log-concave distribution over is MHR but the converse is not true, as can easily be seen from the fact that every monotone non-decreasing distribution over is MHR.
In Section 5.1 we prove that every MHR distribution over has an -flat decomposition. We combine this with our general results from Section 3 to get learning results for mixtures of MHR distributions.
Our algorithm to construct a flat decomposition of an MHR distribution is Decompose-MHR, given below. Note that this algorithm takes an explicit description of as input and does not draw any samples from . Roughly speaking, the algorithm works by partitioning into intervals such that within each interval the value of never deviates from its value at the leftmost point of the interval by a multiplicative factor of more than
Algorithm Decompose-MHR:
Input: explicit description of MHR distribution over ; accuracy parameter
Set and initialize to be the empty set.
Let be the interval returned by Right-Interval, and be the interval returned by Right-Interval. Set .
Set to be the smallest integer such that . If no such exists, let and go to Step 5. Otherwise, let and .
Let be the smallest integer such that either or holds. If no such exists let , otherwise, let .
Add to , and set .
Return .
Our first lemma for the analysis of Decompose-MHR states that MHR distributions satisfy a condition that is similar to being monotone non-decreasing:
If then holds directly, so for the rest of the proof we may assume that .
By the definition of the MHR condition we have and hence
Let , with , , where . Let and . Thus, consists of those intervals in which are such that the following interval’s initial value is significantly smaller than the initial value of , and consists of those for which the following interval’s initial value is significantly larger than the initial value of . We also denote . For convenience, we also let .
We first bound the “total multiplicative decrease in ” across all intervals in :
We have
Observation 3.1 implies that the total probability mass on intervals and is at least . We thus have
where the first inequality follows from Lemma 5.1, the second inequality is self-evident, the equality follows from the telescoping product, and the final inequality is because ∎
At this point we can bound the number of intervals produced by Decompose-MHR:
Step 4 of Algorithm Decompose-MHR adds at most intervals to .
We first bound the number of intervals in . Let the intervals in be , where and . Observation 3.1 implies that the total probability mass is at least . Hence, is at least and we have . For it holds
Consequently the number of intervals in is bounded by .
Now we bound the number of intervals in . We consider the value of :
Since and , the above is at most ; using Lemma 5.2, we get that
On the other hand, for every we have that . Consequently there can be at most intervals in , and the proof is complete. ∎
It remains only to show that is actually a flat decomposition of :
Algorithm Decompose-MHR outputs a partition of that is -flat.
Now for each interval in , we have
Applying Corollary 3.1, we get our main learning result for mixtures of MHR distributions:
Lower bounds. By adapting a lower bound of [Bir87a] (for monotone distributions over a continuous interval) it can be shown that for , any algorithm for learning a monotone distribution over to accuracy must use samples. We may consider a uniform mixture of component distributions where the -th distribution in the mixture is supported on and monotone non-decreasing over . Each component distribution is MHR (over the entire domain). The same argument as in the log-concave case implies that, for and , any algorithm for learning a mixture of MHR distributions to accuracy must use samples.
Learning mixtures of unimodal and t𝑡t-modal distributions
In this section we apply our general method from Section 3 to learn mixtures of unimodal (and, more generally, -modal) distributions over Here our task is quite easy because of a result of L. Birgé [Bir87b] which essentially provides us with the desired flat decompositions. We note that Birgé’s structural result was obtained as part of an efficient learning algorithm for monotone distributions; Birgé subsequently gave an efficient learning algorithm for unimodal distributions [Bir97]. However, we are not aware of work prior to ours on learning mixtures of unimodal or -modal distributions.
We begin by defining unimodal and -modal distributions over :
A distribution over is unimodal if there exists such that is non-decreasing over and non-increasing over . For , distribution over is -modal if there is a partition of into intervals such that the sub-distributions are unimodal.
By adapting a construction of Birgé (proved in [Bir87b] for distributions over the continuous real line) to the discrete domain , [DDS+13] established the following:
Let be any monotone distribution (either non-increasing or non-decreasing) over . Then is -flat.
We note that it can be shown (using the same construction that is used in the sample complexity lower bound of [Bir87a] for learning monotone distributions) that is the best possible bound for the number of intervals required in Theoorem 6.1.
An immediate consequence of Theorem 6.1 is that any unimodal distribution over is -flat, and any -modal distribution over is -flat. Using Corollary 3.1 we thus obtain the following results for learning mixtures of unimodal or -modal distributions:
Lower bounds. The lower bound arguments we gave for mixtures of MHR distributions (which are based on Birgé’s lower bounds for learning monotone distributions) apply unchanged for mixtures of unimodal distributions, since every distribution which is supported on and monotone non-decreasing over is unimodal over
Conclusions and future work
This work introduces a simple general approach to learning mixtures of “structured” distributions over discrete domains. We illustrate the usefulness of our approach by showing it yields nearly optimal algorithms for learning mixtures of natural and well-studied classes (log-concave, MHR and unimodal) and in the process we establish novel structural properties of these classes.
Are there any other natural distribution classes for which our general framework is applicable? We suspect so. At the technical level, the linear dependence on the parameters and in the sample complexity of Theorem 1.1 is optimal (up to constant factors). It would be interesting to improve the dependence on from cubic down to quadratic (which would be best possible) with an efficient algorithm.
References
Appendix A Proof of Proposition 1.1
At a high level, the algorithm works by drawing a large set of samples from the target mixture and trying all possible ways of partitioning the sample into disjoint subsamples. For each partition of the sample it runs algorithm over each subsample and combines the resulting hypothesis distributions (guessing the mixture weights) to obtain a hypothesis mixture distribution. Finally, a “hypothesis testing” procedure is used to identify a high-accuracy hypothesis from the collection of all hypotheses distributions obtained in this way.
More precisely, let denote the unknown target -mixture of distributions from . Algorithm works as follows:
For each possible way of partitioning into disjoint subsamples such that each , run algorithm a total of times, using as the input sample for the -th run, to obtain hypothesis distributions . For each vector of non-negative mixing weights that sum to 1 and satisfy (integer), let be the mixture distribution
Draw samples from and use them to run the “hypothesis testing” routine described in Lemma 11 of [DDS12b] over all hypotheses obtained in the previous step. Output the hypothesis distribution that this routine outputs.