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 ε>0\varepsilon>0 and oracle access to an unknown Boolean function f:{−1,1}n→{−1,1}f:\{-1,1\}^{n}\to\{-1,1\}, output Yes with probability at least 2/32/3 if ff is monotone, and No with probability at least 2/32/3 if ff is ε\varepsilon-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 nn) 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 ε0>0\varepsilon_{0}>0 such that any non-adaptive algorithm for testing whether an unknown Boolean function is monotone versus ε0\varepsilon_{0}-far from monotone must make Ω(n1/5(log⁡n)−2/5)\Omega(n^{1/5}(\log n)^{-2/5}) queries. Consequently, any adaptive algorithm must make Ω(log⁡n)\Omega(\log n) 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 Ω(n)\Omega(\sqrt{n}) lower bound on the query complexity of any non-adaptive one-sided tester, i.e. one that always outputs Yes when ff is monotone (again, this directly implies an Ω(log⁡n)\Omega(\log n) 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 x≺yx\prec y from some distribution and rejects if and only if some pair that is drawn violates monotonicity. Briët et al. [BCGSM12] proved an Ω(n/(εlog⁡n))\Omega(n/(\varepsilon\log n)) lower bound on the query complexity of pair testers whose query complexity can be written as q(n)/εq(n)/\varepsilon for some function q.q.

In addition to Theorem 1, we show that essentially the same lower bound holds for monotonicity testing of Boolean-valued functions over hypergrid domains {1,…,m}n\{1,\dots,m\}^{n} for m≥2.m\geq 2. (Below and throughout this paper we write [m][m] to denote {1,2,…,m}\{1,2,\dots,m\}.) 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 f:{−1,1}n→{−1,1}f:\{-1,1\}^{n}\to\{-1,1\}; as described above, in the [BO10] construction both the Dyes\mathcal{D}_{yes} and Dno\mathcal{D}_{no} 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 f:{−1,1}n→{−1,1}f:\{-1,1\}^{n}\to\{-1,1\}. Like these earlier works we employ Yao’s principle: we define a Dyes\mathcal{D}_{yes} distribution that is supported on monotone LTFs, and a Dno\mathcal{D}_{no} 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 Dyes\mathcal{D}_{yes} and Dno\mathcal{D}_{no} distributions would result in an Ω(n1/12)\Omega(n^{1/12}) lower bound. To obtain our improved Ω(n1/5log⁡−2/5n)\Omega(n^{1/5}\log^{-2/5}n) 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 {0,1}n\{0,1\}^{n} to {0,1}\{0,1\}.f:{0,1}n→{0,1}f:\{0,1\}^{n}\to\{0,1\}, and let us say that a pair of inputs (x,y)(x,y) with x≺yx\prec y is a violated edge if f(x)=1,f(y)=0f(x)=1,f(y)=0 and (x,y)(x,y) is an edge in {0,1}n\{0,1\}^{n} (i.e. the Hamming distance between them is 1). [CS13a] establishes a very useful “dichotomy theorem” about Boolean functions f:{0,1}n→{0,1}f:\{0,1\}^{n}\to\{0,1\} that are ε\varepsilon-far from monotone: for any s>0s>0, any such function either must have Ω(εs2n)\Omega(\varepsilon s2^{n}) violated edges, or must have a matching (i.e. a vertex-disjoint set) of Ω(ε2n/s)\Omega(\varepsilon 2^{n}/s) violated edges.

3 Preliminaries

We will need a few standard facts from probability theory:

Let G\mathcal{G} be a Gaussian with mean 0 and variance σ2\sigma^{2}. Then for all 0<a<10<a<1 it holds that \operatorname{{\bf Pr}}\big{[}\mathcal{G}\in[0,a\sigma]\big{]}=\Omega(a).

For all c>0c>0 there exists an ε=ε(c)∈(0,1]\varepsilon=\varepsilon(c)\in(0,1] such that the following holds. For all even (resp. odd) nn,

For i∈[n]i\in[n], the influence of coordinate ii on ff, denoted Infi[f]\mathbf{Inf}_{i}[f], is the probability

where x⊕i\boldsymbol{x}^{\oplus i} denotes the string x\boldsymbol{x} with its ii-th coordinate flipped. The following fact relates the influences of an LTF to its degree-11 Fourier coefficients:

The lower bound: Proof of Theorem 2

Let T\mathcal{T} be any deterministic non-adaptive two-sided qq-query algorithm for testing whether a black-box Boolean function f:{−1,1}n→{−1,1}f:\{-1,1\}^{n}\to\{-1,1\} is monotone. Then

We prove Proposition 2.1 in Section 2.1, followed by Proposition 2.2 in Section 2.2.

Since Infi[f]=Ω(1/n)\mathbf{Inf}_{i}[f]=\Omega(1/\sqrt{n}) for all i∈[m]i\in[m], by Fact 1.5 we have that f^(i)=−Ω(1/n)\widehat{f}(i)=-\Omega(1/\sqrt{n}) for all i∈[m]i\in[m]. Hence for all monotone Boolean functions gg, we have

Here the second equality is by Parvseval’s identity; the penultimate equality uses the fact that g^(i)≥0\widehat{g}(i)\geq 0 for all i∈[n]i\in[n], which in turn holds since gg 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 S=X(1)+⋯+X(n)\mathbf{S}=\mathbf{X}^{(1)}+\cdots+\mathbf{X}^{(n)}, where X(j)=σj⋅Q∗j\mathbf{X}^{(j)}=\boldsymbol{\sigma}_{j}\cdot Q_{*j} and σj\boldsymbol{\sigma}_{j} is uniform over {1,3}\{1,3\}; i.e. each X(j)\mathbf{X}^{(j)} is independently Q∗jQ_{*j} with probability 1/21/2 and 3⋅Q∗j3\cdot Q_{*j} with probability 1/21/2. Likewise we may express T=Y(1)+⋯+Y(n)\mathbf{T}=\mathbf{Y}^{(1)}+\cdots+\mathbf{Y}^{(n)}, where Y(j)=νj⋅Q∗j\mathbf{Y}^{(j)}=\boldsymbol{\nu}_{j}\cdot Q_{*j} and νj\boldsymbol{\nu}_{j} is −1-1 with probability 1/101/10 and 7/37/3 with probability 9/109/10. We claim that the X(j)\mathbf{X}^{(j)}’s and Y(j)\mathbf{Y}^{(j)}’s have matching means and covariance matrices; it suffices to check this for X(1)\mathbf{X}^{(1)} and Y(1)\mathbf{Y}^{(1)}. For means, we see that indeed

As for the covariance matrices, we let i1,i2∈[q]i_{1},i_{2}\in[q] and calculate

Similarly, the corresponding entry of Cov⁡[Y(1)]\operatorname{{\bf Cov}}[\mathbf{Y}^{(1)}] is:

Since the X(j)\mathbf{X}^{(j)}’s and Y(j)\mathbf{Y}^{(j)}’s have matching means and covariance matrices, so do their sums S\mathbf{S} and T\mathbf{T}, and so Theorem 5 gives a bound on the differences ∣Pr⁡[S∈O]−Pr⁡[G∈O]∣|\operatorname{{\bf Pr}}[\mathbf{S}\in\mathcal{O}]-\operatorname{{\bf Pr}}[\mathcal{G}\in\mathcal{O}]| and ∣Pr⁡[T∈O]−Pr⁡[G∈O]∣|\operatorname{{\bf Pr}}[\mathbf{T}\in\mathcal{O}]-\operatorname{{\bf Pr}}[\mathcal{G}\in\mathcal{O}]| for the same qq-dimensional Gaussian G\mathcal{G}. Recalling that Xi(j)=σj⋅Qi,j\mathbf{X}^{(j)}_{i}=\boldsymbol{\sigma}_{j}\cdot Q_{i,j} where Qi,j∈{−1,1}nQ_{i,j}\in\{-1,1\}^{n}, we have that Var⁡[Xi(j)]=1\operatorname{{\bf Var}}[\mathbf{X}_{i}^{(j)}]=1, and likewise Var⁡[Yi(j)]=1\operatorname{{\bf Var}}[\mathbf{Y}^{(j)}_{i}]=1. Therefore, two applications of Theorem 5 with τ:=O(1)\tau:=O(1) along with the triangle inequality yields the bound

for all r>0r>0. Choosing r:=(qn)1/4(log⁡n)1/2r:=(qn)^{1/4}(\log n)^{1/2} 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 G\mathcal{G} is the qq-dimensional Gaussian with the same mean and covariance matrix as S\mathbf{S}.

to be the radius-rr region around the orthant boundaries, and partition O\mathcal{O} into Obd:=O∩Wr\mathcal{O}_{bd}:=\mathcal{O}\cap W_{r} (the points in O\mathcal{O} that lie close to the orthant boundaries) and Oin:=O∖Wr\mathcal{O}_{in}:=\mathcal{O}\setminus W_{r} (the points that lie far away from the orthant boundaries). We have

We bound the quantities Δ\Delta and Γ\Gamma separately. For Γ\Gamma, we have that

where (3) is a union bound over all qq dimensions, and (4) uses Fact 1.1 (Gaussian anti-concentration), the fact that Gi\mathcal{G}_{i} 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 Δnear(D)\Delta_{\text{\it near}}(\mathcal{D}) and Δfar(D)\Delta_{\text{\it far}}(\mathcal{D}) sum to the quantity on the left-hand side of (5), and so Δnear(D)+Δfar(D)≥Δ\Delta_{\text{\it near}}(\mathcal{D})+\Delta_{\text{\it far}}(\mathcal{D})\geq\Delta. (In words, since S\mathbf{S} places Δ\Delta more mass on Oin\mathcal{O}_{in} than G\mathcal{G} does, any scheme D\mathcal{D} of moving the mass of S\mathbf{S} to obtain G\mathcal{G} must move at least Δ\Delta amount from within Oin\mathcal{O}_{in} to outside it. Δnear(D)\Delta_{\text{\it near}}(\mathcal{D}) is the amount moved from within Oin\mathcal{O}_{in} to O\mathcal{O}’s boundary Obd\mathcal{O}_{bd}, and Δfar(D)\Delta_{\text{\it far}}(\mathcal{D}) is the rest, moved from within Oin\mathcal{O}_{in} to locations entirely out of O\mathcal{O}.) Since ∥u−v∥2≥r\|u-v\|_{2}\geq r for any pair of points u∈Oinu\in\mathcal{O}_{in} and y∉Oy\notin\mathcal{O}, it follows that

We consider two cases, depending on the relative magnitudes of Δnear(D)\Delta_{\text{\it near}}(\mathcal{D}) and Δfar(D)\Delta_{\text{\it far}}(\mathcal{D}). If Δfar(D)≥Δnear(D)\Delta_{\text{\it far}}(\mathcal{D})\geq\Delta_{\text{\it near}}(\mathcal{D}), we first observe that for all j∈[n]j\in[n] we have \big{\|}\mathbf{X}^{(j)}-\operatorname{{\bf E}}\big{[}\mathbf{X}^{(j)}\big{]}\big{\|}_{2}\leq\tau\sqrt{q} with probability 11, since each of its qq coordinates ii satisfies \big{|}\mathbf{X}^{(j)}_{i}-\operatorname{{\bf E}}\big{[}\mathbf{X}^{(j)}_{i}\big{]}\big{|}\leq\tau with probability 11 by the assumption of the theorem. Therefore we may apply Theorem 7 (Valiant–Valiant CLT) with β:=τq\beta:=\tau\sqrt{q} to get

and hence Δ=O((τq3/2log⁡n)/r)\Delta=O((\tau q^{3/2}\log n)/r), which along with our upper bound on Γ\Gamma completes the proof. If on the other hand Δnear(D)>Δfar(D)\Delta_{\text{\it near}}(\mathcal{D})>\Delta_{\text{\it far}}(\mathcal{D}), then

and again our bound on Γ\Gamma completes the proof. ∎

A lower bound for general hypergrid domains

We prove Theorem 2 via a reduction to the m=2m=2 case (i.e. Theorem 1). The reduction is simpler for even mm so for ease of exposition we assume below that mm 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 f:{−1,1}n→{−1,1}f:\{-1,1\}^{n}\to\{-1,1\} is monotone then Φ[f]\Phi[f] is monotone as well.

If f:{−1,1}n→{−1,1}f:\{-1,1\}^{n}\to\{-1,1\} is ε\varepsilon-far from monotone then Φ[f]\Phi[f] is ε\varepsilon-far from monotone as well.

We will need the following characterization of distance to monotonicity.

For all f:[m]n→{−1,1}f:[m]^{n}\to\{-1,1\} and ε>0\varepsilon>0, we have that ff is ε\varepsilon-far from monotone if and only if there exists εmn\varepsilon m^{n} many pairwise disjoint ordered pairs of vertices (xi,yi)∈[m]n×[m]n(x^{i},y^{i})\in[m]^{n}\times[m]^{n} such that xi≺yix^{i}\prec y^{i} and f(xi)>f(yi)f(x^{i})>f(y^{i}). We will call each such pair a violation with respect to ff.

For every f:{−1,1}n→{−1,1}f:\{-1,1\}^{n}\to\{-1,1\}, we define Φ[f]:[m]n→{−1,1}\Phi[f]:[m]^{n}\to\{-1,1\} to be the function

where we use 1[⋅]{\bf 1}[\cdot] to denote the {±1}\{\pm 1\}-valued indicator where 1[P]=1{\bf 1}[P]=1 if PP is true, and −1-1 otherwise. (Note that m/2m/2 is an integer by our assumption that mm is even.)

It is straightforward to verify that Φ[f]\Phi[f] is monotone if ff is monotone, and so it remains to show that Φ[f]\Phi[f] is ε\varepsilon-far from monotone if ff is ε\varepsilon-far from monotone. Since ff is ε\varepsilon-far from monotone, we have by Theorem 8 that there exist ε2n\varepsilon 2^{n} many pairwise disjoint pairs (xi,yi)∈{−1,1}n×{−1,1}n(x^{i},y^{i})\in\{-1,1\}^{n}\times\{-1,1\}^{n} that are violations with respect to ff; we will exhibit εmn\varepsilon m^{n} many pairwise disjoint pairs in [m]n[m]^{n} that are violations with respect to Φ[f]\Phi[f], 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 x∈{−1,1}nx\in\{-1,1\}^{n} to subsets of [m]n[m]^{n}. Note that ∣S(x)∣=(m/2)n|S(x)|=(m/2)^{n} for all x∈{−1,1}nx\in\{-1,1\}^{n}, and S(x)∩S(y)=∅S(x)\cap S(y)=\emptyset if x≠yx\neq y. Furthermore, Φ[f](x′)=f(x)\Phi[f](x^{\prime})=f(x) for all x∈{−1,1}nx\in\{-1,1\}^{n} and x′∈S(x)x^{\prime}\in S(x). In words, SS maps each 11-input of ff to a set of (m/2)n(m/2)^{n} many 11-inputs of Φ[f]\Phi[f], and likewise each -input of ff to a set of (m/2)n(m/2)^{n} many -inputs of Φ[f]\Phi[f].

For any pair (x,y)∈{−1,1}n×{−1,1}n(x,y)\in\{-1,1\}^{n}\times\{-1,1\}^{n} that is a violation with respect to ff, consider pairing the (m/2)n(m/2)^{n} elements of S(x)S(x) with the (m/2)n(m/2)^{n} elements of S(y)S(y) in the obvious way (i.e. each a=(a1,…,an)∈S(x)a=(a_{1},\dots,a_{n})\in S(x) is is paired with the unique element b=(b1,…,bn)∈S(y)b=(b_{1},\dots,b_{n})\in S(y) that has (aimod  m/2)=(bimod  m/2)(a_{i}\mod m/2)=(b_{i}\mod m/2) for all ii). Since x≺yx\prec y, it follows from the definition of SS that every x′∈S(x)x^{\prime}\in S(x) is paired with y′∈S(y)y^{\prime}\in S(y) where x′≺y′x^{\prime}\prec y^{\prime}. Furthermore, as noted above Φ[f](x′)=f(x)=1\Phi[f](x^{\prime})=f(x)=1 whereas Φ[f](y′)=f(y)=0\Phi[f](y^{\prime})=f(y)=0, and so every pair (x′,y′)∈S(x)×S(y)(x^{\prime},y^{\prime})\in S(x)\times S(y) is a violation with respect to Φ[f]\Phi[f]. Therefore each of the ε2n\varepsilon 2^{n} many pairs (x,y)∈{−1,1}n×{−1,1}n(x,y)\in\{-1,1\}^{n}\times\{-1,1\}^{n} that are violations with respect to ff gives rise to (m/2)n(m/2)^{n} many pairwise disjoint pairs (x′,y′)∈S(x)×S(y)(x^{\prime},y^{\prime})\in S(x)\times S(y) that are violations with respect to Φ[f]\Phi[f]. Finally recalling that S(x)∩S(y)=∅S(x)\cap S(y)=\emptyset if x≠yx\neq y, we conclude that there are indeed ε2n⋅(m/2)n=εmn\varepsilon 2^{n}\cdot(m/2)^{n}=\varepsilon m^{n} many pairwise disjoint pairs that are violations with respect to Φ[f]\Phi[f]. This finishes the proof. ∎

The algorithm

Throughout the proof of our upper bound we will assume that 1/n≤ε≤1/2.1/n\leq\varepsilon\leq 1/2. Note that this is without loss of generality, since if ε<1/n\varepsilon<1/n then the edge tester alone succeeds with probability Ω(ε/n)=Ω(ε2)\Omega(\varepsilon/n)=\Omega(\varepsilon^{2}), and if ε>1/2\varepsilon>1/2 then every ff is ε\varepsilon-close to one of the two constant functions, both of which are monotone.

and will denote d(n,ε)d(n,\varepsilon) simply by dd when the distance parameter ε\varepsilon is clear from the context. For each i∈{0,1,…,n}i\in\{0,1,\ldots,n\} we let Li:={x∈{0,1}n ⁣:∥x∥1=i}L_{i}:=\{x\in\{0,1\}^{n}\colon\|x\|_{1}=i\} denote the ii-th layer, and refer to

First pick a path p\boldsymbol{p} uniformly from the collection of all paths going from 0n0^{n} to 1n1^{n}.

This distribution is a slight variant of the one induced by the [CS13a] path tester, which takes a parameter σ\sigma as input and disallows pairs (x,y)(x,y) for which ∥x−y∥1\|x-y\|_{1} is too small relative to σ\sigma. Our new tester will not sample from D\mathcal{D} (see Section 5.3), but we will use D\mathcal{D} in our analysis. We remark here that x=y\boldsymbol{x}=\boldsymbol{y} with positive probability under D\mathcal{D}.

If x,y\boldsymbol{x},\boldsymbol{y} were chosen independently and uniformly from {0,1}n\{0,1\}^{n}, then the probability that they both land in a fixed set AA of σ2n\sigma 2^{n} points, for some σ∈(0,1)\sigma\in(0,1), would be σ2\sigma^{2}. The following lemma states that the probability is not much lower for a pair drawn from D\mathcal{D}:

and so it suffices to lower bound E\/p[∣pmid∩A∣]\mathop{{\bf E}\/}_{\boldsymbol{p}}[|\boldsymbol{p}_{\text{mid}}\cap A|] by Ω(σn)\Omega(\sigma\sqrt{n}). This is exactly Claim 2.2.1 of [CS13a]; we repeat the calculation here for the sake of completeness:

where we use 1[⋅]{\bf 1}[\cdot] to denote the {0,1}\{0,1\}-valued indicator where 1[P]=1{\bf 1}[P]=1 if PP is true, and otherwise. Here (7) uses the fact that a uniformly random path p\boldsymbol{p} from 0n0^{n} to 1n1^{n} contains a uniformly random point in layer LiL_{i}, and (8) holds since ∣Li∣≤2n/n|L_{i}|\leq 2^{n}/\sqrt{n} for all ii. ∎

We will need a numerical lemma concerning the ratio of binomial coefficients.

Let ε≥1/n\varepsilon\geq 1/n, and a,b∈[(n−d)/2,(n+d)/2]a,b\in[(n-d)/2,(n+d)/2] be integers where a>ba>b. 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 a=(n+d)/2a=(n+d)/2 and b=n/2b=n/2, and so

Then pick a path p\boldsymbol{p} uniformly from the collection of all paths going through 0n0^{n}, x\boldsymbol{x}, and 1n1^{n}.

We get the following corollary from Lemmas 5.1 and 5.2:

As a result, we have for every comparable pair (x,y)(x,y) 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 A⊆{0,1}nA\subseteq\{0,1\}^{n}. For all x∈{0,1}nx\in\{0,1\}^{n} and k∈{0,1,…,n}k\in\{0,1,\ldots,n\}, we define the following quantities:

The following lemma relates the distribution D′\mathcal{D}^{\prime} (more precisely, the distribution over y\boldsymbol{y} that is induced by conditioning on a particular outcome of x\boldsymbol{x}) to the notion of score:

We use the previous two lemmas to lower bound the expected downward AA-score of an x\boldsymbol{x} drawn uniformly at random from AA:

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 AA-score of points x∈Ax\in A; its conclusion may be equivalently rewritten as the following sum:

This follows from (12), (13), and the fact that there are only m+1m+1 many buckets. ∎

Let ε≥1/n\varepsilon\geq 1/n and MM be a matching of σ2n\sigma 2^{n} edges in the middle layers. Let

Next for every edge (x,y)∈M(x,y)\in M we have that

3 The weighted path tester and its analysis

Given a Boolean function ff, recall that a pair (x,y)(x,y) of vertices is a violated pair with respect to ff if x≺yx\prec y and f(x)>f(y)f(x)>f(y). Our algorithm weighted-path-tester for monotonicity testing proceeds as follows:

Pick a path p\boldsymbol{p} uniformly from the collection of all paths going through 0n,y0^{n},\boldsymbol{y} and 1n1^{n}, and set x\boldsymbol{x} to be the (unique) point on p\boldsymbol{p} that has x≺y\boldsymbol{x}\prec\boldsymbol{y} and ∥x−y∥1=k.\|\boldsymbol{x}-\boldsymbol{y}\|_{1}=k.

Reject iff (x,y)(\boldsymbol{x},\boldsymbol{y}) is a violated pair.

We note that an equivalent formulation of step (4) is that x\boldsymbol{x} is drawn uniformly from \big{\{}z\in\{0,1\}^{n}\colon\text{z\prec\boldsymbol{y}andand\|\boldsymbol{y}-z\|_{1}=\boldsymbol{k}}\big{\}}. Below we show that if there is a (σ2n)(\sigma 2^{n})-sized matching MM of violated edges of ff in the middle layers of the hypercube, then the tester above succeeds in finding a violated pair with probability roughly Ω(σ2/n)\Omega(\sigma^{2}/\sqrt{n}).

Let f:{0,1}n→{0,1}f:\{0,1\}^{n}\to\{0,1\} and ε≥1/n\varepsilon\geq 1/n. Suppose there is a (σ2n)(\sigma 2^{n})-sized matching MM of violated edges of ff all lying in the middle layers of the hypercube. Then weighted-path-tester succeeds (i.e. samples x\boldsymbol{x} and y\boldsymbol{y} that form a violated pair with respect to ff) 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 v2nv2^{n} denote the total number of violated edges in ff. We also let σ2n\sigma 2^{n} denote the size of the largest matching of violated edges in the middle layers. Then we have

For any ff that is ε\varepsilon-far from monotone, v⋅σ=Ω(ε2)v\cdot\sigma=\Omega(\varepsilon^{2}).

As mentioned at the beginning of Section 5, we may assume without loss of generality that ε≥1/n\varepsilon\geq 1/n since otherwise the edge tester alone succeeds with probability Ω(ε/n)=Ω(ε2)\Omega(\varepsilon/n)=\Omega(\varepsilon^{2}). When ε≥1/n\varepsilon\geq 1/n, our tester flips a coin, runs the edge tester with probability 1/21/2, and runs weighted-path-tester with probability 1/21/2. Given vv and σ\sigma as defined above, the success probability of the edge tester is Ω(v/n)\Omega(v/n); 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 hh is straightforward to verify, as is the fact that ∣{x∈[m]k ⁣:h(x)=1}∣=∣{x∈[m]k ⁣:h(x)=−1}∣+1|\{x\in[m]^{k}\colon h(x)=1\}|=|\{x\in[m]^{k}\colon h(x)=-1\}|+1. The proof is complete by noticing that the mapping

is a bijection between h−1(−1)h^{-1}(-1) and h−1(1)∖{⌈m/2⌉k}h^{-1}(1)\setminus\{\lceil m/2\rceil^{k}\}. ∎

With Lemma A.1 in hand we are ready to prove the following analogue of Proposition 4.1 for hypergrid domains [m]n[m]^{n} when mm is odd. Given the monotone function hh defined in Lemma A.1, let h′:[m]k→{−1,1,⊥}h^{\prime}:[m]^{k}\to\{-1,1,\bot\} be the partial function where h′(x)=⊥h^{\prime}(x)=\bot if x=⌈m/2⌉kx=\lceil m/2\rceil^{k}, and h′(x)=h(x)h^{\prime}(x)=h(x) otherwise (and so ∣{x∈[m]k ⁣:h(x)=1}∣=∣{x∈[m]k ⁣:h(x)=−1}∣=(mk−1)/2|\{x\in[m]^{k}\colon h(x)=1\}|=|\{x\in[m]^{k}\colon h(x)=-1\}|=(m^{k}-1)/2).

defined by (17) below satisfies the following two properties:

If f:{−1,1}n→{−1,1}f:\{-1,1\}^{n}\to\{-1,1\} is monotone then Φ[f]\Phi[f] is monotone as well.

If f:{−1,1}n→{−1,1}f:\{-1,1\}^{n}\to\{-1,1\} is ε\varepsilon-far from monotone then Φ[f]\Phi[f] is Ω(ε)\Omega(\varepsilon)-far from monotone.

Fix k:=⌈log⁡n⌉k:=\lceil\log n\rceil. For every f:{−1,1}n→{−1,1}f:\{-1,1\}^{n}\to\{-1,1\}, we define Φ[f]:[m]kn→{−1,1}\Phi[f]:[m]^{kn}\to\{-1,1\} to be the following function: for all x1,…,xn∈[m]kx^{1},\ldots,x^{n}\in[m]^{k}

Since hh is monotone it follows that Φ[f]\Phi[f] is monotone if ff is monotone, and so it remains to show that Φ[f]\Phi[f] is Ω(ε)\Omega(\varepsilon)-far from monotone if ff is ε\varepsilon-far from monotone. Since ff is ε\varepsilon-far from monotone, we have by Theorem 8 that there exist ε2n\varepsilon 2^{n} many pairwise disjoint pairs (xi,yi)∈{−1,1}n×{−1,1}n(x^{i},y^{i})\in\{-1,1\}^{n}\times\{-1,1\}^{n} that are violations with respect to ff; we will exhibit Ω(ε mkn)\Omega(\varepsilon\,m^{kn}) many pairwise disjoint pairs in [m]kn[m]^{kn} that are violations with respect to Φ[f]\Phi[f], 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 SS mapping x∈{−1,1}nx\in\{-1,1\}^{n} to subsets of [m]kn[m]^{kn} as follows:

for all x∈{−1,1}nx\in\{-1,1\}^{n} (where we have used our choice of k=⌈log⁡n⌉k=\lceil\log n\rceil for the inequality), and S(x)∩S(y)=∅S(x)\cap S(y)=\emptyset if x≠yx\neq y. Furthermore, Φ[f](x′)=f(x)\Phi[f](x^{\prime})=f(x) for all x∈{−1,1}nx\in\{-1,1\}^{n} and x′∈S(x)x^{\prime}\in S(x). In words, SS maps each 11-input of ff to a set of ((mk−1)/2)n((m^{k}-1)/2)^{n} many 11-inputs of Φ[f]\Phi[f], and likewise each -input of ff to a set of ((mk−1)/2)n((m^{k}-1)/2)^{n} many -inputs of Φ[f]\Phi[f].

For any pair (x,y)∈{−1,1}n×{−1,1}n(x,y)\in\{-1,1\}^{n}\times\{-1,1\}^{n}, x≺yx\prec y, that is a violation with respect to ff, consider pairing the ((mk−1)/2)n((m^{k}-1)/2)^{n} elements of S(x)S(x) with the ((mk−1)/2)n((m^{k}-1)/2)^{n} elements of S(y)S(y) via Ψ\Psi from Lemma A.1 as follows: each a∈S(x)a\in S(x), which we will view as a=(a1,…,an)∈([m]k)na=(a_{1},\ldots,a_{n})\in([m]^{k})^{n}, is paired with the unique element b=(b1,…,bn)∈S(y)b=(b_{1},\dots,b_{n})\in S(y) where bi=aib_{i}=a_{i} if xi=yix_{i}=y_{i}, and bi=Ψ(ai)b_{i}=\Psi(a_{i}) if xi<yix_{i}<y_{i}. Since x≺yx\prec y, it follows from the definitions of SS and Ψ\Psi that every x′∈S(x)x^{\prime}\in S(x) is paired with y′∈S(y)y^{\prime}\in S(y) where x′≺y′x^{\prime}\prec y^{\prime}. Furthermore, as noted above Φ[f](x′)=f(x)=1\Phi[f](x^{\prime})=f(x)=1 whereas Φ[f](y′)=f(y)=0\Phi[f](y^{\prime})=f(y)=0, and so every pair (x′,y′)∈S(x)×S(y)(x^{\prime},y^{\prime})\in S(x)\times S(y) is a violation with respect to Φ[f]\Phi[f]. Therefore each of the ε2n\varepsilon 2^{n} many pairs (x,y)∈{−1,1}n×{−1,1}n(x,y)\in\{-1,1\}^{n}\times\{-1,1\}^{n} that are violations with respect to ff gives rise to Ω(mkn/2n)\Omega(m^{kn}/2^{n}) many pairwise disjoint pairs (x′,y′)∈S(x)×S(y)(x^{\prime},y^{\prime})\in S(x)\times S(y) that are violations with respect to Φ[f]\Phi[f]. Finally recalling that S(x)∩S(y)=∅S(x)\cap S(y)=\emptyset if x≠yx\neq y, we conclude that there are indeed ε2n⋅Ω(mkn/2n)=Ω(ε mkn)\varepsilon 2^{n}\cdot\Omega(m^{kn}/2^{n})=\Omega(\varepsilon\,m^{kn}) many pairwise disjoint pairs that are violations with respect to Φ[f]\Phi[f]. This finishes the proof. ∎