New algorithms and lower bounds for monotonicity testing
Xi Chen, Rocco A. Servedio, Li-Yang Tan
Introduction
Monotonicity is a basic and natural property of functions. In the field of property testing, the problem of efficiently testing whether an unknown function is monotone has been the focus of a long and fruitful line of research, with many works (see e.g. [GGLR98, DGL+99, GGL+00, EKK+00, FLN+02, Fis04, BKR04, ACCL07, HK08, RS09, BBM12, BCGSM12, RRS+12, CS13a, CS13b, CS13c, BRY13]) studying this problem for functions with various domains and ranges.
Given as input a distance parameter and oracle access to an unknown Boolean function , output Yes with probability at least if is monotone, and No with probability at least if is -far from monotone.
Our main contributions in this work are (i) a new lower bound that improves on the [FLN+02] lower bound by an exponential factor, and (ii) a new algorithm that improves on the [CS13a] upper bound (in terms of the dependence on ) by a polynomial factor. We now describe these contributions in more detail.
Our lower bound. We give an exponential improvement on the above-mentioned lower bounds of Fischer et al.:
There exists a universal constant such that any non-adaptive algorithm for testing whether an unknown Boolean function is monotone versus -far from monotone must make queries. Consequently, any adaptive algorithm must make queries.
While the aforementioned results of Fischer et al. represent the previous best lower bounds on the general testing problem as defined above, additional lower bounds are known for several restricted versions of the problem. In the same paper Fischer et al. gave an lower bound on the query complexity of any non-adaptive one-sided tester, i.e. one that always outputs Yes when is monotone (again, this directly implies an lower bound for adaptive one-sided testers). Restricting further, a pair tester is a non-adaptive one-sided tester that independently draws pairs of comparable points from some distribution and rejects if and only if some pair that is drawn violates monotonicity. Briët et al. [BCGSM12] proved an lower bound on the query complexity of pair testers whose query complexity can be written as for some function
In addition to Theorem 1, we show that essentially the same lower bound holds for monotonicity testing of Boolean-valued functions over hypergrid domains for (Below and throughout this paper we write to denote .) Our most general lower bound is the following:
Our algorithm. We present a new algorithm for monotonicity testing and prove the following result about its performance:
This work. Neither the [BO10] construction nor the [MORS09, RS13] construction can be used directly to establish a lower bound for monotonicity testing of functions ; as described above, in the [BO10] construction both the and functions are monotone, and in the [MORS09, RS13] construction a typical function from either distribution is far from monotone. Nevertheless, in this work we show that ingredients from [BO10, RS13] can be leveraged to obtain a polynomial lower bound for testing monotonicity of functions . Like these earlier works we employ Yao’s principle: we define a distribution that is supported on monotone LTFs, and a distribution over LTFs that is almost entirely supported on LTFs that are constant-far from every monotone function, and use an analysis which is fairly similar to that of [BO10, RS13], to prove Theorem 1. Using the multidimensional Berry–Esséen theorem of [GOWZ10] to analyze our and distributions would result in an lower bound. To obtain our improved lower bound, we instead adapt a multidimensional CLT of Valiant and Valiant [VV11] (for Wasserstein distance) to our context.
2 The approach of our algorithm
Our algorithm builds on ingredients from [CS13a], so to explain our approach we first recall the necessary ingredients from that work. Fix a Boolean functionFor our algorithmic result it will be more convenient to view Boolean functions as mapping to ., and let us say that a pair of inputs with is a violated edge if and is an edge in (i.e. the Hamming distance between them is 1). [CS13a] establishes a very useful “dichotomy theorem” about Boolean functions that are -far from monotone: for any , any such function either must have violated edges, or must have a matching (i.e. a vertex-disjoint set) of violated edges.
3 Preliminaries
We will need a few standard facts from probability theory:
Let be a Gaussian with mean 0 and variance . Then for all it holds that \operatorname{{\bf Pr}}\big{[}\mathcal{G}\in[0,a\sigma]\big{]}=\Omega(a).
For all there exists an such that the following holds. For all even (resp. odd) ,
For , the influence of coordinate on , denoted , is the probability
where denotes the string with its -th coordinate flipped. The following fact relates the influences of an LTF to its degree- Fourier coefficients:
The lower bound: Proof of Theorem 2
Let be any deterministic non-adaptive two-sided -query algorithm for testing whether a black-box Boolean function is monotone. Then
We prove Proposition 2.1 in Section 2.1, followed by Proposition 2.2 in Section 2.2.
Since for all , by Fact 1.5 we have that for all . Hence for all monotone Boolean functions , we have
Here the second equality is by Parvseval’s identity; the penultimate equality uses the fact that for all , which in turn holds since is a monotone Boolean function. This completes the proof of Proposition 2.1.
2 Proof of Proposition 2.2
We will need the following multidimensional Berry–Esséen theorem, the proof of which we defer to Section 3.
We begin by writing , where and is uniform over ; i.e. each is independently with probability and with probability . Likewise we may express , where and is with probability and with probability . We claim that the ’s and ’s have matching means and covariance matrices; it suffices to check this for and . For means, we see that indeed
As for the covariance matrices, we let and calculate
Similarly, the corresponding entry of is:
Since the ’s and ’s have matching means and covariance matrices, so do their sums and , and so Theorem 5 gives a bound on the differences and for the same -dimensional Gaussian . Recalling that where , we have that , and likewise . Therefore, two applications of Theorem 5 with along with the triangle inequality yields the bound
for all . Choosing completes the proof. ∎
Multidimensional Berry–Esséen via the Valiant–Valiant CLT
In this section we prove Theorem 5 by adapting a recent multidimensional CLT of Valiant and Valiant [VV11] which bounds the Wasserstein distance between a sum of independent vector-valued random variables and a multidimensional Gaussian.
Valiant and Valiant [VV11] recently used Stein’s method to prove the following central limit theorem for Wasserstein distance:
where is the -dimensional Gaussian with the same mean and covariance matrix as .
to be the radius- region around the orthant boundaries, and partition into (the points in that lie close to the orthant boundaries) and (the points that lie far away from the orthant boundaries). We have
We bound the quantities and separately. For , we have that
where (3) is a union bound over all dimensions, and (4) uses Fact 1.1 (Gaussian anti-concentration), the fact that is a Gaussian with variance \sum_{j=1}^{n}\operatorname{{\bf Var}}\big{[}\mathbf{X}^{(j)}_{i}\big{]}, and Theorem 4 (Berry–Esséen).
Note that and sum to the quantity on the left-hand side of (5), and so . (In words, since places more mass on than does, any scheme of moving the mass of to obtain must move at least amount from within to outside it. is the amount moved from within to ’s boundary , and is the rest, moved from within to locations entirely out of .) Since for any pair of points and , it follows that
We consider two cases, depending on the relative magnitudes of and . If , we first observe that for all we have \big{\|}\mathbf{X}^{(j)}-\operatorname{{\bf E}}\big{[}\mathbf{X}^{(j)}\big{]}\big{\|}_{2}\leq\tau\sqrt{q} with probability , since each of its coordinates satisfies \big{|}\mathbf{X}^{(j)}_{i}-\operatorname{{\bf E}}\big{[}\mathbf{X}^{(j)}_{i}\big{]}\big{|}\leq\tau with probability by the assumption of the theorem. Therefore we may apply Theorem 7 (Valiant–Valiant CLT) with to get
and hence , which along with our upper bound on completes the proof. If on the other hand , then
and again our bound on completes the proof. ∎
A lower bound for general hypergrid domains
We prove Theorem 2 via a reduction to the case (i.e. Theorem 1). The reduction is simpler for even so for ease of exposition we assume below that is even. In this case Theorem 2 is a direct consequence of Theorem 1 and the following proposition:
defined by (6) below satisfies the following two properties:
If is monotone then is monotone as well.
If is -far from monotone then is -far from monotone as well.
We will need the following characterization of distance to monotonicity.
For all and , we have that is -far from monotone if and only if there exists many pairwise disjoint ordered pairs of vertices such that and . We will call each such pair a violation with respect to .
For every , we define to be the function
where we use to denote the -valued indicator where if is true, and otherwise. (Note that is an integer by our assumption that is even.)
It is straightforward to verify that is monotone if is monotone, and so it remains to show that is -far from monotone if is -far from monotone. Since is -far from monotone, we have by Theorem 8 that there exist many pairwise disjoint pairs that are violations with respect to ; we will exhibit many pairwise disjoint pairs in that are violations with respect to , which along with another application of Theorem 8 completes the proof. Let S:\{-1,1\}\to\big{\{}[m/2],\{(m/2)+1,\ldots,m\}\big{\}} be the set-valued function
and by a slight abuse of notation, we also define
to be a function that maps points to subsets of . Note that for all , and if . Furthermore, for all and . In words, maps each -input of to a set of many -inputs of , and likewise each -input of to a set of many -inputs of .
For any pair that is a violation with respect to , consider pairing the elements of with the elements of in the obvious way (i.e. each is is paired with the unique element that has for all ). Since , it follows from the definition of that every is paired with where . Furthermore, as noted above whereas , and so every pair is a violation with respect to . Therefore each of the many pairs that are violations with respect to gives rise to many pairwise disjoint pairs that are violations with respect to . Finally recalling that if , we conclude that there are indeed many pairwise disjoint pairs that are violations with respect to . This finishes the proof. ∎
The algorithm
Throughout the proof of our upper bound we will assume that Note that this is without loss of generality, since if then the edge tester alone succeeds with probability , and if then every is -close to one of the two constant functions, both of which are monotone.
and will denote simply by when the distance parameter is clear from the context. For each we let denote the -th layer, and refer to
First pick a path uniformly from the collection of all paths going from to .
This distribution is a slight variant of the one induced by the [CS13a] path tester, which takes a parameter as input and disallows pairs for which is too small relative to . Our new tester will not sample from (see Section 5.3), but we will use in our analysis. We remark here that with positive probability under .
If were chosen independently and uniformly from , then the probability that they both land in a fixed set of points, for some , would be . The following lemma states that the probability is not much lower for a pair drawn from :
and so it suffices to lower bound by . This is exactly Claim 2.2.1 of [CS13a]; we repeat the calculation here for the sake of completeness:
where we use to denote the -valued indicator where if is true, and otherwise. Here (7) uses the fact that a uniformly random path from to contains a uniformly random point in layer , and (8) holds since for all . ∎
We will need a numerical lemma concerning the ratio of binomial coefficients.
Let , and be integers where . Then
We prove the first equation and the second equation is similar. By a routine calculation we verify that the first ratio is maximized when and , and so
Then pick a path uniformly from the collection of all paths going through , , and .
We get the following corollary from Lemmas 5.1 and 5.2:
As a result, we have for every comparable pair in the middle layers
2 Density and score
We need the following definition to give a more detailed analysis on the consequence of Corollary 5.3, which is key to the analysis of our monotonicity tester described in Section 5.3.
Let . For all and , we define the following quantities:
The following lemma relates the distribution (more precisely, the distribution over that is induced by conditioning on a particular outcome of ) to the notion of score:
We use the previous two lemmas to lower bound the expected downward -score of an drawn uniformly at random from :
where the final equality holds by the first part of Lemma 5.2. This proves (9), which together with Lemma 5.4 gives
On the other hand, by Corollary 5.3 we have
Combining (10) with (11) and rearranging completes the proof. ∎
Lemma 5.5 lower bounds the average downward -score of points ; its conclusion may be equivalently rewritten as the following sum:
This follows from (12), (13), and the fact that there are only many buckets. ∎
Let and be a matching of edges in the middle layers. Let
Next for every edge we have that
3 The weighted path tester and its analysis
Given a Boolean function , recall that a pair of vertices is a violated pair with respect to if and . Our algorithm weighted-path-tester for monotonicity testing proceeds as follows:
Pick a path uniformly from the collection of all paths going through and , and set to be the (unique) point on that has and
Reject iff is a violated pair.
We note that an equivalent formulation of step (4) is that is drawn uniformly from \big{\{}z\in\{0,1\}^{n}\colon\text{z\prec\boldsymbol{y}\|\boldsymbol{y}-z\|_{1}=\boldsymbol{k}}\big{\}}. Below we show that if there is a -sized matching of violated edges of in the middle layers of the hypercube, then the tester above succeeds in finding a violated pair with probability roughly .
Let and . Suppose there is a -sized matching of violated edges of all lying in the middle layers of the hypercube. Then weighted-path-tester succeeds (i.e. samples and that form a violated pair with respect to ) with probability
4 Proof of Theorem 3
Finally we combine Proposition 5.8 with the dichotomy theorem of [CS13a] to prove Theorem 3. To state the latter, we let denote the total number of violated edges in . We also let denote the size of the largest matching of violated edges in the middle layers. Then we have
For any that is -far from monotone, .
As mentioned at the beginning of Section 5, we may assume without loss of generality that since otherwise the edge tester alone succeeds with probability . When , our tester flips a coin, runs the edge tester with probability , and runs weighted-path-tester with probability . Given and as defined above, the success probability of the edge tester is ; the success probability of weighted-path-tester is given in (16). It follows from Theorem 11 that the average of these two is at least
Acknowledgements
We thank Eric Blais for a helpful discussion that led to an improvement of our lower bound for general hypergrid domains.
References
The monotonicity of is straightforward to verify, as is the fact that . The proof is complete by noticing that the mapping
is a bijection between and . ∎
With Lemma A.1 in hand we are ready to prove the following analogue of Proposition 4.1 for hypergrid domains when is odd. Given the monotone function defined in Lemma A.1, let be the partial function where if , and otherwise (and so ).
defined by (17) below satisfies the following two properties:
If is monotone then is monotone as well.
If is -far from monotone then is -far from monotone.
Fix . For every , we define to be the following function: for all
Since is monotone it follows that is monotone if is monotone, and so it remains to show that is -far from monotone if is -far from monotone. Since is -far from monotone, we have by Theorem 8 that there exist many pairwise disjoint pairs that are violations with respect to ; we will exhibit many pairwise disjoint pairs in that are violations with respect to , which along with another application of Theorem 8 completes the proof.
Using the same notation as in the proof of Proposition 4.1, we define the set-valued function mapping to subsets of as follows:
for all (where we have used our choice of for the inequality), and if . Furthermore, for all and . In words, maps each -input of to a set of many -inputs of , and likewise each -input of to a set of many -inputs of .
For any pair , , that is a violation with respect to , consider pairing the elements of with the elements of via from Lemma A.1 as follows: each , which we will view as , is paired with the unique element where if , and if . Since , it follows from the definitions of and that every is paired with where . Furthermore, as noted above whereas , and so every pair is a violation with respect to . Therefore each of the many pairs that are violations with respect to gives rise to many pairwise disjoint pairs that are violations with respect to . Finally recalling that if , we conclude that there are indeed many pairwise disjoint pairs that are violations with respect to . This finishes the proof. ∎