Introduction
When designing algorithms that depend on a probability distribution, it is common to make assumptions about this distribution. Those who engage in this pathological behaviour give many rationalizations: Maybe efficient algorithms are impossible without some assumption, maybe it is more realistic to assume some well-behaved distribution instead of an adversarial one, or maybe it is just too much work to analyze an algorithm under arbitrary distributions. The problem with algorithms designed with distributional assumptions is that they provide no theoretical guarantees when these assumptions fail. Even worse, as we will see, these assumptions are often infeasible to verify: given samples from the distribution, we cannot decide whether our assumptions hold, and therefore the output of the algorithm is not trustworthy.
These distributional assumptions are ubiquitous in property testing. The purpose of this paper is to introduce and study a model of property testing which lets us design algorithms that always provide theoretical guarantees, regardless of the input distribution, yet also avoid the worst-case behaviour of unrestricted input distributions. We call this model distribution-robust testing . Before defining the model, let us illustrate the need for these algorithms with an example.
Example 1.1. Consider the problem of testing monotonicity, one of the most well-studied problems in property testing. A monotonicity tester should, given query access to an input function f : { 0 , 1 } n → { 0 , 1 } f : \{0, 1\}^{n} \to\{0, 1\} f : { 0 , 1 } n → { 0 , 1 } and sample access to a probability distribution D \mathcal{D} D over { 0 , 1 } n \{0, 1\}^{n} { 0 , 1 } n , produce an output which (with probability at least, say, 3 / 4 3/4 3/4 ) satisfies:
If f f f is monotone, the algorithm outputs Accept;
If f f f is ε \varepsilon ε -far from monotone, meaning
ε < dist D ( f , g ) : = Pr x ∼ D [ f ( x ) ≠ g ( x ) ] ∀ monotone functions g , \varepsilon< \operatorname{dist}_{\mathcal{D}}(f,g) := \Pr_{x\sim\mathcal{D}}[f(x) \ne g(x)] \qquad\forall\ \text{monotone functions }g, ε < dist D ( f , g ) := x ∼ D Pr [ f ( x ) = g ( x )] ∀ monotone functions g , the algorithm outputs Reject.
If we make no assumption on the distribution D \mathcal{D} D , so that D \mathcal{D} D is an arbitrary distribution (unknown to the algorithm except through its random samples), testing monotonicity requires 2 Θ ( n ) 2^{\Theta(n)} 2 Θ ( n ) queries [46 ] . But, after decades of effort [37 CS13, 26 , 48 BCS18, CS19, BCS20, 47 BCS23, 11 BCS25] , efficient testers with query cost O ~ ( n ) \widetilde{O}(\sqrt{n}) O ( n ) are known [48 ] , along with matching lower bounds [17 ] , under an assumption: The distribution D \mathcal{D} D is uniform 1 over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n . Similar bounds hold if we weaken the assumption so that D \mathcal{D} D is a product distribution over R n \mathbb{R}^{n} R n [BCS25].
Today’s user of monotonicity testers finds herself in a dilemma: if she is certain that the input D \mathcal{D} D is uniform (or product), then she can run the tester and trust its output. But what if she is not certain? One option is to try to verify the assumption: she could use samples to test that the distribution D \mathcal{D} D is uniform; unfortunately, this is a distribution testing problem that requires 2 Θ ( n ) 2^{\Theta(n)} 2 Θ ( n ) samples [54 ] . So, to trust the output of her algorithm, she must rely on the 2 Θ ( n ) 2^{\Theta(n)} 2 Θ ( n ) upper bound that holds when no assumptions are made. A similar dilemma holds for most other properties, because typical distributional assumptions (usually that the distribution is uniform, Gaussian, or a product distribution) are inefficient [54 , 1 ] or impossible to test.
Our distribution-robust testing model addresses this dilemma. In the parlance of learning theory, distribution-robust testers are ones which can detect if they are being used “out of distribution”, that is, outside of the class of distributions they were designed to handle. We will see that, surprisingly, it is often possible to design algorithms that (a) remain correct when distributional assumptions hold, (b) remain trustworthy by avoiding incorrect answers when the assumptions fail, and (c) are still more efficient than previously studied testers that make no assumptions. We present a variety of techniques for designing distribution-robust testers, and compare them to the existing models.
Distribution-Robust Testing
Here is our definition of distribution-robust testing. Throughout, we will use the notation P \mathbb{P} P for a “property” (i.e., a set of boolean-valued functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } ), and D \mathbb{D} D for a class of probability distributions over the domain X \mathcal{X} X . In standard property testing, D \mathbb{D} D would be interpreted as an assumption on the input distribution D D D , i.e., we assume D ∈ D D \in\mathbb{D} D ∈ D . We want algorithms in our new model to achieve the following: If D ∈ D D \in\mathbb{D} D ∈ D (so the “assumption” holds), the tester should correctly output Accept or Reject. But when D ∉ D D \notin\mathbb{D} D ∈ / D (the “assumption” fails), the tester should not output an incorrect answer. To accomplish this, we need to allow a third output: Abstain. Formally:
Definition 1.2 (Distribution-Robust Testing). Let X \mathcal{X} X be a domain, let P \mathbb{P} P be a property (i.e., a set) of functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } , and let D \mathbb{D} D be a set of probability distributions over X \mathcal{X} X . As input, the algorithm is given parameters ε , δ > 0 \varepsilon, \delta> 0 ε , δ > 0 , query access to a function f : X → { 0 , 1 } f : \mathcal{X} \to\{0,1\} f : X → { 0 , 1 } and access to labeled samples ( x , f ( x ) ) x ∼ D (x, f(x))_{x \sim D} ( x , f ( x ) ) x ∼ D for an arbitrary probability distribution D D D . Its output should, with probability at least 1 − δ 1-\delta 1 − δ , satisfy:
Completeness. If f ∈ P f \in\mathbb{P} f ∈ P (the function has the property), the algorithm outputs either Accept or Abstain;
Soundness. If f f f is ε \varepsilon ε -far from P \mathbb{P} P under D D D (i.e., dist D ( f , g ) > ε \operatorname{dist}_{D}(f,g) > \varepsilon dist D ( f , g ) > ε for all g ∈ P g \in\mathbb{P} g ∈ P ), the algorithm outputs either Reject or Abstain.
Assertiveness. If D ∈ D D \in\mathbb{D} D ∈ D , the algorithm does not output Abstain.
We call a tester satisfying this definition a D \mathbb{D} D -robust tester for P \mathbb{P} P , or a distribution-robust tester for P \mathbb{P} P with respect to D \mathbb{D} D .
Distribution-robust testers enjoy standard success probability amplification by majority vote of O ( log ( 1 / δ ) ) O(\log(1/\delta)) O ( log ( 1/ δ )) runs, each with failure probability (say) 1 / 4 1/4 1/4 . When δ \delta δ is not specified, we take δ = 1 / 4 \delta= 1/4 δ = 1/4 .
Our definition of distribution-robust testing is strongly inspired by the recent testable learning algorithms of Rubinfeld and Vasilyan [55 ] , which provide an elegant solution to a similar dilemma occurring in learning theory: time-efficient agnostic learning algorithms for halfspaces were known when the distribution D D D is assumed to be Gaussian or uniform, but no efficient algorithms are known without assumptions on D D D ; furthermore, it is prohibitively expensive to test the assumptions. Testable learning allowed efficient algorithms with no assumptions, and there is now a rapidly growing literature on testable learning [39 DKK$^{+}$23, 40 , 41 , 31 STV24, 49 CKK$^{+}$24, 50 , 42 , 51 , 29 , 9 ] .
A more general framework of “testable algorithms”, which are capable of efficiently checking their own assumptions, is in our opinion extremely natural and desirable. A couple of papers have begun extending this framework outside of learning theory: there are distribution testing algorithms which test their assumptions on the quality of sample labels [35 ] , and triangle-counting algorithms which use testable arboricity assumptions [ERV26]. Our paper brings the framework to property testing, which is to say, “testable testing”.
To distinguish and compare our model to existing property testing models, let us give a definition of property testing that captures essentially all known property testing algorithms:
Definition 1.3 (Distribution-Specific and Distribution-Free Testing). Let X \mathcal{X} X be a domain, let P \mathcal{P} P be a property (i.e., a set) of functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } , and let D \mathcal{D} D be a set of probability distributions over X \mathcal{X} X . As input, the algorithm is given parameters ε , δ > 0 \varepsilon,\delta> 0 ε , δ > 0 , query access to a function f : X → { 0 , 1 } f : \mathcal{X} \to\{0,1\} f : X → { 0 , 1 } and access to labeled samples ( x , f ( x ) ) x ∼ D (x,f(x))_{x \sim D} ( x , f ( x ) ) x ∼ D for some probability distribution D ∈ D D \in\mathcal{D} D ∈ D . Its output should, with probability at least 1 − δ 1-\delta 1 − δ , satisfy:
Completeness. If f ∈ P f \in\mathcal{P} f ∈ P , the algorithm outputs Accept;
Soundness. If f f f is ε \varepsilon ε -far from P \mathcal{P} P under D D D , the algorithm outputs Reject.
We call an algorithm satisfying this definition a D \mathcal{D} D -specific tester for P \mathcal{P} P , or a tester for P \mathcal{P} P with respect to D \mathcal{D} D . If D \mathcal{D} D is the set of all probability distributions over X \mathcal{X} X , we say the tester is distribution-free.
This definition of distribution-specific property testing is not standard, so let us briefly explain how it captures known results in the field. Following the introduction of general distributions D \mathcal{D} D (as opposed to the uniform distribution) to the study of property testing [38 ] , the majority of property testers fall into two special cases. In the first case, D = { D ∗ } \mathcal{D} = \{D^*\} D = { D ∗ } is a singleton set, meaning that the input distribution D D D is assumed to be a specific well-behaved distribution D ∗ D^* D ∗ (typically the uniform distribution over domain X \mathcal{X} X , or the Gaussian distribution over R n \mathbb{R}^n R n ); this includes the majority of results in the field, so we shall not cite any specific examples.
This case also includes some “algorithm templates” which give testers for any fixed singleton set D = { D ∗ } \mathcal{D} = \{D^*\} D = { D ∗ } where D ∗ D^* D ∗ belongs to a class D \mathcal{D} D ; in other words, for every distribution D ∗ D^* D ∗ in some class D \mathcal{D} D , there is a { D ∗ } \{D^*\} { D ∗ } -specific tester that assumes the input D = D ∗ D = D^* D = D ∗ ; for example, [13 , 4 ] give { D ∗ } \{D^*\} { D ∗ } -specific tester for every distribution D ∗ D^* D ∗ among a class of distributions.
In the second case, D \mathcal{D} D is the set of all distributions, meaning that the algorithm makes no assumption on D D D ; this is called distribution-free testing [46 , 45 , 43 , 28 , 22 , 15 , 36 , 10 , 23 CFP24] .
A smaller number of testers satisfy the more general distribution-specific definition by letting D \mathcal{D} D be a wider class of distributions; see for example [BCS20, HY22, BCS25] which assume product distributions over R n \mathbb{R}^n R n , or [44 ] which assumes rotation-invariant distributions over R n \mathbb{R}^n R n .
Results
The goal of this paper is to define and motivate the distribution-robust model and answer the most basic questions about it. To begin with, it holds by definition that, for any class D \mathcal{D} D of distributions, the query and sample complexity of testing satisfies
D -specific ≤ D -robust ≤ distribution-free , \mathcal{D}\text{-specific} \quad\leq\quad\mathcal{D}\text{-robust} \quad\leq\quad\text{distribution-free}, D -specific ≤ D -robust ≤ distribution-free ,
so distribution-robust testing is indeed comparable with standard models of testing, and we will compare them. In particular, we show:
Most importantly, there are natural and well-studied properties where distribution-robust testing is significantly more efficient than distribution-free testing;
More generally, we give upper- and lower-bounds separating distribution-robust testing from the distribution-free and distribution-specific testing models; and
We present a variety of general algorithmic techniques for designing distribution-robust testers, from which most of our results follow as corollaries.
In this section we will go into more detail on items 1 and 2 above. In § 1.4 we will describe our algorithmic techniques, state our formal theorems, and give brief proof overviews. This paper will present results for the following properties P \mathcal{P} P of boolean functions:
Monotone functions: Functions f : R n → { 0 , 1 } f: \mathbb{R}^{n} \to\{0,1\} f : R n → { 0 , 1 } where x ⪯ y ⇒ f ( x ) ≤ f ( y ) x \preceq y \Rightarrow f(x) \le f(y) x ⪯ y ⇒ f ( x ) ≤ f ( y ) where x ⪯ y x \preceq y x ⪯ y is according to the natural partial ordering on R n \mathbb{R}^{n} R n .
Conjunctions: Functions f : { 0 , 1 } n → { 0 , 1 } f: \{0,1\}^{n} \to\{0,1\} f : { 0 , 1 } n → { 0 , 1 } of the form f ( x ) = ⋀ ℓ i ∈ S ℓ i f(x) = \bigwedge_{\ell_i \in S} \ell_i f ( x ) = ⋀ ℓ i ∈ S ℓ i where S S S is a subset of the literals x 1 , ¬ x 1 , … , x n , ¬ x n x_1, \neg x_1, \ldots, x_n, \neg x_n x 1 , ¬ x 1 , … , x n , ¬ x n .
1-Decision Lists: Functions f : { 0 , 1 } n → { 0 , 1 } f: \{0,1\}^{n} \to\{0,1\} f : { 0 , 1 } n → { 0 , 1 } where there is an ordered list ( α 1 , β 1 ) , … , ( α k , β k ) , ( ∗ , β k + 1 ) (\alpha_1,\beta_1), \ldots, (\alpha_k,\beta_k), (*,\beta_{k+1}) ( α 1 , β 1 ) , … , ( α k , β k ) , ( ∗ , β k + 1 ) where each α i \alpha_i α i is a literal (i.e., an input variable x j x_j x j or ¬ x j \neg x_j ¬ x j ) and each β i ∈ { 0 , 1 } \beta_i \in\{0,1\} β i ∈ { 0 , 1 } , such that, on input x x x , the output f ( x ) = β i f(x) = \beta_i f ( x ) = β i where i i i is the smallest value such that x x x satisfies α i \alpha_i α i , or i = k + 1 i = k + 1 i = k + 1 if none of the literals α j \alpha_j α j are satisfied.
Unions of k k k Intervals: Functions f : [ 0 , 1 ] → { 0 , 1 } f: [0,1] \to\{0,1\} f : [ 0 , 1 ] → { 0 , 1 } that are the indicator functions of sets S = ⋃ i = 1 k I i S = \bigcup_{i=1}^{k} I_i S = ⋃ i = 1 k I i , where each I i ⊆ [ 0 , 1 ] I_i \subseteq[0,1] I i ⊆ [ 0 , 1 ] is an interval.
Qualitative Results
We begin with a qualitative summary of our results and leave the quantitative bounds for the section below. We establish the following figure (Figure 1 ) of pairwise comparisons between different models of testing. We distinguish between testers that are allowed to use adaptive queries, non-adaptive queries (i.e., the algorithm receives its samples upfront, and then decides the full set of query points before making any of the queries), and sample-based testers (which only see labeled samples and cannot choose their queries).
Figure 1. Summary of separations between models. Each node represents a model in { D -specific , D -robust , distr.-free } × { adaptive , non-adaptive , sample-based } \{\mathcal{D}\text{-specific},\mathcal{D}\text{-robust},\text{distr.-free}\}\times\{\text{adaptive},\text{non-adaptive},\text{sample-based}\} { D -specific , D -robust , distr.-free } × { adaptive , non-adaptive , sample-based } . An arrow A → B A \to B A → B means that the cost of a tester in model A A A is at most the cost in model B B B . A slashed arrow means there is an example where the cost in model A A A is significantly less than the cost in model B B B , and the edge labels list the examples. Edges that do not touch a distribution-robust endpoint are omitted.
We would also like to emphasize two interesting separations that do not fit into Figure 1 : There are examples where distribution-robust testing is much more efficient than distribution-free, even when the distribution-robust tester is non-adaptive (§ 1.7 ) or sample-based (§ 1.9 ) while the distribution-free tester is allowed to be adaptive .
Quantitative Results
To describe our results quantitatively, it is convenient to present them in a table; see Table 1 . Note that each row of the table shows that distribution-robust testing is more efficient than distribution-free testing. Moreover, as many rows exhibit, distribution-robust testing often achieves the same efficiency as the distribution-specific testing result but with a stronger qualitative guarantee.
Table 1. A comparison of bounds (total sample and query complexity) for testing various classes of boolean functions. The O ~ ( ⋅ ) \widetilde{O}(\cdot) O ( ⋅ ) notation hides factors polylogarithmic in its argument. When ε \varepsilon ε does not appear in the bound, the big-O O O notation hides a factor poly ( 1 / ε ) \operatorname{poly}(1/\varepsilon) poly ( 1/ ε ) . All results are for singleton D \mathcal{D} D comprising the uniform distribution over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n (or [ 0 , 1 ] [0,1] [ 0 , 1 ] for k k k -Intervals), except when D \mathcal{D} D is the class of product distributions over R n \mathbb{R}^{n} R n in the second row.
While most of our results are positive, we also show a lower bound of Ω ~ ( n 1 / 4 ) \widetilde{\Omega}(n^{1/4}) Ω ( n 1/4 ) for distribution-robust testing of monotonicity. This lower bound exemplifies another reason why the distribution-robust model is interesting, which is that it can reveal a new sort of brittleness or fragility in property testers. It is well known that that there can be large gaps in complexity between algorithms designed for specific distributions and those which must be correct on arbitrary distributions (e.g., the known O ( n ) O(\sqrt{n}) O ( n ) vs. 2 Θ ( n ) 2^{\Theta(n)} 2 Θ ( n ) bounds for testing monotonicity in the uniform vs. distribution-free models). Our lower bound shows that a similar exponential gap appears even if the tester doesn’t need to be correct on arbitrary distributions, but only needs to detect that it is being used “out of distribution”, where it has no correctness guarantee.
Companion Paper: Halfspaces
Whereas the goal of the present paper is to give a general introduction to the distribution-robust testing model, including some initial positive results, a companion paper [19 ] gives a more focused and technically challenging study of a single property: halfspaces.
A halfspace is a function f : R n → { 0 , 1 } f:\mathbb{R}^{n}\to\{0,1\} f : R n → { 0 , 1 } of the form f ( x ) = 1 [ ⟨ w , x ⟩ ≥ t ] f(x)=\mathbf{1}[\langle w,x\rangle\ge t] f ( x ) = 1 [⟨ w , x ⟩ ≥ t ] for some vector w ∈ R n w\in\mathbb{R}^{n} w ∈ R n and threshold t ∈ R t\in\mathbb{R} t ∈ R . There are halfspace testers with respect to the standard Gaussian, or the uniform distribution over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n , that use only poly ( 1 / ε ) \operatorname{poly}(1/\varepsilon) poly ( 1/ ε ) queries [53 ] . If only samples are allowed, Θ ~ ( n ) \widetilde{\Theta}(\sqrt{n}) Θ ( n ) samples are necessary and sufficient when the distribution is assumed to be the standard Gaussian [4 ] or merely rotation-invariant [44 ] . On the other hand, distribution-free halfspace testing requires Ω ~ ( n ) \widetilde{\Omega}(n) Ω ( n ) samples [10 ] and essentially the same number of queries [23 ] .
The companion paper [19 ] shows that distribution-robust halfspace testing can be done with O ~ ( n 2 / 3 ) \widetilde{O}(n^{2/3}) O ( n 2/3 ) queries, significantly better than Ω ~ ( n ) \widetilde{\Omega}(n) Ω ( n ) required for distribution-free testing. On the other hand, it shows that sample-based distribution-robust testers with respect to the standard Gaussian require Ω ~ ( n 2 / 3 ) \widetilde{\Omega}(n^{2/3}) Ω ( n 2/3 ) samples, not as efficient as the Θ ~ ( n ) \widetilde{\Theta}(\sqrt{n}) Θ ( n ) bound for distribution-specific testing.
Techniques and Theorem Statements
Let us now describe our algorithmic techniques. We present four general techniques, from which most of our results follow as corollaries or consequences. The most important of these is distribution-picky testing : all of our algorithms (except the one sample-based algorithm) work by a general reduction from distribution-robust testing to distribution-picky testing. The remaining three techniques are:
Testing by function reconstruction (§ 1.6 and § 3 ), which is a broad generalization of the classic testing-by-learning approach of [38 ] . Testing-by-learning immediately gives us some initial non-adaptive testers for monotonicity, conjunctions, and decision lists.
Approximation by juntas (§ 1.7 and § 4 ), which allows us to design more efficient function reconstructors for conjunctions and decision lists, and gives adaptive algorithms for these classes that improve on the earlier non-adaptive ones.
Distribution testing and refinements thereof (§ 1.8 and § 5 ), which are the starting point toward our main result for unions of intervals (obtained via a targeted argument).
Our sample-based results for conjunctions use ad-hoc arguments (§ 1.9 and § 6 ).
Finally, we describe our lower bounds for non-adaptive monotonicity testing in § 1.10 and § 7 .
Algorithmic Technique 0: Distribution-Picky Testing
A challenge with designing distribution-robust testers is that, unlike standard testers, we may encounter the following puzzle: upon seeing query and sample results that we would not expect in the case f ∈ P f \in\mathcal{P} f ∈ P and D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D , it can be unclear whether we are allowed to Abstain (because D ∉ D \mathcal{D} \notin\mathbb{D} D ∈ / D ) or we must Reject (because f ∉ P f \notin\mathbb{P} f ∈ / P but D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D ). Accordingly, the most helpful concept for distribution-robust testing that we have found so far is to define a weaker model called distribution-picky testing , which we show simplifies this choice in some situations. All of our upper bounds, except the one sample-based algorithm, will use this concept (and the upper- and lower-bounds for halfspaces in the companion paper [19 ] use it too).
Definition 1.4 (Distribution-Picky Testing). Let X \mathcal{X} X be a domain , let P \mathbb{P} P be a property (i.e., a set) of functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } , and let D \mathbb{D} D be a set of probability distributions over X \mathcal{X} X . As input, the algorithm is given parameters ε , δ > 0 \varepsilon, \delta> 0 ε , δ > 0 , query access to a function f : X → { 0 , 1 } f : \mathcal{X} \to\{0,1\} f : X → { 0 , 1 } and access to labeled samples ( x , f ( x ) ) x ∼ D (x, f(x))_{x \sim\mathcal{D}} ( x , f ( x ) ) x ∼ D for some probability distribution D \mathcal{D} D . Its output should, with probability at least 1 − δ 1-\delta 1 − δ , satisfy:
Completeness. If f ∈ P f \in\mathbb{P} f ∈ P and D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D , the algorithm outputs Accept;
Soundness. If f f f is ε \varepsilon ε -far from P \mathbb{P} P under D \mathcal{D} D , the algorithm outputs Reject.
We call an algorithm satisfying this definition a D \mathbb{D} D -picky tester for P \mathbb{P} P , or a distribution-picky tester for P \mathbb{P} P with respect to D \mathbb{D} D .
Compared to a distribution-free tester, a distribution-picky tester is only required to output Accept under the additional condition that D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D (hence it is “picky” about the distributions it accepts). Compared to a distribution-robust tester, it is allowed to output Reject when D ∉ D \mathcal{D} \notin\mathbb{D} D ∈ / D , even if f ∈ P f \in\mathbb{P} f ∈ P . A distribution-robust tester can be transformed into a distribution-picky tester by replacing every Abstain with a Reject, so lower bounds on distribution-picky testing imply lower bounds for distribution-robust testing.
Less obvious is that, when queries are allowed, we can also turn distribution-picky testers for singleton classes D = { D ∗ } \mathbb{D} = \{\mathcal{D}^*\} D = { D ∗ } (as well as more general classes that admit “sample simulators”, see Definition 2.1 ) into distribution-robust testers. The idea is:
Run the distribution-picky tester O ( 1 ) O(1) O ( 1 ) times using the input distribution D \mathcal{D} D ;
Run the distribution-picky tester O ( 1 ) O(1) O ( 1 ) times using the input distribution D ∗ \mathcal{D}^* D ∗ (known to the algorithm since it is fixed);
Output their majority answers if the two experiments have similar acceptance probability, otherwise output Abstain.
The resulting tester satisfies the assertiveness condition of distribution-robust testing because Steps 1 and 2 are identical when D = D ∗ \mathcal{D} = \mathcal{D}^* D = D ∗ ; its soundness is immediate from the soundness of the picky tester in Step 1; and its completeness comes from Step 2, hinging on the fact that the condition f ∈ P f \in\mathbb{P} f ∈ P is independent from the input distribution. This reduction greatly simplifies the task of designing distribution-robust testers. Let us move on to our techniques for designing picky testers.
Algorithmic Technique I: Picky Testing by Function Reconstruction
A staple of property testing is the testing-by-learning technique of [38 ] . The idea is that, for any class P \mathbb{P} P of functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } and any class of distributions D \mathbb{D} D over X \mathcal{X} X , if there is a proper learner for P \mathbb{P} P under D \mathbb{D} D , with query cost q ( ε ) q(\varepsilon) q ( ε ) , then there is a distribution-specific tester for P \mathbb{P} P under D \mathbb{D} D with cost q ( ε / 2 ) + O ( 1 / ε ) q(\varepsilon/2) + O(1/\varepsilon) q ( ε /2 ) + O ( 1/ ε ) . Recall that this works as follows:
Run the proper learning algorithm on input f f f and distribution D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D to get function h ∈ P h \in\mathbb{P} h ∈ P . If f ∈ P f \in\mathbb{P} f ∈ P then this will (with high probability) satisfy dist D ( f , h ) < ε / 2 \operatorname{dist}_{\mathcal{D}}(f,h) < \varepsilon/2 dist D ( f , h ) < ε /2 .
Query f f f and h h h on O ( 1 / ε ) O(1/\varepsilon) O ( 1/ ε ) random points x ∼ D x \sim\mathcal{D} x ∼ D to test that dist D ( f , h ) < ε \operatorname{dist}_{\mathcal{D}}(f,h) < \varepsilon dist D ( f , h ) < ε .
But, in fact, we can observe that this is stronger than a distribution-specific tester: it is distribution-picky! The correctness of step 2 for the case when f f f is far from P \mathbb{P} P under D \mathcal{D} D does not require that D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D , so the tester only passes if dist D ( f , h ) < ε \operatorname{dist}_{\mathcal{D}}(f,h) < \varepsilon dist D ( f , h ) < ε , regardless of whether D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D . This means that, using our reduction above, we can immediately get distribution-robust testers for singleton classes D = { D ∗ } \mathbb{D} = \{\mathcal{D}^*\} D = { D ∗ } that are significantly more efficient than distribution-free testers, as long as proper learning under D ∗ \mathcal{D}^* D ∗ is more efficient than distribution-free testing.
This is the case for monotone functions, conjunctions, and decision lists under D ∗ = Unif ( { 0 , 1 } n ) \mathcal{D}^* = \operatorname{Unif}(\{0,1\}^n) D ∗ = Unif ({ 0 , 1 } n ) , which immediately grants us the following results. Using the proper learner of [52 ] for monotone functions:
Theorem 1.5. There is a non-adaptive { Unif ( { 0 , 1 } n ) } \{\operatorname{Unif}(\{0,1\}^n)\} { Unif ({ 0 , 1 } n )} -robust tester for monotone functions { 0 , 1 } n → { 0 , 1 } \{0,1\}^n \to\{0,1\} { 0 , 1 } n → { 0 , 1 } with query, sample, and time cost n O ( n / ε ) n^{O(\sqrt{n/\varepsilon})} n O ( n / ε ) .
This is compared with the 2 Ω ( n ) 2^{\Omega(n)} 2 Ω ( n ) lower bound for distribution-free testing of monotone functions [46 ] . Next, using a straightforward approach to learning conjunctions and decision lists (Fact 3.12) we obtain:
Theorem 1.6. The classes of conjunctions and 1-decision lists have non-adaptive distribution-robust testing-by-learning algorithms, with respect to D = { Unif ( { 0 , 1 } n ) } \mathbb{D} = \{\operatorname{Unif}(\{0,1\}^n)\} D = { Unif ({ 0 , 1 } n )} , with sample complexity O ( 1 / ε ) O(1/\varepsilon) O ( 1/ ε ) and non-adaptive query complexity O ( log ( n ) log ( 1 / ε ) ε ) O\left(\frac{\log(n)\log(1/\varepsilon)}{\varepsilon}\right) O ( ε l o g ( n ) l o g ( 1/ ε ) ) .
This is an exponential improvement over the distribution-free bounds of Θ ~ ( n 1 / 3 ) \widetilde{\Theta}(n^{1/3}) Θ ( n 1/3 ) for conjunctions [28 ] and Ω ~ ( n ) \widetilde{\Omega}(\sqrt{n}) Ω ( n ) for 1-decision lists [CFP24]. But we can also go beyond basic testing-by-learning; here are two ways:
Function reconstruction. The first way is by generalizing proper learning to what we call function reconstruction (Definition 3.2 ). For a property P \mathbb{P} P and input function f f f , a function reconstructor is an algorithm which draws samples and makes queries to f f f , and then outputs a query simulator G f G_f G f . The query simulator takes input queries x x x , makes its own queries to f f f , and then outputs a value g ( x ) g(x) g ( x ) . With high probability, this function g g g should satisfy
dist D ( g , P ) < ε \operatorname{dist}_{\mathcal{D}}(g,\mathbb{P}) < \varepsilon dist D ( g , P ) < ε (i.e., g g g itself is close to the property); and
If f ∈ P f \in\mathbb{P} f ∈ P and D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D , then dist D ( f , g ) < ε \operatorname{dist}_{\mathcal{D}}(f,g) < \varepsilon dist D ( f , g ) < ε .
This is just like a proper learner except that the output is only close to proper, and also it does not need to output an explicit description of g g g , only an algorithm that simulates it. This allows us to use a variety of techniques from the literature on local correction to design more efficient function reconstructors; we will elaborate on this when we discuss Algorithmic Technique II.
Sample simulators. The second way to improve on the basic testing-by-learning approach is to allow some non-singleton classes of distributions D \mathbb{D} D . Given samples from a distribution D \mathcal{D} D , a sample simulator produces samples from another distribution D ′ ∈ D \mathcal{D}' \in\mathbb{D} D ′ ∈ D such that, if D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D , then D = D ′ \mathcal{D} = \mathcal{D}' D = D ′ . For example, if D \mathbb{D} D is the class of product distributions over R n \mathbb{R}^n R n , then by drawing n n n samples x ( 1 ) , … , x ( n ) ∼ D x^{(1)},\ldots,x^{(n)} \sim\mathcal{D} x ( 1 ) , … , x ( n ) ∼ D from an arbitrary distribution (not necessarily product), we can combine them into one sample point ( x 1 ( 1 ) , … , x n ( n ) ) (x_1^{(1)}, \ldots, x_n^{(n)}) ( x 1 ( 1 ) , … , x n ( n ) ) which is distributed as the product distribution with the same marginals as D \mathcal{D} D . As long as we have a sample simulator, we can do the reduction from distribution-robust testing to distribution-picky testing.
In this way, applying a proper learning algorithm of [47 , 14 ] for monotone functions R n → { 0 , 1 } \mathbb{R}^n \to\{0,1\} R n → { 0 , 1 } under the class D p r o d , r e a l \mathcal{D}_{\mathrm{prod,real}} D prod , real of product distributions, we can improve our result for monotonicity:
Theorem 1.7. There is a non-adaptive distribution-robust monotonicity tester over R n \mathbb{R}^n R n , with respect to the set D p r o d , r e a l \mathcal{D}_{\mathrm{prod,real}} D prod , real of product distributions, using 2 O ~ ( n / ε ) 2^{\widetilde{O}(\sqrt{n}/\varepsilon)} 2 O ( n / ε ) samples and queries.
Algorithmic Technique II: Approximation by Juntas
While proper learning is a useful first example of function reconstruction, there are natural cases where more efficient reconstruction is possible. Using ideas from “testing by implicit learning” [56 ] and local correction, we show that the classes of conjunctions and 1-decision lists admit function reconstructors, and hence distribution-robust testers, with essentially optimal O ~ ( 1 / ε ) \widetilde{O}(1/\varepsilon) O ( 1/ ε ) cost.
Specifically, several prior works [33 , 3 , 16 ] have provided methods of roughly the following form: Let J ⊆ P \mathcal{J} \subseteq\mathcal{P} J ⊆ P be a subset of the function class that depend on only a small number of variables k k k , i.e., the subclass of k k k -juntas within P \mathcal{P} P . Given a function f f f that is in P \mathcal{P} P (or maybe just close to P \mathcal{P} P ), output a procedure which, given a query x x x , makes some queries to f f f , and then outputs the value g ( x ) g(x) g ( x ) for some g ∈ J g \in\mathcal{J} g ∈ J that is close to f f f under the uniform distribution. In other words, the method provides query access to a k k k -junta g g g that approximates f f f . For example, [3 ] construct self-correctors (which query f f f on a uniformly random set of points to compute g ( x ) g(x) g ( x ) ), and [16 ] uses restrictions (identify a subset S S S of the variables and permanently fix their values).
These “local correction” algorithms assume that f f f itself is close to P \mathcal{P} P , which means that, if f f f is far from P \mathcal{P} P , the simulated function g g g is not guaranteed to have the properties we require from the output of a function reconstructor. By combining these procedures with testers for the subclass J \mathcal{J} J (which can be much cheaper than testers for the whole class P \mathcal{P} P ), we can ensure that the simulated function g g g is in P \mathcal{P} P (or close to it) and satisfy the requirements of a function reconstructor.
Using adaptive algorithms of [16 ] , we get adaptive testers for conjunctions and 1-decision lists that are more efficient than those from testing-by-learning, and in particular are independent of n n n :
Theorem 1.8. There are distribution-robust testers for conjunctions and 1-decision lists over { 0 , 1 } n \{0,1\}^n { 0 , 1 } n , with respect to D = { Unif ( { 0 , 1 } n ) } \mathbb{D} = \{\operatorname{Unif}(\{0,1\}^n)\} D = { Unif ({ 0 , 1 } n )} , using O ~ ( 1 / ε ) \widetilde{O}(1/\varepsilon) O ( 1/ ε ) samples and adaptive queries.
Since q q q adaptive queries can be simulated with 2 q 2^q 2 q non-adaptive ones, this also gives non-adaptive testers with query cost 2 O ~ ( 1 / ε ) 2^{\widetilde{O}(1/\varepsilon)} 2 O ( 1/ ε ) for these classes, compared with O ( log n ) O(\log n) O ( log n ) above. Using the self-correctors of [3 ] , we also give a non-adaptive tester for conjunctions that is only quadratically worse than the adaptive one:
Theorem 1.9. There is a distribution-robust tester for conjunctions over { 0 , 1 } n \{0,1\}^n { 0 , 1 } n , with respect to D = { Unif ( { 0 , 1 } n ) } \mathbb{D} = \{\operatorname{Unif}(\{0,1\}^n)\} D = { Unif ({ 0 , 1 } n )} , using O ( 1 / ε ) O(1/\varepsilon) O ( 1/ ε ) samples and O ~ ( 1 / ε 2 ) \widetilde{O}(1/\varepsilon^2) O ( 1/ ε 2 ) non-adaptive queries.
Algorithmic Technique III: Distribution Testing
It is a good exercise to show that, equipped with a distribution tester for a singleton D = { D ∗ } \mathbb{D} = \{\mathcal{D}^*\} D = { D ∗ } , i.e., an identity tester, we can turn a distribution-specific tester for P \mathcal{P} P into a distribution-picky (and therefore distribution-robust one): informally, an identity tester ensures that dist T V ( D , D ∗ ) < ε \operatorname{dist}_{\mathrm{TV}}(\mathcal{D},\mathcal{D}^*) < \varepsilon dist TV ( D , D ∗ ) < ε (else we abstain), and in this case a { D ∗ } \{\mathcal{D}^*\} { D ∗ } -specific tester can stand in for a { D } \{\mathcal{D}\} { D } -specific tester.
More interestingly, one can replace a full-fledged identity tester with a weaker variant recently systematized in [9 ] that is only “sensitive” to a class of distinguisher s (here, P \mathbb{P} P ). Very briefly, the weaker variant only needs to reject distributions D \mathcal{D} D whose non-membership in D \mathbb{D} D is witnessed by a distinguisher h ∈ P h \in\mathbb{P} h ∈ P via ∣ E D [ h ] − E D ∗ [ h ] ∣ > ε \lvert\mathbb{E}_{\mathcal{D}}[h] - \mathbb{E}_{\mathcal{D}^*}[h] \rvert> \varepsilon ∣ E D [ h ] − E D ∗ [ h ]∣ > ε , whereas standard distribution testing must work against all Boolean-valued distinguishers h h h . Together with results for testing distributions against k k k -interval distinguishers [32 ] and testing unions of intervals under Unif ( [ 0 , 1 ] ) \operatorname{Unif}([0,1]) Unif ([ 0 , 1 ]) [4 ] , this gives a distribution-robust tester for unions of k k k intervals using O ( k ) O(\sqrt{k}) O ( k ) queries and samples.
It turns out that we can improve upon the above black-box result with a targeted argument. We extend the structural result of [4 ] for distribution-specific testing, linking distance to the class of unions of k k k intervals with a notion of noise sensitivity, to get our main result for this class:
Theorem 1.10. For every distribution D ∗ \mathcal{D}^* D ∗ over [ 0 , 1 ] [0,1] [ 0 , 1 ] , there is a { D ∗ } \{\mathcal{D}^*\} { D ∗ } -robust tester for unions of k k k intervals, with non-adaptive query and sample cost O ( 1 / ε 4 ) O(1/\varepsilon^4) O ( 1/ ε 4 ) .
Sample-Based Testing of Conjunctions
Not all of our results follow from general techniques. In particular, to separate sample-based distribution-robust testing from distribution-free testing, we give an ad-hoc sample-based tester for conjunctions which matches the query complexity of the testing-by-learning Theorem 1.6:
Theorem 1.11. There is a sample-based distribution-robust tester for conjunctions over { 0 , 1 } n \{0,1\}^n { 0 , 1 } n , with respect to D = { Unif ( { 0 , 1 } n ) } \mathbb{D} = \{\operatorname{Unif}(\{0,1\}^n)\} D = { Unif ({ 0 , 1 } n )} , using O ( log ( n ) log ( 1 / ε ) ε ) O\left(\frac{\log(n)\log(1/\varepsilon)}{\varepsilon}\right) O ( ε l o g ( n ) l o g ( 1/ ε ) ) samples. On the other hand, any sample-based tester requires Ω ( log n ) \Omega(\log n) Ω ( log n ) samples for sufficiently small constant ε > 0 \varepsilon> 0 ε > 0 .
This is an exponential improvement over the distribution-free bound of Θ ~ ( n 1 / 3 ) \widetilde{\Theta}(n^{1/3}) Θ ( n 1/3 ) [28 ] , even when the distribution-free tester is allowed to use queries. Our tester is quite simple; basically, it must only rule out the n O ( log ( 1 / ε ) ) n^{O(\log(1/\varepsilon))} n O ( l o g ( 1/ ε )) conjunctions of length at most log ( 1 / ε ) \log(1/\varepsilon) log ( 1/ ε ) , since larger conjunctions are satisfied with probability < ε < \varepsilon < ε under Unif ( { 0 , 1 } n ) \operatorname{Unif}(\{0,1\}^n) Unif ({ 0 , 1 } n ) , and the tester may abstain if D \mathcal{D} D violates this condition.
The lower bound is simple and holds even for distribution-specific testing: it is known that it requires at least Ω ( log n ) \Omega(\log n) Ω ( log n ) samples to distinguish a random dictator function (which is a trivial conjunction) from a random function under Unif ( { 0 , 1 } n ) \operatorname{Unif}(\{0,1\}^n) Unif ({ 0 , 1 } n ) .
Lower Bound for Testing Monotonicity
Our argument is inspired by the 2 Ω ( n 1 / 4 ) 2^{\Omega(n^{1/4})} 2 Ω ( n 1/4 ) lower bound for non-adaptive tolerant (distribution-specific) monotonicity testing from [18 ] . The main tool is random Talagrand DNFs : roughly, these are used to obtain approximate partitions of the Boolean cube into many incomparable regions that index into subcubes over a randomly chosen set of “action” variables. Using the randomness of the choice of action variables, constructions can hide violations of monotonicity in these subcubes so that, informally, for any non-adaptive algorithm most pairs of queried points are either too close together or in different regions, and both cases are nearly uninformative.
In [18 ] , the hard input f f f is close to or far from monotone (on average) in each subcube, which gives a tolerant testing lower bound. For us, each subcube is either perfectly monotone or far from monotone, which naively sounds easier to distinguish. On the other hand, since our NO distribution D \mathcal{D} D need not be uniform, we hide the violations in a small number of subcubes which are hard to detect, yet well-represented under D \mathcal{D} D , so that the construction is far from monotone.
Theorem 1.12. Any non-adaptive distribution-robust tester for monotone Boolean functions over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n with respect to D = { Unif ( { 0 , 1 } n ) } \mathcal{D} = \{\operatorname{Unif}(\{0,1\}^{n})\} D = { Unif ({ 0 , 1 } n )} must make at least 2 Ω ( n 1 / 4 ) 2^{\Omega(n^{1/4})} 2 Ω ( n 1/4 ) queries or samples.
Discussion and Open Problems
To begin with, it is interesting that we did not yet find any use for the techniques from testable learning, despite the conceptual similarity; one reason is that the goal of property testing is to achieve significantly better complexity than the associated learning algorithms; a second reason is that testable learning is essentially only interesting in the agnostic rather than realizable setting, whereas we show that distribution-robust testing is already interesting in the standard (non-tolerant) setting of property testing; and a third reason is that most testable learning results aim to improve time complexity rather than sample or query complexity.
As highlighted in Figure 1 , some general questions remain open about adaptive testers:
Problem 1.13. Show a separation between adaptive and non-adaptive distribution-robust testing.
Problem 1.14. Show a separation between adaptive distribution-specific and distribution-robust testing.
A more specific question about adaptive testing is whether one can improve on the 2 O ~ ( n ) 2^{\widetilde{O}(\sqrt{n})} 2 O ( n ) bound for non-adaptive monotonicity testing by using adaptivity:
Problem 1.15. Is there an adaptive poly ( n ) \operatorname{poly}(n) poly ( n ) -query distribution-robust tester for monotonicity?
One of the questions we were most interested in is distribution-robust halfspace testing. The companion paper [19 ] separates this problem from distribution-free testing (using non-adaptive queries) and distribution-specific testing (using samples), but does not yet achieve tight bounds.
Problem 1.16. What is the complexity of distribution-robust halfspace testing?
We include in the companion paper [19 ] some more discussion of aspects of Problem 1.16 , including conjectured bounds informed by AI outputs.
Another concrete question concerns non-adaptive k k k -junta testing. This class has distribution-free, and hence distribution-robust, testers with query and sample complexity poly ( k / ε ) \operatorname{poly}(k/\varepsilon) poly ( k / ε ) [22 , 15 ] . However, for non-adaptive algorithms, distribution-free testing requires 2 Θ ( k ) 2^{\Theta(k)} 2 Θ ( k ) queries [22 ] while the distribution-specific query complexity is Θ ~ ( k 3 / 2 ) \widetilde{\Theta}(k^{3/2}) Θ ( k 3/2 ) [12 , 27 ] .
Problem 1.17. Is there a non-adaptive distribution-robust k k k -junta tester with poly ( k ) \operatorname{poly}(k) poly ( k ) complexity?
Finally, our theory of sample-based distribution-robust testing is still incipient: Theorem 1.11 gives an upper bound for conjunctions, and the companion paper [19 ] gives a lower bound for halfspaces. It remains to further chart the landscape of results and techniques in this model.
Notation and Conventions
Throughout this paper, X \mathcal{X} X will be the domain of the Boolean functions that are being tested. Usually we will have either X = { 0 , 1 } n \mathcal{X} = \{0,1\}^{n} X = { 0 , 1 } n , X = R n \mathcal{X} = \mathbb{R}^{n} X = R n , or X = [ 0 , 1 ] \mathcal{X} = [0,1] X = [ 0 , 1 ] . For a set S S S we write Unif ( S ) \operatorname{Unif}(S) Unif ( S ) to denote the uniform distribution over S S S .
We write Δ ( X ) \Delta(\mathcal{X}) Δ ( X ) for the set of all probability distributions over X \mathcal{X} X . We write dist T V ( D , E ) \operatorname{dist}_{\mathrm{TV}}(\mathcal{D},\mathcal{E}) dist TV ( D , E ) for the total variation distance between probability distributions D \mathcal{D} D and E \mathcal{E} E . For an event E E E , we write ¬ E \neg E ¬ E for the complement (negation) of E E E . We denote random variables by boldface symbols such as x , A \mathbf{x}, \mathbf{A} x , A .
Algorithmic Technique 0: Distribution-Picky Testing
Recall the motivation for distribution-picky testing (Definition 1.4 ) discussed in § 1.5 : it can be conceptually challenging to decide, as a designer of distribution-robust testing algorithms, whether the algorithm should output Reject or Abstain upon seeing data that differs from what we would expect under the “perfect” case of a good distribution D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D and good function f ∈ P f \in\mathbb{P} f ∈ P . The distribution-picky testing model deals with this issue by simplifying the palette of outputs back down to Accept and Reject: a distribution-picky tester is only required to accept when f ∈ P f \in\mathbb{P} f ∈ P and D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D (the “perfect” case), and only required to reject when dist D ( f , P ) > ε \operatorname{dist}_{\mathcal{D}}(f,\mathbb{P}) > \varepsilon dist D ( f , P ) > ε .
We require the concept of a sample simulator .
Definition 2.1 (Sample Simulator). Let D \mathbb{D} D be a class of distributions. A sample simulator for D \mathbb{D} D with simulation cost k k k is an algorithm which, given sample access to an arbitrary distribution D \mathcal{D} D , provides sample access to another distribution D ′ ∈ D \mathcal{D}' \in\mathbb{D} D ′ ∈ D ; specifically, upon request, the algorithm draws* k k k samples from D \mathcal{D} D and produces 1 sample from D ′ \mathcal{D}' D ′ . We require that, if D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D , then D ′ = D \mathcal{D}' = \mathcal{D} D ′ = D .
Most often, we will use a trivial sample simulator: when D = { D ∗ } \mathbb{D} = \{\mathcal{D}^{*}\} D = { D ∗ } is a singleton, we just sample from the (known) distribution D ∗ \mathcal{D}^{*} D ∗ .
The next lemma provides our first general technique for distribution-robust testing: it says that if we have a sample simulator and a distribution-picky tester, then we get a distribution-robust tester. Most of our algorithmic results will actually be distribution-picky testers, and we will use Lemma 2.2 to obtain distribution-robust testers from them.
Lemma 2.2 (Reduction to Picky Testing). Let P \mathbb{P} P be any property of functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } and D \mathbb{D} D any class of distributions over X \mathcal{X} X . Let R R R be a sample simulator with simulation cost k k k and let T T T be a distribution-picky tester for P \mathbb{P} P with respect to D \mathbb{D} D with sample cost s ( ε , δ ) s(\varepsilon,\delta) s ( ε , δ ) and query cost q ( ε , δ ) q(\varepsilon,\delta) q ( ε , δ ) . Then Algorithm 1 is a D \mathbb{D} D -robust tester for P \mathbb{P} P with sample cost O ( ( k + 1 ) ⋅ s ( ε , 1 4 ) log ( 1 δ ) ) O((k+1)\cdot s(\varepsilon,\frac{1}{4})\log(\frac{1}{\delta})) O (( k + 1 ) ⋅ s ( ε , 4 1 ) log ( δ 1 )) and query cost O ( ( q ( ε , 1 4 ) + s ( ε , 1 4 ) ) ⋅ log ( 1 δ ) ) O((q(\varepsilon,\frac{1}{4})+s(\varepsilon,\frac{1}{4}))\cdot\log(\frac{1}{\delta})) O (( q ( ε , 4 1 ) + s ( ε , 4 1 )) ⋅ log ( δ 1 )) . If T T T is non-adaptive, then so is Algorithm 1.
Proof. The sample and query complexity are immediate from inspection of the algorithm (in particular, each labeled sample from D ′ \mathcal{D}' D ′ can be obtained using k k k samples from D \mathcal{D} D via the simulator R R R , plus one query to f f f ), and so is the non-adaptivity claim. Let us now establish correctness.
Let p 1 p_{1} p 1 be the probability that T T T outputs Accept on f f f and D \mathcal{D} D , and let p 2 p_{2} p 2 be the probability that T T T outputs Accept on f f f and D ′ \mathcal{D}' D ′ . Let t 1 , t 2 t_{1},t_{2} t 1 , t 2 be the random variables which are the observed fraction of times these subroutines output Accept in Steps 2 and 3, respectively. By choosing r = O ( log ( 1 / δ ) ) r = O(\log(1/\delta)) r = O ( log ( 1/ δ )) appropriately, the Chernoff bound ensures that ∣ p 1 − t 1 ∣ < 0.005 |p_{1}-t_{1}| < 0.005 ∣ p 1 − t 1 ∣ < 0.005 and ∣ p 2 − t 2 ∣ < 0.005 |p_{2}-t_{2}| < 0.005 ∣ p 2 − t 2 ∣ < 0.005 with probability at least 1 − δ 1-\delta 1 − δ . Let us assume this event occurs. Algorithm 1 Reduction to Picky Testing using Sample Simulation
Requirements:
Input:
Query access to f : X → { 0 , 1 } f:\mathcal{X}\to\{0,1\} f : X → { 0 , 1 } ,
Access to i.i.d. samples ( x , f ( x ) ) x ∼ D (x,f(x))_{x\sim\mathcal{D}} ( x , f ( x ) ) x ∼ D ,
Closeness and failure parameters ε , δ ∈ ( 0 , 1 ) \varepsilon,\delta\in(0,1) ε , δ ∈ ( 0 , 1 ) .
procedure DRT-VIA-DPT
Let D ′ ∈ D \mathcal{D}'\in\mathbb{D} D ′ ∈ D be the distribution simulated by R \mathcal{R} R given sample access to D \mathcal{D} D .
Set r = O ( log ( 1 / δ ) ) r=O(\log(1/\delta)) r = O ( log ( 1/ δ )) with an appropriate constant. Run r r r iterations of T \mathcal{T} T on f f f and D \mathcal{D} D , with distance parameter ε \varepsilon ε . Let t 1 t_1 t 1 be the fraction of times it outputs Accept. ▷ Uses labeled samples from D \mathcal{D} D , f f f and queries to f f f .
Run r r r iterations of T \mathcal{T} T on f f f and D ′ \mathcal{D}' D ′ , with distance parameter ε \varepsilon ε . Let t 2 t_2 t 2 be the fraction of times it outputs Accept. ▷ Uses sample simulator R \mathcal{R} R and queries to f f f .
If ∣ t 1 − t 2 ∣ > 0.01 \lvert t_1-t_2\rvert>0.01 ∣ t 1 − t 2 ∣ > 0.01 then output Abstain. Otherwise output Accept if t 1 > 1 / 2 t_1>1/2 t 1 > 1/2 and Reject if t 1 ≤ 1 / 2 t_1\le1/2 t 1 ≤ 1/2 .
Completeness. Suppose f ∈ P f\in\mathcal{P} f ∈ P . Since the simulated distribution D ′ ∈ D \mathcal{D}'\in\mathbb{D} D ′ ∈ D , the distribution-picky tester T \mathcal{T} T running on D ′ \mathcal{D}' D ′ will output Accept with probability p 2 ≥ 3 / 4 p_2\ge3/4 p 2 ≥ 3/4 , so t 2 > 3 / 4 − 0.05 t_2>3/4-0.05 t 2 > 3/4 − 0.05 . If t 1 ≤ 1 / 2 t_1\le1/2 t 1 ≤ 1/2 then ∣ t 1 − t 2 ∣ > 0.2 \lvert t_1-t_2\rvert>0.2 ∣ t 1 − t 2 ∣ > 0.2 and the algorithm will output Abstain, so it is not possible for the algorithm to output Reject.
Soundness. Suppose dist D ( f , P ) > ε \operatorname{dist}_{\mathcal{D}}(f,\mathcal{P})>\varepsilon dist D ( f , P ) > ε . Then the distribution-picky tester T \mathcal{T} T running on D \mathcal{D} D will output Accept with probability p 1 ≤ 1 / 4 p_1\le1/4 p 1 ≤ 1/4 , so t 1 < 1 / 4 + 0.05 t_1<1/4+0.05 t 1 < 1/4 + 0.05 , so it is not possible for the algorithm to output Accept.
Assertiveness. Suppose D ∈ D \mathcal{D}\in\mathbb{D} D ∈ D . By the properties of R \mathcal{R} R , we have D = D ′ \mathcal{D}=\mathcal{D}' D = D ′ . Therefore p 1 = p 2 p_1=p_2 p 1 = p 2 since the two runs of the tester T \mathcal{T} T are running on identical inputs. Then ∣ t 1 − t 2 ∣ < 0.01 \lvert t_1-t_2\rvert<0.01 ∣ t 1 − t 2 ∣ < 0.01 , so the algorithm will not output Abstain.
Algorithmic Technique I: Function Reconstruction
Thanks to Algorithm 1, designing distribution-robust testers now reduces to designing distribution-picky testers. In this section we give a general technique for designing distribution-picky testers which generalizes the classic testing-by-learning reduction of [38 ] (it is not hard to see that the basic [38 ] testing-by-learning technique gives distribution-picky testers). We will see in this section that testing-by-learning gives good upper bounds on distribution-robust testers that can be much more efficient than distribution-free testing. Looking ahead, this generalization can also produce testers that are much more efficient than testing-by-learning; we will see this later, in § 4 .
We will need the notion of a query simulator , which is an algorithm that uses queries to f f f to simulate queries to another function g g g :
Definition 3.1 (Query Simulator). *For functions f f f and g g g , a query simulator for g g g based on f f f , with simulation cost k k k , is an algorithm which, given query x x x , makes at most k k k queries to f f f and then outputs g ( x ) g(x) g ( x ) .
We will also need the notion of a function reconstructor . This is an algorithm which does some preprocessing to produce a query simulator. For intuition, one can imagine a proper learning algorithm: A proper learning algorithm for P \mathbb{P} P (Definition 3.6 ) uses samples and queries to output a function g ∈ P g \in\mathbb{P} g ∈ P , and then queries to g g g can be simulated without using any further queries to f f f . A function reconstructor generalizes proper learning by allowing the simulator to continue querying f f f to process new queries, and also allowing the function g g g to lie slightly outside P \mathbb{P} P .
Definition 3.2 (Function Reconstructor). Let P \mathbb{P} P be a class of functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } and let D \mathbb{D} D be a class of distributions over X \mathcal{X} X . A function reconstructor for P \mathbb{P} P with respect to D \mathbb{D} D , with sample cost s ( ε , δ ) s(\varepsilon,\delta) s ( ε , δ ) , query cost q ( ε , δ ) q(\varepsilon,\delta) q ( ε , δ ) , and simulation cost k k k , is an algorithm whose input is:
Access to i.i.d. samples ( x , f ( x ) ) (x,f(x)) ( x , f ( x )) with x ∼ D x \sim\mathcal{D} x ∼ D where D \mathcal{D} D is an unknown arbitrary distribution over X \mathcal{X} X and f : X → { 0 , 1 } f:\mathcal{X} \to\{0,1\} f : X → { 0 , 1 } is an arbitrary function;
Query access to the unknown function f : X → { 0 , 1 } f:\mathcal{X} \to\{0,1\} f : X → { 0 , 1 } ;
Closeness and failure parameters ε , δ ∈ ( 0 , 1 ) \varepsilon,\delta\in(0,1) ε , δ ∈ ( 0 , 1 ) .
The algorithm draws at most s ( ε , δ ) s(\varepsilon,\delta) s ( ε , δ ) samples from D \mathcal{D} D , makes at most q ( ε , δ ) q(\varepsilon,\delta) q ( ε , δ ) queries to f f f , and then outputs a query simulator for a function g g g based on f f f , with simulation cost k k k , such that, with probability at least 1 − δ 1-\delta 1 − δ , the following properties hold:
g g g satisfies dist D ( g , P ) < ε \operatorname{dist}_{\mathcal{D}}(g,\mathbb{P}) < \varepsilon dist D ( g , P ) < ε ; and
if f ∈ P f \in\mathbb{P} f ∈ P and D ∈ D \mathcal{D} \in\mathbb{D} D ∈ D , then dist D ( f , g ) < ε \operatorname{dist}_{\mathcal{D}}(f,g) < \varepsilon dist D ( f , g ) < ε .
The following algorithm and lemma show that if we have a function reconstructor for a property P \mathbb{P} P then we can get a distribution-picky tester for that property:
Algorithm 2 Picky Testing using Function Reconstruction
Requirements:
Input:
Query access to f : X → { 0 , 1 } f:\mathcal{X} \to\{0,1\} f : X → { 0 , 1 } ,
Access to i.i.d. samples ( x , f ( x ) ) x ∼ D (x,f(x))_{x\sim\mathcal{D}} ( x , f ( x ) ) x ∼ D ,
Closeness and failure parameters ε , δ ∈ ( 0 , 1 ) \varepsilon,\delta\in(0,1) ε , δ ∈ ( 0 , 1 ) .
procedure DRT-via-Function-Reconstruction
Run the function reconstructor F \mathcal{F} F on f f f and D \mathcal{D} D with accuracy ε / 8 \varepsilon/8 ε /8 and confidence 7 / 8 7/8 7/8 . ▷ Uses labeled samples from D \mathcal{D} D , f f f and queries to f f f .
Let g g g be the function whose simulator based on f f f is produced by the previous step.
Query f ( x ) f(x) f ( x ) and g ( x ) g(x) g ( x ) on r = O ( 1 / ε ) r = O(1/\varepsilon) r = O ( 1/ ε ) random points x ∼ D x \sim\mathcal{D} x ∼ D drawn from D \mathcal{D} D ; let t t t be the fraction of these queries with f ( x ) ≠ g ( x ) f(x) \ne g(x) f ( x ) = g ( x ) . ▷ Uses samples from D \mathcal{D} D and queries to f f f .
If t ≤ ε / 2 t \le\varepsilon/2 t ≤ ε /2 , output Accept, otherwise Reject.
Lemma 3.3 (Testing by function reconstruction). Let P \mathbb{P} P be any property of functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } and D \mathbb{D} D any class of distributions. If F \mathcal{F} F is a function reconstructor for P \mathbb{P} P under D \mathbb{D} D with sample cost
s ( ε , δ ) s(\varepsilon,\delta) s ( ε , δ ) , query cost q ( ε , δ ) q(\varepsilon,\delta) q ( ε , δ ) , and simulation cost k k k , then Algorithm 2 is a D \mathbb{D} D -picky tester for P \mathcal{P} P with sample cost s ( ε / 8 , 1 / 8 ) + O ( 1 / ε ) s(\varepsilon/8,1/8)+O(1/\varepsilon) s ( ε /8 , 1/8 ) + O ( 1/ ε ) and query cost q ( ε / 8 , 1 / 8 ) + O ( ( k + 1 ) / ε ) q(\varepsilon/8,1/8)+O((k+1)/\varepsilon) q ( ε /8 , 1/8 ) + O (( k + 1 ) / ε ) .
Proof. The sample and query cost of the algorithm follow directly from inspection of the algorithm, so let us turn our attention to correctness.
Let d : = dist D ( f , g ) d := \operatorname{dist}_{\mathcal{D}}(f,g) d := dist D ( f , g ) . By the Chernoff bound, if we use a sufficiently large constant in the setting r = O ( 1 / ε ) r=O(1/\varepsilon) r = O ( 1/ ε ) , then the following event E 1 E_1 E 1 occurs with probability at least 7 / 8 7/8 7/8 : if d < ε / 8 d<\varepsilon/8 d < ε /8 then t < ε / 4 t<\varepsilon/4 t < ε /4 , and if d > 7 ε / 8 d>7\varepsilon/8 d > 7 ε /8 then t > 3 ε / 4 t>3\varepsilon/4 t > 3 ε /4 . Additionally, let E 2 E_2 E 2 be the event that the output g g g of the function reconstructor F \mathcal{F} F satisfies the two properties described in Definition 3.2 , which occurs with probability at least 7 / 8 7/8 7/8 . We show below that the output of Algorithm 2 is correct conditional on event E 1 ∩ E 2 E_1\cap E_2 E 1 ∩ E 2 , which occurs with probability at least 3 / 4 3/4 3/4 by a union bound.
Completeness. Suppose f ∈ P f\in\mathcal{P} f ∈ P and D ∈ D \mathcal{D}\in\mathbb{D} D ∈ D . By event E 2 E_2 E 2 , we have d = dist D ( f , g ) < ε / 8 d=\operatorname{dist}_{\mathcal{D}}(f,g)<\varepsilon/8 d = dist D ( f , g ) < ε /8 , and thus by event E 1 E_1 E 1 we have t < ε / 4 t<\varepsilon/4 t < ε /4 , so the algorithm correctly outputs Accept.
Soundness. Suppose dist D ( f , P ) > ε \operatorname{dist}_{\mathcal{D}}(f,\mathcal{P})>\varepsilon dist D ( f , P ) > ε . Since dist D ( g , P ) < ε / 8 \operatorname{dist}_{\mathcal{D}}(g,\mathcal{P})<\varepsilon/8 dist D ( g , P ) < ε /8 by event E 2 E_2 E 2 , we must have d = dist D ( f , g ) > 7 ε / 8 d=\operatorname{dist}_{\mathcal{D}}(f,g)>7\varepsilon/8 d = dist D ( f , g ) > 7 ε /8 . Then t > 3 ε / 4 t>3\varepsilon/4 t > 3 ε /4 by event E 1 E_1 E 1 , so the algorithm correctly outputs Reject. □ \square □
We will use this general algorithm template to give both adaptive and non-adaptive distribution-picky testers. Recall the definition of non-adaptivity:
Definition 3.4 (Non-Adaptivity). When a randomized algorithm is given query access to f : X → { 0 , 1 } f:\mathcal{X}\to\{0,1\} f : X → { 0 , 1 } and access to samples ( x , f ( x ) ) x ∼ D (x,f(x))_{x\sim\mathcal{D}} ( x , f ( x ) ) x ∼ D , we say it is non-adaptive if its queries and samples can be made as follows:
Draw a batch of labelled samples ( x , f ( x ) ) (x,f(x)) ( x , f ( x )) .
Based on these samples, choose (possibly randomly) a set Q ⊂ X Q\subset\mathcal{X} Q ⊂ X points.
Query all points x ∈ Q x\in Q x ∈ Q and then compute the output.
In the rest of this section we present some instantiations of Lemma 3.3 . § 3.1 briefly notes how proper learning yields distribution-robust-testing using this approach, and § 3.2 and § 3.3 give concrete applications to the classes of monotone functions, conjunctions, and decision lists.
Testing by Learning
Definition 3.6 (Proper Learning). Let P \mathsf{P} P be any class of functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } and D \mathsf{D} D any class of distributions over X \mathcal{X} X . A proper learner for P \mathsf{P} P under D \mathsf{D} D with sample complexity s ( ε , δ ) s(\varepsilon,\delta) s ( ε , δ ) and query complexity q ( ε , δ ) q(\varepsilon,\delta) q ( ε , δ ) , is an algorithm L \mathcal{L} L which is given as input:
Access to i.i.d. samples ( x , f ( x ) ) (x,f(x)) ( x , f ( x )) with x ∼ D x \sim\mathcal{D} x ∼ D where D \mathcal{D} D is an unknown arbitrary distribution over X \mathcal{X} X and f : X → { 0 , 1 } f:\mathcal{X} \to\{0,1\} f : X → { 0 , 1 } is an arbitrary function;
Query access to the function f : X → { 0 , 1 } f:\mathcal{X} \to\{0,1\} f : X → { 0 , 1 } ;
Closeness and failure parameters ε , δ ∈ ( 0 , 1 ) \varepsilon,\delta\in(0,1) ε , δ ∈ ( 0 , 1 ) .
The algorithm makes at most q ( ε , δ ) q(\varepsilon,\delta) q ( ε , δ ) queries to f f f and draws at most s ( ε , δ ) s(\varepsilon,\delta) s ( ε , δ ) samples from D \mathcal{D} D . It outputs a function g ∈ P g \in\mathsf{P} g ∈ P with the guarantee that, if f ∈ P f \in\mathsf{P} f ∈ P and D ∈ D \mathcal{D} \in\mathsf{D} D ∈ D , then with probability at least 1 − δ 1-\delta 1 − δ , the output g g g satisfies dist D ( f , g ) < ε \operatorname{dist}_{\mathcal{D}}(f,g) < \varepsilon dist D ( f , g ) < ε .
A proper learning algorithm for P \mathsf{P} P under D \mathsf{D} D may be transformed trivially into a function reconstructor with simulation cost 0 0 0 by simply outputting a query simulator for the learned function g g g . So we have the following:
Lemma 3.7 (Distribution-Robust Testing by Learning). Let P \mathsf{P} P be any class of functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } , let D ∗ \mathcal{D}^{*} D ∗ be any distribution over X \mathcal{X} X , and let D = { D ∗ } \mathsf{D} = \{\mathcal{D}^{*}\} D = { D ∗ } . Suppose there is a proper learning algorithm for P \mathsf{P} P under D \mathsf{D} D with query cost q ( ε , δ ) q(\varepsilon,\delta) q ( ε , δ ) and sample cost s ( ε , δ ) s(\varepsilon,\delta) s ( ε , δ ) . Then there is a D \mathsf{D} D -robust tester for P \mathsf{P} P with sample cost O ( s ( ε 8 , 1 8 ) + 1 ε ) O\left(s\left(\frac{\varepsilon}{8},\frac{1}{8}\right)+\frac{1}{\varepsilon}\right) O ( s ( 8 ε , 8 1 ) + ε 1 ) and query cost O ( s ( ε 8 , 1 8 ) + q ( ε 8 , 1 8 ) + 1 ε ) O\left(s\left(\frac{\varepsilon}{8},\frac{1}{8}\right)+q\left(\frac{\varepsilon}{8},\frac{1}{8}\right)+\frac{1}{\varepsilon}\right) O ( s ( 8 ε , 8 1 ) + q ( 8 ε , 8 1 ) + ε 1 ) . Moreover, if the proper learning algorithm is non-adaptive then so is the robust tester.
Proof. Lemma 3.3 gives a D \mathsf{D} D -picky tester for P \mathsf{P} P , from which Lemma 2.2 gives the desired D \mathsf{D} D -robust tester with the announced query and sample costs. If the learning algorithm is non-adaptive, then so is the D \mathsf{D} D -picky tester by using the fact that the query simulator makes no additional queries, and hence the D \mathsf{D} D -robust tester is non-adaptive by Lemma 2.2 . □ \square □
Application: Monotone Functions
For our first application, we use testing-by-learning to get a distribution-robust tester for monotonicity that is significantly more efficient than distribution-free testing.
Let us first show off the simplest application of our general algorithm: We can obtain a distribution-picky tester for the singleton class D = { Unif ( { 0 , 1 } n ) } \mathsf{D} = \{\operatorname{Unif}(\{0,1\}^{n})\} D = { Unif ({ 0 , 1 } n )} using the basic testing-by-learning reduction of [38 ] . All we need is the following theorem:
Theorem 3.8 ([52 ] ). There is a sample-based proper learner for the class of monotone functions { 0 , 1 } n → { 0 , 1 } \{0,1\}^{n} \to\{0,1\} { 0 , 1 } n → { 0 , 1 } under D = { Unif ( { 0 , 1 } n ) } \mathsf{D} = \{\operatorname{Unif}(\{0,1\}^{n})\} D = { Unif ({ 0 , 1 } n )} , with sample cost n O ( n / ε ) n^{O(\sqrt{n}/\varepsilon)} n O ( n / ε ) , and time cost polynomial in the number of samples.
By applying Lemma 3.7 , we immediately obtain:
Corollary 3.9. There is a { Unif ( { 0 , 1 } n ) } \{\operatorname{Unif}(\{0,1\}^{n})\} { Unif ({ 0 , 1 } n )} -robust tester for monotone functions { 0 , 1 } n → { 0 , 1 } \{0,1\}^{n} \to\{0,1\} { 0 , 1 } n → { 0 , 1 } with query, sample, and time cost n O ( n / ε ) n^{O(\sqrt{n}/\varepsilon)} n O ( n / ε ) .
We can use the more general power of our algorithm, using sample simulators, to upgrade this result to the domain R n \mathbb{R}^n R n , for the class D p r o d , r e a l \mathbb{D}_{\mathrm{prod,real}} D prod , real of product distributions over R n \mathbb{R}^n R n .
Proposition 3.10. For domain R n \mathbb{R}^n R n , there is a sample simulator for D p r o d , r e a l \mathbb{D}_{\mathrm{prod,real}} D prod , real with simulation cost n n n .
Proof. The simulator performs the following, given sample access to an arbitrary distribution D \mathcal{D} D over R n \mathbb{R}^n R n . When a sample is requested:
Draw n n n independent samples x ( 1 ) , … , x ( n ) ∼ D \boldsymbol{x}^{(1)}, \ldots, \boldsymbol{x}^{(n)} \sim\mathcal{D} x ( 1 ) , … , x ( n ) ∼ D ;
Output the value y : = ( x 1 ( 1 ) , … , x n ( n ) ) \boldsymbol{y} := (\boldsymbol{x}^{(1)}_1, \ldots, \boldsymbol{x}^{(n)}_n) y := ( x 1 ( 1 ) , … , x n ( n ) ) , where x i x_i x i is the i t h i^{\mathrm{th}} i th coordinate of x ∈ R n \boldsymbol{x} \in\mathbb{R}^n x ∈ R n .
The sample y \boldsymbol{y} y is distributed as D ′ ∈ D p r o d , r e a l \mathcal{D}' \in\mathbb{D}_{\mathrm{prod,real}} D ′ ∈ D prod , real whose marginals on each coordinate are equal to the marginals of D \mathcal{D} D . When D \mathcal{D} D is a product distribution, D ′ = D \mathcal{D}' = \mathcal{D} D ′ = D as desired.
Now it suffices to plug in a proper learner for monotone function R n → { 0 , 1 } \mathbb{R}^n \to\{0,1\} R n → { 0 , 1 } under D p r o d , r e a l \mathbb{D}_{\mathrm{prod,real}} D prod , real . This follows by combining the results of [47 , 14 ] . Since this result is not stated explicitly in the literature (and requires some inspection of the proofs), we give a proof sketch in Section A.3.
Theorem 3.11. There is a sample-based proper learner for the class of monotone functions R n → { 0 , 1 } \mathbb{R}^n \to\{0,1\} R n → { 0 , 1 } under D p r o d , r e a l \mathbb{D}_{\mathrm{prod,real}} D prod , real , with sample cost 2 O ~ ( n / ε ) 2^{\widetilde{O}(\sqrt{n}/\varepsilon)} 2 O ( n / ε ) .
We remark that the method of [52 ] for obtaining time bounds that are polynomial in the sample size do not immediately apply; we leave this as an open problem.
Application: Conjunctions and Decision Lists
As another simple application of Lemma 3.7 , we give distribution-robust algorithms for testing conjunctions and 1-decision-lists under the uniform distribution on { 0 , 1 } n \{0,1\}^n { 0 , 1 } n , i.e. when the set of good distributions is the singleton D = { Unif ( { 0 , 1 } n ) } \mathbb{D} = \{\operatorname{Unif}(\{0,1\}^n)\} D = { Unif ({ 0 , 1 } n )} . We recall the following well known facts about learnability of conjunctions and decision lists under the uniform distribution (for completeness we sketch the simple proof in Section A):
Fact 3.12. Let X = { 0 , 1 } n \mathcal{X} = \{0,1\}^n X = { 0 , 1 } n , let D = { Unif ( { 0 , 1 } n ) } \mathbb{D} = \{\operatorname{Unif}(\{0,1\}^n)\} D = { Unif ({ 0 , 1 } n )} , and let P \mathbb{P} P be either the class P C o n j \mathbb{P}_{\mathrm{Conj}} P Conj of all Boolean conjunctions over X \mathcal{X} X or the class P D L \mathbb{P}_{\mathrm{DL}} P DL of all 1-decision-lists over X \mathcal{X} X . There is a proper nonadaptive query learner for P \mathbb{P} P under Unif ( { 0 , 1 } n ) \operatorname{Unif}(\{0,1\}^n) Unif ({ 0 , 1 } n ) with query complexity
q ( ε , δ ) = O ( ( log n ) ⋅ ( log ( 1 / ε ) ) + log ( 1 / δ ) ε ) . q(\varepsilon,\delta) = O\left(\frac{(\log n)\cdot(\log(1/\varepsilon))+\log(1/\delta)}{\varepsilon}\right). q ( ε , δ ) = O ( ε ( log n ) ⋅ ( log ( 1/ ε )) + log ( 1/ δ ) ) .
Combining Lemma 3.7 and Fact 3.12, we immediately obtain Theorem 1.6, restated below for convenience.
Theorem 1.6. The classes of conjunctions and 1-decision lists have non-adaptive distribution-robust testing-by-learning algorithms, with respect to D = { Unif ( { 0 , 1 } n ) } \mathbb{D} = \{\operatorname{Unif}(\{0,1\}^n)\} D = { Unif ({ 0 , 1 } n )} , with sample complexity O ( 1 / ε ) O(1/\varepsilon) O ( 1/ ε ) and non-adaptive query complexity
O ( log ( n ) log ( 1 / ε ) ε ) . O\left(\frac{\log(n)\log(1/\varepsilon)}{\varepsilon}\right). O ( ε log ( n ) log ( 1/ ε ) ) .
We remark that Theorem 1.6 has much better efficiency than any algorithms for distribution-free testing of conjunctions or 1-decision-lists, even if adaptive queries are allowed, as witnessed by the following polynomial lower bounds, (see [28 ] , Theorem 1.2 and [CFP24], Theorem 1.2): There is an absolute constant ε > 0 \varepsilon> 0 ε > 0 such that any distribution-free ε \varepsilon ε -testing algorithm for conjunctions (1-decision-lists, respectively) over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n must make Ω ~ ( n 1 / 3 ) \widetilde{\Omega}(n^{1/3}) Ω ( n 1/3 ) queries (Ω ~ ( n 1 / 2 ) \widetilde{\Omega}(n^{1/2}) Ω ( n 1/2 ) queries, respectively). Theorem 1.6 and these distribution-free lower bounds together establish the separations depicted in Figure 1 between the distribution-robust and distribution-free models with queries. (As mentioned earlier, in § 4 we will give a stronger separation for adaptive algorithms by providing constant-query distribution-robust testers for conjunctions and 1-decision-lists.)
Algorithmic Technique II: Approximation by Juntas
A number of results for distribution-specific property testing with respect to the uniform distribution [33 , 16 ] have been obtained for properties that have junta subclass approximators , i.e., which are such that there is a subclass J ⊆ P \mathcal{J} \subseteq\mathbb{P} J ⊆ P , consisting of k k k -juntas for some suitable value of k k k , such that every f ∈ P f \in\mathbb{P} f ∈ P is close to some junta g ∈ J g \in\mathcal{J} g ∈ J . In this section we give a general technique for obtaining distribution-robust testing algorithms for such properties, and we apply this method to obtain O ~ ( 1 / ε ) \widetilde{O}(1/\varepsilon) O ( 1/ ε ) -query testers (with no dependence on the dimension parameter n n n ) for conjunctions and decision lists, improving on the non-adaptive distribution-robust testers for these classes that were given in Theorem 1.6 at the cost of using adaptive queries.
Adaptive Testers using Query Simulators
We will use junta approximation techniques to prove the following:
Theorem 4.1 (Adaptive testing of conjunctions and 1-decision-lists). Let P \mathbb{P} P be either the class P C o n j \mathbb{P}_{\mathrm{Conj}} P Conj of all Boolean conjunctions over X = { 0 , 1 } n \mathcal{X} = \{0,1\}^{n} X = { 0 , 1 } n or the class P D L \mathbb{P}_{\mathrm{DL}} P DL of all 1-decision-lists over X \mathcal{X} X . There is an adaptive distribution-robust tester for P \mathbb{P} P with respect to the uniform distribution over X \mathcal{X} X with sample complexity O ~ ( 1 / ε ) \widetilde{O}(1/\varepsilon) O ( 1/ ε ) and query complexity O ~ ( 1 / ε ) \widetilde{O}(1/\varepsilon) O ( 1/ ε ) .
By Lemma 3.3 , it suffices to design function reconstructors for the classes of conjunctions and decision lists. We accomplish this using results of [16 ] . From that paper, we can obtain two procedures, which are similar for conjunctions and decision lists:
An adaptive query algorithm which, given query access to f : { 0 , 1 } n → { 0 , 1 } f:\{0,1\}^{n} \to\{0,1\} f : { 0 , 1 } n → { 0 , 1 } , identifies a small set S ⊆ [ n ] S \subseteq[n] S ⊆ [ n ] of variables and a string w ∈ { 0 , 1 } n w \in\{0,1\}^{n} w ∈ { 0 , 1 } n , and defines a function
g ( x ) : = f ( x S ∘ w S ‾ ) , g(x) := f(x_{S} \circ w_{\overline{S}}), g ( x ) := f ( x S ∘ w S ) ,
where x S ∘ w S ‾ x_{S} \circ w_{\overline{S}} x S ∘ w S denotes the string obtained by replacing the values of x x x on the coordinates S ‾ = [ n ] ∖ S \overline{S} = [n] \setminus S S = [ n ] ∖ S with the values of w w w . This gives a query simulator which, on query x x x , can compute the value g ( x ) g(x) g ( x ) using 1 query to f f f . This procedure satisfies:
Claim 4.2. There is an algorithm which, given query access to an arbitrary function f : { 0 , 1 } n → { 0 , 1 } f:\{0,1\}^{n} \to\{0,1\} f : { 0 , 1 } n → { 0 , 1 } , makes at most O ~ ( 1 / ε ) \widetilde{O}(1/\varepsilon) O ( 1/ ε ) queries and outputs a query simulator for a function g g g . If f f f is a conjunction, the following holds: g g g is a conjunction of length at most O ( log ( 1 / ε ) ) O(\log(1/\varepsilon)) O ( log ( 1/ ε )) , and with probability at least 1 − δ 1-\delta 1 − δ , dist ( f , g ) < ε \operatorname{dist}(f,g) < \varepsilon dist ( f , g ) < ε under Unif ( { 0 , 1 } n ) \operatorname{Unif}(\{0,1\}^{n}) Unif ({ 0 , 1 } n ) . The same holds for decision lists.
A distribution-free tester for the subclass of functions g g g obtained by the restrictions of functions f ∈ P f \in\mathbb{P} f ∈ P given above; in each case, these restricted functions are functions in P \mathbb{P} P which depend on a small number of variables.
Claim 4.3 ([16 ] , Theorem 33). For every K K K , there is a distribution-free tester for the class of conjunctions of length at most K K K , with sample and query cost O ~ ( K / ε ) \widetilde{O}(K/\varepsilon) O ( K / ε ) .
Claim 4.4 ([16 ] , Theorem 39). For every K K K , there is a distribution-free tester for the class of 1 1 1 -decision lists of length at most K K K , with sample and query cost O ~ ( K 2 / ε ) \widetilde{O}(K^2/\varepsilon) O ( K 2 / ε ) .
For both conjunctions and decision lists, the first procedure is adaptive because it uses binary search to identify coordinates S S S ; any following queries to the function g g g are therefore also adaptive because they use queries to f f f that depend on S S S .
These two procedures can be combined to get a function reconstructor (the formal claims of these two procedures are stated in the proofs below, and more detail is given in Section A.4, since [16 ] does not state some of these claims explicitly). The following lemma suffices to establish Theorem 4.1 using Lemma 3.3 .
Lemma 4.5. There is a function reconstructor for conjunctions over D = { Unif ( { 0 , 1 } n ) } \mathbb{D} = \{\operatorname{Unif}(\{0,1\}^{n})\} D = { Unif ({ 0 , 1 } n )} with sample and query cost O ~ ( 1 / ε ) \widetilde{O}(1/\varepsilon) O ( 1/ ε ) , and simulation cost 1 1 1 . The same holds for decision lists.
Proof. We start with conjunctions.
The function reconstructor performs the following, with K = O ( log ( 1 / ε ) ) K = O(\log(1/\varepsilon)) K = O ( log ( 1/ ε )) being the length of the conjunction produced in the first claim:
Run the algorithm from the first claim with confidence parameter δ / 2 \delta/2 δ /2 to obtain a simulator for a function g g g ;
Run the tester from the second claim with value K K K with confidence parameter δ / 2 \delta/2 δ /2 , on function g g g under distribution D \mathbb{D} D . If it outputs Accept then output the simulator for g g g , otherwise output the simulator for the constant 0 0 0 function.
Suppose neither step fails; this occurs with probability at least 1 − δ 1-\delta 1 − δ . If step 2 outputs Accept, then the algorithm outputs the simulator for g g g , which must satisfy dist D ( g , P ) < ε \operatorname{dist}_{\mathbb{D}}(g,\mathcal{P}) < \varepsilon dist D ( g , P ) < ε because the tester passed. If step 2 outputs Reject, the algorithm outputs a conjunction.
If f f f is a conjunction and D = Unif ( { 0 , 1 } n ) \mathbb{D} = \operatorname{Unif}(\{0,1\}^{n}) D = Unif ({ 0 , 1 } n ) , then g g g is a conjunction on K K K variables, and dist D ( f , g ) < ε \operatorname{dist}_{\mathbb{D}}(f,g) < \varepsilon dist D ( f , g ) < ε by the guarantee on the first algorithm. The tester in step 2 will Accept, so the algorithm outputs g g g as desired.
For decision lists, we use the same argument, with the same claims as above, except with the word “conjunction” replaced with “decision list”.
Non-Adaptive Tester for Conjunctions
Theorem 4.1 already implies non-adaptive testers for conjunctions and 1 1 1 -decision lists with sample complexity O ~ ( 1 / ε ) \widetilde{O}(1/\varepsilon) O ( 1/ ε ) and query complexity 2 O ~ ( 1 / ε ) 2^{\widetilde{O}(1/\varepsilon)} 2 O ( 1/ ε ) , i.e., independent of the domain size, since any adaptive tester may be made non-adaptive by preemptively querying all points that appear in its decision tree. In this subsection, we improve this non-adaptive bound for conjunctions:
Theorem 1.9. There is a distribution-robust tester for conjunctions over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n , with respect to D = { Unif ( { 0 , 1 } n ) } \mathbb{D} = \{\operatorname{Unif}(\{0,1\}^{n})\} D = { Unif ({ 0 , 1 } n )} , using O ( 1 / ε ) O(1/\varepsilon) O ( 1/ ε ) samples and O ~ ( 1 / ε 2 ) \widetilde{O}(1/\varepsilon^{2}) O ( 1/ ε 2 ) non-adaptive queries.
We will again apply Lemma 3.3 (with the reduction to distribution-picky testing in Lemma 2.2 ) by creating a function reconstructor. One remark before we begin: Remark 4.6. Our function reconstructor will produce a randomized query simulator, meaning that on each query x x x , the simulator makes k k k random queries to f f f and then, with probability at least 2 / 3 2/3 2/3 , outputs the correct values g ( x ) g(x) g ( x ) . However, our Definition 3.1 and analysis of Algorithm 2 assumed that the simulator always produces the correct answer. We can make the randomized query simulator satisfy this property by amplifying its error probability to δ ≪ 1 / q \delta\ll1/q δ ≪ 1/ q where q q q is the number of queries to the simulator made by Algorithm 2, and then applying a union bound over all q q q queries to bound the probability that any of them produce an incorrect answer. (This is done in the standard way of running the simulator O ( log ( 1 / δ ) ) O(\log(1/\delta)) O ( log ( 1/ δ )) independent times on each input x x x and taking the majority). This incurs an extra multiplicative O ( log q ) O(\log q) O ( log q ) query cost to the algorithm; in our application this is O ( log ( 1 / ε ) ) O(\log(1/\varepsilon)) O ( log ( 1/ ε )) .
Our function reconstructor will use two tools. The first is a self-corrector :
Definition 4.7 (Self-Corrector, [3 ] ). Let P \mathbb{P} P be a class of functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } . A self-corrector C C C for P \mathbb{P} P , with error rate η \eta η , is an algorithm that is given query access to a function f f f . On any query x x x , it produces an output b ( x ) b(x) b ( x ) which is random and independent of previous query values. It satisfies the property that, if f f f is η \eta η -close to a unique function g ∈ P g \in\mathbb{P} g ∈ P under Unif ( X ) \operatorname{Unif}(\mathcal{X}) Unif ( X ) , then on each query x x x , b ( x ) = g ( x ) b(x) = g(x) b ( x ) = g ( x ) with probability at least 2 / 3 2/3 2/3 .
Theorem 4.8 ([3 ] ). For all k k k , there is a self-corrector for the class of k k k -juntas with any error rate η < 2 − k − 3 \eta< 2^{-k-3} η < 2 − k − 3 and query cost O ( 2 k ) O(2^k) O ( 2 k ) , which queries f f f on a randomly chosen set of points depending only on the input point x x x .
The next is a distribution-specific tester for the class P ≤ k \mathbb{P}_{\le k} P ≤ k of conjunctions of length at most k k k :
Theorem 4.9 ([33 ] , Appendix C). There is a distribution-specific non-adaptive tester for P ≤ k \mathbb{P}_{\le k} P ≤ k under Unif ( { 0 , 1 } n ) \operatorname{Unif}(\{0,1\}^n) Unif ({ 0 , 1 } n ) with query cost poly ( k ) ⋅ O ~ ( 1 / ε 2 ) \operatorname{poly}(k) \cdot\widetilde{O}(1/\varepsilon^2) poly ( k ) ⋅ O ( 1/ ε 2 ) .
Table 3.
Proof of Theorem 1.9. The theorem follows from Lemma 4.10 below, combined with Remark 4.6 to derandomize the query simulator; Algorithm 2 will query the simulator O ( 1 / ε ) O(1/\varepsilon) O ( 1/ ε ) times, so it suffices to repeat each query to the simulator O ( log ( 1 / ε ) ) O(\log(1/\varepsilon)) O ( log ( 1/ ε )) times. Since the query simulator in Lemma 4.10 makes queries to the input f f f that depend only on the query x x x to the simulator (and not on the queries made by Algorithm 3), the resulting algorithm is non-adaptive.2
Lemma 4.10. Algorithm 3 is a non-adaptive function reconstructor for the class of conjunctions under D = { Unif ( { 0 , 1 } n ) } \mathcal{D} = \{\operatorname{Unif}(\{0,1\}^{n})\} D = { Unif ({ 0 , 1 } n )} , with sample cost O ( 1 / ε ) O(1/\varepsilon) O ( 1/ ε ) , query cost O ~ ( 1 / ε 2 ) \widetilde{O}(1/\varepsilon^{2}) O ( 1/ ε 2 ) , and simulation cost O ~ ( 1 / ε ) \widetilde{O}(1/\varepsilon) O ( 1/ ε ) . It outputs a (randomized) query simulator which, on any query x x x , queries the input f f f on a random set of points depending only on x x x .
Proof. The simulation cost is either 0 0 0 (if the constant 0 0 0 function is the output) or the query cost of C C C , which is O ( 2 k ) = O ( 1 / ε ) O(2^{k}) = O(1/\varepsilon) O ( 2 k ) = O ( 1/ ε ) . The algorithm is non-adaptive because the tester T k T_k T k is non-adaptive, and the reconstructor does not make any other queries.
Let p : = Pr x ∼ D [ f ( x ) = 1 ] p := \Pr_{x\sim\mathcal{D}}[f(x) = 1] p := Pr x ∼ D [ f ( x ) = 1 ] . By the Chernoff bound, we have with probability at least 9 / 10 9/10 9/10 the event p ≤ ε / 4 ⇒ p ^ ≤ ε / 2 p \le\varepsilon/4 \Rightarrow\widehat{p} \le\varepsilon/2 p ≤ ε /4 ⇒ p ≤ ε /2 and p > ε ⇒ p ^ > ε / 2 p > \varepsilon\Rightarrow\widehat{p} > \varepsilon/2 p > ε ⇒ p > ε /2 . Assume this event occurs, and that the tester T k T_k T k succeeds.
Let g g g be the function whose query simulator is produced. We first show that dist D ( g , P C o n j ) < ε \operatorname{dist}_{\mathcal{D}}(g, \mathcal{P}_{\mathrm{Conj}}) < \varepsilon dist D ( g , P Conj ) < ε . If g g g is the constant 0 0 0 function then this is true, so assume g g g is the function computed by the self-corrector C C C . Then p > ε / 4 p > \varepsilon/4 p > ε /4 and the tester T k T_k T k accepts, so f f f is ε / 64 \varepsilon/64 ε /64 -close to some conjunction h ∈ P ≤ k h \in\mathcal{P}_{\leq k} h ∈ P ≤ k under Unif ( { 0 , 1 } n ) \operatorname{Unif}(\{0,1\}^{n}) Unif ({ 0 , 1 } n ) . It follows that h h h is the unique k k k -junta that is ε / 64 \varepsilon/64 ε /64 -close to f f f under Unif ( { 0 , 1 } n ) \operatorname{Unif}(\{0,1\}^{n}) Unif ({ 0 , 1 } n ) , since otherwise, by the triangle inequality, there would be two distinct k k k -juntas that are at most 2 ⋅ ε / 64 < 2 − k 2 \cdot\varepsilon/64 < 2^{-k} 2 ⋅ ε /64 < 2 − k apart, a contradiction. So the self-corrector computes g = h ∈ P C o n j g = h \in\mathcal{P}_{\mathrm{Conj}} g = h ∈ P Conj .
Now suppose f ∈ P C o n j f \in\mathcal{P}_{\mathrm{Conj}} f ∈ P Conj and D = Unif ( { 0 , 1 } n ) \mathcal{D} = \operatorname{Unif}(\{0,1\}^{n}) D = Unif ({ 0 , 1 } n ) . First consider the case p ^ ≤ ε / 2 \widehat{p} \leq\varepsilon/2 p ≤ ε /2 so g g g is the constant 0 0 0 function. Then p < ε p < \varepsilon p < ε so dist D ( f , g ) = p < ε \operatorname{dist}_{\mathcal{D}}(f,g) = p < \varepsilon dist D ( f , g ) = p < ε as desired.
Next, suppose p ^ > ε / 2 \widehat{p} > \varepsilon/2 p > ε /2 , so p > ε / 4 p > \varepsilon/4 p > ε /4 . Since f f f is a conjunction and D = Unif ( { 0 , 1 } n ) \mathcal{D} = \operatorname{Unif}(\{0,1\}^{n}) D = Unif ({ 0 , 1 } n ) , we have ε / 4 < p ≤ 2 − L \varepsilon/4 < p \leq2^{-L} ε /4 < p ≤ 2 − L where L L L is the number of variables in the conjunction defining f f f . Therefore L ≤ ⌊ log ( 4 / ε ) ⌋ = k L \leq\lfloor\log(4/\varepsilon)\rfloor= k L ≤ ⌊ log ( 4/ ε )⌋ = k , so T k T_k T k will accept. As before, f f f is the unique k k k -junta that is ε / 64 \varepsilon/64 ε /64 -close to itself, so the self-corrector computes g = f g = f g = f .
Algorithmic Technique III: Distribution Testing
It is natural to try to use distribution testers to design distribution-robust testers. One of the first ideas one might think of is the following. An identity tester tests whether an unknown probability distribution D \mathcal{D} D is equal to (or far from) a fixed reference distribution D ∗ \mathcal{D}^{*} D ∗ . Informally, it draws samples from D \mathcal{D} D and its output should (with high probability) satisfy:
If D = D ∗ \mathcal{D} = \mathcal{D}^{*} D = D ∗ , output Accept;
If dist T V ( D , D ∗ ) > ε \operatorname{dist}_{\mathrm{TV}}(\mathcal{D},\mathcal{D}^{*}) > \varepsilon dist TV ( D , D ∗ ) > ε , output Reject.
As mentioned in the introduction, it is a good exercise to show how to combine a tester for D ∗ \mathcal{D}^{*} D ∗ with a D ∗ \mathcal{D}^{*} D ∗ -specific tester for a property P \mathcal{P} P into a { D ∗ } \{\mathcal{D}^{*}\} { D ∗ } -picky tester. Essentially, the procedure is:
Run the distribution tester on input distribution D \mathcal{D} D ; if it rejects, output Reject.
Run the D \mathbb{D} D -specific tester for P \mathbb{P} P on input f f f (and distribution D ∗ \mathcal{D}^* D ∗ ). If it rejects, output Reject, otherwise Accept.
The reason this works is that, if dist T V ( D , D ∗ ) < ε \operatorname{dist}_{\mathrm{TV}}(\mathcal{D},\mathcal{D}^*) < \varepsilon dist TV ( D , D ∗ ) < ε and dist D ∗ ( f , h ) < ε \operatorname{dist}_{\mathcal{D}^*}(f,h) < \varepsilon dist D ∗ ( f , h ) < ε , then dist D ( f , h ) < 2 ε \operatorname{dist}_{\mathcal{D}}(f,h) < 2\varepsilon dist D ( f , h ) < 2 ε , so when the tester accepts we can be confident that dist D ( f , P ) < 2 ε \operatorname{dist}_{\mathcal{D}}(f,\mathbb{P}) < 2\varepsilon dist D ( f , P ) < 2 ε .
The problem with this strategy is that identity testing is quite expensive, requiring Ω ( ∣ X ∣ 1 / 2 ) \Omega(|\mathcal{X}|^{1/2}) Ω ( ∣ X ∣ 1/2 ) samples when D ∗ \mathcal{D}^* D ∗ is the uniform distribution over a finite domain X \mathcal{X} X [54 ] . In this section we will give three results:
A general method for improving upon the above identity testing method, using the notion of fooling distance from [9 ] (§ 5.1 ).
An example application of this technique, where we get a distribution-robust tester with cost O ( k / ε 2 ) O(\sqrt{k}/\varepsilon^2) O ( k / ε 2 ) for the class I k \mathbb{I}_k I k of unions of k k k intervals over [ 0 , 1 ] [0,1] [ 0 , 1 ] , with respect to any fixed singleton class D = { D ∗ } \mathbb{D} = \{\mathcal{D}^*\} D = { D ∗ } (§ 5.2 ).
An ad-hoc proof improving this result for I k \mathbb{I}_k I k to query and sample cost O ( 1 / ε 4 ) O(1/\varepsilon^4) O ( 1/ ε 4 ) (§ 5.3 ).
General Method: Fooling Distance
What makes the identity-testing method work is the implication
( dist T V ( D , D ∗ ) < ε ∧ dist D ∗ ( f , h ) < ε ) ⟹ dist D ( f , h ) < 2 ε \left(\operatorname{dist}_{\mathrm{TV}}(\mathcal{D},\mathcal{D}^*) < \varepsilon\land\operatorname{dist}_{\mathcal{D}^*}(f,h) < \varepsilon\right) \Longrightarrow\operatorname{dist}_{\mathcal{D}}(f,h) < 2\varepsilon ( dist TV ( D , D ∗ ) < ε ∧ dist D ∗ ( f , h ) < ε ) ⟹ dist D ( f , h ) < 2 ε
for any two functions f , h f,h f , h , which holds because the guarantee dist T V ( D , D ∗ ) < ε \operatorname{dist}_{\mathrm{TV}}(\mathcal{D},\mathcal{D}^*) < \varepsilon dist TV ( D , D ∗ ) < ε bounds the difference in probabilities between D \mathcal{D} D and D ∗ \mathcal{D}^* D ∗ of the event x ∈ { x ∈ X ∣ f ( x ) ≠ h ( x ) } x \in\{x \in\mathcal{X} \mid f(x) \ne h(x)\} x ∈ { x ∈ X ∣ f ( x ) = h ( x )} . Ensuring the guarantee dist T V ( D , D ∗ ) < ε \operatorname{dist}_{\mathrm{TV}}(\mathcal{D},\mathcal{D}^*) < \varepsilon dist TV ( D , D ∗ ) < ε is the job of the identity tester, and this is expensive.
We can get more efficient algorithms by observing that, for input f f f , we only care about the family of events of the form
x ∈ { x ∈ X ∣ f ( x ) ≠ g ( x ) } for g ∈ P , x \in\{x \in\mathcal{X} \mid f(x) \ne g(x)\}\text{ for }g \in\mathbb{P}, x ∈ { x ∈ X ∣ f ( x ) = g ( x )} for g ∈ P ,
rather than arbitrary g g g . If we write
f ⊕ P : = { f ⊕ g ∣ g ∈ P } , f \oplus\mathbb{P} := \{f \oplus g \mid g \in\mathbb{P}\}, f ⊕ P := { f ⊕ g ∣ g ∈ P } ,
then we want to replace the expensive identity tester with a tester that outputs Reject when
ε < dist f ⊕ P ( D , D ∗ ) : = sup h ∈ f ⊕ P ∣ E D [ h ] − E D ∗ [ h ] ∣ . \varepsilon< \operatorname{dist}_{f \oplus\mathbb{P}}(\mathcal{D},\mathcal{D}^*) := \sup_{h \in f \oplus\mathbb{P}} \left|\mathbb{E}_{\mathcal{D}}[h] - \mathbb{E}_{\mathcal{D}^*}[h]\right|. ε < dist f ⊕ P ( D , D ∗ ) := h ∈ f ⊕ P sup ∣ E D [ h ] − E D ∗ [ h ] ∣ .
where we have here used the definition of fooling distance between two distributions (c.f. [9 ] ): For a family H \mathbb{H} H of functions X → { 0 , 1 } \mathcal{X} \to\{0,1\} X → { 0 , 1 } , the H \mathbb{H} H -fooling distance between distributions D \mathcal{D} D and E \mathcal{E} E is
dist H ( D , E ) : = sup h ∈ H ∣ E D [ h ] − E E [ h ] ∣ . \operatorname{dist}_{\mathbb{H}}(\mathcal{D},\mathcal{E}) := \sup_{h \in\mathbb{H}} \left|\mathbb{E}_{\mathcal{D}}[h] - \mathbb{E}_{\mathcal{E}}[h]\right|. dist H ( D , E ) := h ∈ H sup ∣ E D [ h ] − E E [ h ] ∣ .
We would then like to replace the identity tester with a tester that accepts when D = D ∗ \mathcal{D} = \mathcal{D}^* D = D ∗ and rejects when dist f ⊕ P ( D , D ∗ ) > ε \operatorname{dist}_{f \oplus\mathbb{P}}(\mathcal{D},\mathcal{D}^*) > \varepsilon dist f ⊕ P ( D , D ∗ ) > ε . Formally, we would like a tester satisfying the following definition for H = f ⊕ P \mathbb{H} = f \oplus\mathbb{P} H = f ⊕ P :
Definition 5.1. An identity tester for D ∗ \mathcal{D}^* D ∗ against H \mathbb{H} H with sample cost s ( ε , δ ) s(\varepsilon,\delta) s ( ε , δ ) is an algorithm that draws s ( ε , δ ) s(\varepsilon,\delta) s ( ε , δ ) samples from input distribution D \mathcal{D} D and whose output satisfies the following, with probability at least 1 − δ 1-\delta 1 − δ :
If D = D ∗ \mathcal{D}=\mathcal{D}^{*} D = D ∗ then the algorithm outputs Accept;
If dist H ( D , D ∗ ) > ε \operatorname{dist}_{\mathbb{H}}(\mathcal{D},\mathcal{D}^{*})>\varepsilon dist H ( D , D ∗ ) > ε then the algorithm outputs Reject.
Naïvely attempting to apply this definition with H = f ⊕ P \mathbb{H}=f\oplus\mathbb{P} H = f ⊕ P is awkward because we would need to design a tester whose definition depends on the unknown input f f f . We would like a single algorithm that works against all f ⊕ P f\oplus\mathbb{P} f ⊕ P simultaneously. This is given by the following lemma of [9 ] :
Lemma 5.2 (Lemma 4.7 of [9 ] ). Let X \mathcal{X} X be a domain, D ∗ ∈ Δ ( X ) \mathcal{D}^{*}\in\Delta(\mathcal{X}) D ∗ ∈ Δ ( X ) be a distribution, and P ⊆ { 0 , 1 } X \mathbb{P}\subseteq\{0,1\}^{\mathcal{X}} P ⊆ { 0 , 1 } X be a property. Suppose algorithm T \mathcal{T} T is an identity tester for D ∗ \mathcal{D}^{*} D ∗ against P \mathbb{P} P with sample complexity s ( ε , δ ) s(\varepsilon,\delta) s ( ε , δ ) . Then there is an algorithm T ′ \mathcal{T}' T ′ which, given sample access to input distribution D ∈ Δ ( X ) \mathcal{D}\in\Delta(\mathcal{X}) D ∈ Δ ( X ) and query access to input function f : X → { 0 , 1 } f:\mathcal{X}\to\{0,1\} f : X → { 0 , 1 } , uses at most O ( s ( ε 7 ˉ , δ 4 ) + log ( 1 / δ ) ε 2 ) O\left(s\left(\frac{\varepsilon}{\bar{7}},\frac{\delta}{4}\right)+\frac{\log(1/\delta)}{\varepsilon^{2}}\right) O ( s ( 7 ˉ ε , 4 δ ) + ε 2 l o g ( 1/ δ ) ) samples and queries and has the following performance guarantee:
Completeness: If D = D ∗ \mathcal{D}=\mathcal{D}^{*} D = D ∗ , then T ′ \mathcal{T}' T ′ outputs Accept with probability at least 1 − δ 1-\delta 1 − δ .
Soundness: If dist f ⊕ P ( D , D ∗ ) > ε \operatorname{dist}_{f\oplus\mathbb{P}}(\mathcal{D},\mathcal{D}^{*})>\varepsilon dist f ⊕ P ( D , D ∗ ) > ε , then T ′ \mathcal{T}' T ′ outputs Reject with probability at least 1 − δ 1-\delta 1 − δ .
At a high level, the algorithm of [9 ] works by creating two “synthetic distributions” μ \mu μ and ν \nu ν , each of which combines the conditional distributions of D \mathcal{D} D and D ∗ \mathcal{D}^{*} D ∗ on f − 1 ( 0 ) f^{-1}(0) f − 1 ( 0 ) and f − 1 ( 1 ) f^{-1}(1) f − 1 ( 1 ) ; samples from μ \mu μ and ν \nu ν can be obtained using samples from D \mathcal{D} D and D ∗ \mathcal{D}^{*} D ∗ along with queries to f f f . The algorithm performs the test T \mathcal{T} T on μ \mu μ and ν \nu ν , and accepts if and only if both tests accept. When D = D ∗ \mathcal{D}=\mathcal{D}^{*} D = D ∗ , we have μ = ν = D ∗ \mu=\nu=\mathcal{D}^{*} μ = ν = D ∗ and the tests accept, so T ′ \mathcal{T}' T ′ accepts. On the other hand, when dist f ⊕ P ( D , D ∗ ) > ε \operatorname{dist}_{f\oplus\mathbb{P}}(\mathcal{D},\mathcal{D}^{*})>\varepsilon dist f ⊕ P ( D , D ∗ ) > ε , it can be shown that μ \mu μ or ν \nu ν is far from D ∗ \mathcal{D}^{*} D ∗ under dist P \operatorname{dist}_{\mathbb{P}} dist P , so that at least one execution of T \mathcal{T} T rejects and hence so does T ′ \mathcal{T}' T ′ .
Moreover, inspecting [9 ] shows that the algorithm T ′ \mathcal{T}' T ′ obtained above is non-adaptive, because it only queries f f f at points sampled from D \mathcal{D} D or D ∗ \mathcal{D}^{*} D ∗ , with no dependence between the queries. We can now present a formal generalization of the identity testing algorithm.
Algorithm 4 Distribution-picky tester via fooling distance
Requirements:
T D ∗ \mathcal{T}_{\mathcal{D}^{*}} T D ∗ is an identity tester for D ∗ \mathcal{D}^{*} D ∗ against P \mathbb{P} P .
T D ∗ ′ \mathcal{T}'_{\mathcal{D}^{*}} T D ∗ ′ is the algorithm constructed from T D ∗ \mathcal{T}_{\mathcal{D}^{*}} T D ∗ in Lemma 5.2 .
T P \mathcal{T}_{\mathbb{P}} T P is a { D ∗ } \{\mathcal{D}^{*}\} { D ∗ } -specific tester for P \mathbb{P} P .
Input:
Query access to f : X → { 0 , 1 } f:\mathcal{X}\to\{0,1\} f : X → { 0 , 1 } ,
Access to i.i.d. samples ( x , f ( x ) ) x ∼ D (x,f(x))_{x\sim\mathcal{D}} ( x , f ( x ) ) x ∼ D ,
Closeness parameter ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) .
procedure PickyTest-via-FoolingDistance
Run the tester T D ∗ ′ \mathcal{T}'_{\mathcal{D}^{*}} T D ∗ ′ using samples from D \mathcal{D} D with distance parameter ε / 2 \varepsilon/2 ε /2 and failure probability 1 / 8 1/8 1/8 . If it outputs Reject, output Reject. ▷ Uses samples from D \mathcal{D} D and queries to f f f .
Run the { D ∗ } \{\mathcal{D}^{*}\} { D ∗ } -specific tester T P \mathcal{T}_{\mathbb{P}} T P with distance parameter ε / 2 \varepsilon/2 ε /2 and failure probability 1 / 8 1/8 1/8 on input f f f . If T P \mathcal{T}_{\mathbb{P}} T P outputs Reject, then output Reject. ▷ Uses queries to f f f .
Output Accept.
Lemma 5.3 (Picky testing via fooling distance). Let X \mathcal{X} X be a domain, P ⊂ { 0 , 1 } X \mathbb{P} \subset\{0,1\}^{\mathcal{X}} P ⊂ { 0 , 1 } X be a property, and D ∗ \mathcal{D}^{*} D ∗ be a distribution. Suppose that algorithm T D ∗ T_{\mathcal{D}^{*}} T D ∗ is an identity tester for D ∗ \mathcal{D}^{*} D ∗ against P \mathbb{P} P with sample complexity s ( ε , δ ) s(\varepsilon,\delta) s ( ε , δ ) and that algorithm T P T_{\mathbb{P}} T P is a { D ∗ } \{\mathcal{D}^{*}\} { D ∗ } -specific tester for P \mathbb{P} P with query³ complexity q ( ε , δ ) q(\varepsilon,\delta) q ( ε , δ ) . Then Algorithm 4 is a distribution-picky tester for P \mathbb{P} P with respect to D = { D ∗ } \mathbb{D}=\{\mathcal{D}^{*}\} D = { D ∗ } with sample complexity m = O ( s ( ε 14 , 1 32 ) + 1 ε 2 ) m=O\left(s\left(\frac{\varepsilon}{14},\frac{1}{32}\right)+\frac{1}{\varepsilon^{2}}\right) m = O ( s ( 14 ε , 32 1 ) + ε 2 1 ) and query complexity m + q ( ε 2 , 1 8 ) m+q\left(\frac{\varepsilon}{2},\frac{1}{8}\right) m + q ( 2 ε , 8 1 ) . Moreover, that tester is non-adaptive if T P T_{\mathbb{P}} T P is.
Proof. The sample complexity and query complexity of Algorithm 4 are evident from inspection, as is the non-adaptivity claim, so it remains to verify correctness.
Completeness. Suppose f ∈ P f\in\mathbb{P} f ∈ P and the input distribution is D = D ∗ \mathcal{D}=\mathcal{D}^{*} D = D ∗ . By the completeness guarantees of the tester T D ∗ T_{\mathcal{D}^{*}} T D ∗ from Lemma 5.2 and the distribution-specific tester T P T_{\mathbb{P}} T P , each tester outputs Accept with probability at least 7 / 8 7/8 7/8 , so, by the union bound, the algorithm fails with probability at most 1 / 4 1/4 1/4 .
Soundness. Suppose dist D ( f , P ) > ε \operatorname{dist}_{\mathcal{D}}(f,\mathbb{P})>\varepsilon dist D ( f , P ) > ε . If dist f ⊕ P ( D , D ∗ ) > ε / 2 \operatorname{dist}_{f\oplus\mathbb{P}}(\mathcal{D},\mathcal{D}^{*})>\varepsilon/2 dist f ⊕ P ( D , D ∗ ) > ε /2 , then the soundness guarantee of T D ∗ T_{\mathcal{D}^{*}} T D ∗ from Lemma 5.2 implies that it will Reject with probability at least 7 / 8 7/8 7/8 , and hence the whole algorithm rejects with probability at least 7 / 8 7/8 7/8 .
Now suppose dist f ⊕ P ( D , D ∗ ) ≤ ε / 2 \operatorname{dist}_{f\oplus\mathbb{P}}(\mathcal{D},\mathcal{D}^{*})\leq\varepsilon/2 dist f ⊕ P ( D , D ∗ ) ≤ ε /2 . Then for all g ∈ P g\in\mathbb{P} g ∈ P ,
∣ dist D ( f , g ) − dist D ∗ ( f , g ) ∣ = ∣ E D [ f ⊕ g ] − E D ∗ [ f ⊕ g ] ∣ ≤ sup h ∈ f ⊕ P ∣ E D [ h ] − E D ∗ [ h ] ∣ = dist f ⊕ P ( D , D ∗ ) ≤ ε / 2. \left|\operatorname{dist}_{\mathcal{D}}(f,g)-\operatorname{dist}_{\mathcal{D}^{*}}(f,g)\right|=\left|\mathbb{E}_{\mathcal{D}}[f\oplus g]-\mathbb{E}_{\mathcal{D}^{*}}[f\oplus g]\right|\leq\sup_{h\in f\oplus\mathbb{P}}\left|\mathbb{E}_{\mathcal{D}}[h]-\mathbb{E}_{\mathcal{D}^{*}}[h]\right|=\operatorname{dist}_{f\oplus\mathbb{P}}(\mathcal{D},\mathcal{D}^{*})\leq\varepsilon/2. ∣ dist D ( f , g ) − dist D ∗ ( f , g ) ∣ = ∣ E D [ f ⊕ g ] − E D ∗ [ f ⊕ g ] ∣ ≤ h ∈ f ⊕ P sup ∣ E D [ h ] − E D ∗ [ h ] ∣ = dist f ⊕ P ( D , D ∗ ) ≤ ε /2.
which implies
dist D ∗ ( f , g ) ≥ dist D ( f , g ) − ε 2 > ε 2 . \operatorname{dist}_{\mathcal{D}^{*}}(f,g)\geq\operatorname{dist}_{\mathcal{D}}(f,g)-\frac{\varepsilon}{2}>\frac{\varepsilon}{2}. dist D ∗ ( f , g ) ≥ dist D ( f , g ) − 2 ε > 2 ε .
Since this holds for all g ∈ P g\in\mathbb{P} g ∈ P , the tester T P T_{\mathbb{P}} T P will Reject with probability at least 7 / 8 7/8 7/8 as desired. □
Application: Unions of Intervals
As an example application, we use the fooling distance method to get the following result on distribution-robust testing of unions of k k k intervals. Let I k \mathbb{I}_{k} I k denote the class of unions of at most k k k intervals over [ 0 , 1 ] [0,1] [ 0 , 1 ] , that is, f : [ 0 , 1 ] → { 0 , 1 } f:[0,1]\to\{0,1\} f : [ 0 , 1 ] → { 0 , 1 } is in I k \mathbb{I}_{k} I k if and only if there exist intervals ( [ ℓ i , r i ] : i ∈ [ k ′ ] ) ([\ell_i,r_i]:i\in[k']) ([ ℓ i , r i ] : i ∈ [ k ′ ]) for some k ′ ≤ k k'\leq k k ′ ≤ k such that f ( x ) = 1 f(x)=1 f ( x ) = 1 if and only if x ∈ [ ℓ i , r i ] x\in[\ell_i,r_i] x ∈ [ ℓ i , r i ] for some i ∈ [ k ′ ] i\in[k'] i ∈ [ k ′ ] .
Theorem 5.4. Let D ∗ \mathcal{D}^{*} D ∗ be any fixed distribution over [ 0 , 1 ] [0,1] [ 0 , 1 ] . There is a non-adaptive { D ∗ } \{\mathcal{D}^{*}\} { D ∗ } -robust tester for I k \mathbb{I}_{k} I k with sample complexity O ( k ε 2 ) O\left(\frac{\sqrt{k}}{\varepsilon^{2}}\right) O ( ε 2 k ) and query complexity O ( k ε 2 + 1 ε 4 ) O\left(\frac{\sqrt{k}}{\varepsilon^{2}}+\frac{1}{\varepsilon^{4}}\right) O ( ε 2 k + ε 4 1 ) .
To prove this theorem, we require two results from the literature. The first, from [4 ] , gives a distribution-specific tester for I k \mathbb{I}_{k} I k with respect to any fixed distribution D ∗ \mathcal{D}^{*} D ∗ over [ 0 , 1 ] [0,1] [ 0 , 1 ] using O ( 1 / ε 4 ) O(1/\varepsilon^{4}) O ( 1/ ε 4 ) queries.
Theorem 5.5 ([4 ] ). Let D ∗ \mathcal{D}^{*} D ∗ be a fixed distribution over [ 0 , 1 ] [0,1] [ 0 , 1 ] . There is a non-adaptive distribution-specific tester for I k \mathbb{I}_{k} I k with respect to D = { D ∗ } \mathbb{D}=\{\mathcal{D}^{*}\} D = { D ∗ } with query complexity q ( ε , δ ) = O ( log ( 1 / δ ) ε 4 ) q(\varepsilon,\delta)=O\left(\frac{\log(1/\delta)}{\varepsilon^{4}}\right) q ( ε , δ ) = O ( ε 4 l o g ( 1/ δ ) ) .
Remark 5.6. The result of [4 ] holds in the more challenging model of active property testing, where the algorithm must draw samples from D ∗ D^* D ∗ and can only query f f f at points that appeared in the sample. In that context, the number of samples drawn from D ∗ D^* D ∗ is also relevant, and [4 ] showed that O ( k / ε 5 ) O(\sqrt{k}/\varepsilon^5) O ( k / ε 5 ) samples suffice. In the present setting, the distribution D ∗ D^* D ∗ is fixed and known to the algorithm, so the distribution-specific tester can draw its own samples and only requires query access to f f f .
The second result, from [32 ] , gives a distribution tester for any fixed distribution D ∗ D^* D ∗ against family I k \mathcal{I}_k I k (in the language of that paper, this is the task of identity testing against A k A_k A k -distance) using O ( k / ε 2 ) O(\sqrt{k}/\varepsilon^2) O ( k / ε 2 ) samples.
Theorem 5.7 ([32 ] ). Let D ∗ D^* D ∗ be a fixed distribution over [ 0 , 1 ] [0,1] [ 0 , 1 ] . There is a distribution tester for D ∗ D^* D ∗ against I k \mathcal{I}_k I k with sample complexity s ( ε , δ ) = O ( k log ( 1 / δ ) ε 2 ) s(\varepsilon,\delta)=O\left(\frac{\sqrt{k}\log(1/\delta)}{\varepsilon^2}\right) s ( ε , δ ) = O ( ε 2 k l o g ( 1/ δ ) ) .
We get Theorem 5.4 by applying these two theorems with Lemma 5.3 to get a { D ∗ } \{D^*\} { D ∗ } -picky tester for every fixed distribution D ∗ D^* D ∗ over [ 0 , 1 ] [0,1] [ 0 , 1 ] , and then applying Lemma 2.2 to get the { D ∗ } \{D^*\} { D ∗ } -robust tester.
Theorem 5.4 is a positive result in the sense that no distribution-free tester for I k \mathcal{I}_k I k with query complexity o ( k ) o(k) o ( k ) is known. On the other hand, the best known query complexity lower bound for distribution-free testing I k \mathcal{I}_k I k is Ω ( k ) \Omega(\sqrt{k}) Ω ( k ) [4 ] , so Theorem 5.4 does not establish that I k \mathcal{I}_k I k witnesses a separation between the two models. Next, we show a much stronger positive result for distribution-robustly testing I k \mathcal{I}_k I k by directly extending the techniques of [4 ] .
Ad-Hoc Improvement for Unions of Intervals
We now give a better tester for unions of k k k intervals, albeit with a specialized technique that is specific to this class, unlike the general method above.
Theorem 1.10. For every distribution D ∗ D^* D ∗ over [ 0 , 1 ] [0,1] [ 0 , 1 ] , there is a { D ∗ } \{D^*\} { D ∗ } -robust tester for unions of k k k intervals, with non-adaptive query and sample cost O ( 1 / ε 4 ) O(1/\varepsilon^4) O ( 1/ ε 4 ) .
Our tester essentially upgrades the distribution-specific tester of [4 ] to be distribution-picky.
Remark 5.8. For simplicity of exposition, we make the following simplifications.
First, we will prove the theorem only for the case D ∗ = Unif ( [ 0 , 1 ] ) D^*=\operatorname{Unif}([0,1]) D ∗ = Unif ([ 0 , 1 ]) . By an argument of [4 ] , the { D ∗ } \{D^*\} { D ∗ } -specific testing in the general case reduces to the uniform case, and the same argument works for distribution-picky testing.
Second, to eliminate boundary edge cases, it is helpful to assume that f = 0 f=0 f = 0 near the endpoints of the domain, say, on [ 0 , 1 / 4 ) ∪ ( 3 / 4 , 1 ] [0,1/4)\cup(3/4,1] [ 0 , 1/4 ) ∪ ( 3/4 , 1 ] . This is without loss of generality for distribution-picky testing with respect to U \mathcal{U} U for the following reason. On input function f f f and input distribution D D D , a tester may simulate 1) query access to function f ′ : [ 0 , 1 ] → { 0 , 1 } f':[0,1]\to\{0,1\} f ′ : [ 0 , 1 ] → { 0 , 1 } given by f ′ ( x ) : = f ( 2 x − 1 2 ) f'(x):=f(2x-\frac{1}{2}) f ′ ( x ) := f ( 2 x − 2 1 ) for x ∈ [ 1 / 4 , 3 / 4 ] x\in[1/4,3/4] x ∈ [ 1/4 , 3/4 ] , and f ′ ( x ) : = 0 f'(x):=0 f ′ ( x ) := 0 otherwise; and 2) sample access to distribution D ′ D' D ′ given as follows: to produce a sample from D ′ D' D ′ , with probability 1 / 2 1/2 1/2 sample x ∼ D x\sim D x ∼ D and output 1 4 + x 2 \frac{1}{4}+\frac{x}{2} 4 1 + 2 x , and with probability 1 / 2 1/2 1/2 output a uniformly random sample from [ 0 , 1 / 4 ) ∪ ( 3 / 4 , 1 ] [0,1/4)\cup(3/4,1] [ 0 , 1/4 ) ∪ ( 3/4 , 1 ] . If f ∈ I k f\in\mathcal{I}_k f ∈ I k , then f ′ ∈ I k f'\in\mathcal{I}_k f ′ ∈ I k . Also, dist D ′ ( f ′ , I k ) = 1 2 dist D ( f , I k ) \operatorname{dist}_{D'}(f',\mathcal{I}_k)=\frac{1}{2}\operatorname{dist}_{D}(f,\mathcal{I}_k) dist D ′ ( f ′ , I k ) = 2 1 dist D ( f , I k ) . Moreover, if D = U D=\mathcal{U} D = U then D ′ = U D'=\mathcal{U} D ′ = U as well. Therefore, on inputs f f f and D D D , it suffices for the distribution-picky tester to simulate queries from f ′ f' f ′ and samples from D ′ D' D ′ with distance parameter ε / 2 \varepsilon/2 ε /2 . Therefore, going forward we assume without loss of generality that f = 0 f=0 f = 0 on [ 0 , 1 / 4 ) ∪ ( 3 / 4 , 1 ] [0,1/4)\cup(3/4,1] [ 0 , 1/4 ) ∪ ( 3/4 , 1 ] .
Table 5.
Noise Sensitivity
The key observation of [4 ] is that the noise sensitivity of f f f characterizes its distance to the class I k \mathcal{I}_k I k of unions of k k k -intervals. For parameter ρ > 0 \rho>0 ρ > 0 , the local ρ \rho ρ -noise sensitivity of f f f at point x ∈ [ 0 , 1 ] x\in[0,1] x ∈ [ 0 , 1 ] is
NS ρ ( f , x ) : = Pr y ∼ ρ x [ f ( x ) ≠ f ( y ) ] , \operatorname{NS}_{\rho}(f,x):=\Pr_{y\sim_{\rho}x}[f(x)\ne f(y)], NS ρ ( f , x ) := y ∼ ρ x Pr [ f ( x ) = f ( y )] ,
where we write y ∼ ρ x y\sim_{\rho}x y ∼ ρ x to denote that y y y is uniformly distributed in the interval ( x − ρ , x + ρ ) (x-\rho,x+\rho) ( x − ρ , x + ρ ) , and set f ( x ) : = 0 f(x):=0 f ( x ) := 0 at x ∈ R ∖ [ 0 , 1 ] x\in\mathbb{R}\setminus[0,1] x ∈ R ∖ [ 0 , 1 ] by convention4 . The ρ \rho ρ -noise sensitivity of f f f with respect to distribution E \mathcal{E} E (over [ 0 , 1 ] [0,1] [ 0 , 1 ] ) is
NS ρ E ( f ) : = E x ∼ E [ NS ρ ( f , x ) ] . \operatorname{NS}_{\rho}^{\mathcal{E}}(f):=\mathbb{E}_{x\sim\mathcal{E}}[\operatorname{NS}_{\rho}(f,x)]. NS ρ E ( f ) := E x ∼ E [ NS ρ ( f , x )] .
([4 ] only define this for the uniform distribution E = U \mathcal{E}=\mathcal{U} E = U , but we require the general case.)
Noise sensitivity characterizes the distance to I k \mathcal{I}_k I k as follows. Fix ρ : = ε 2 64 k \rho:=\frac{\varepsilon^2}{64k} ρ := 64 k ε 2 , as in Algorithm 5. The next claim is from [4 ] .
Lemma 5.9 (Proposition 3.3 of [4 ] ). Suppose f ∈ I k f\in\mathcal{I}_k f ∈ I k . Then NS ρ U ( f ) ≤ k ρ \operatorname{NS}_{\rho}^{\mathcal{U}}(f)\le k\rho NS ρ U ( f ) ≤ k ρ .
The final claim we require is a generalization of a proof from [4 ] . By following the proof of Lemma 3.4 of [4 ] , which we do in Section A, we get:
Lemma 5.10. Suppose max { NS ρ U ( f ) , NS ρ D ( f ) } ≤ k ρ ( 1 + ε 4 ) \max\{\operatorname{NS}_{\rho}^{\mathcal{U}}(f),\operatorname{NS}_{\rho}^{\mathcal{D}}(f)\}\le k\rho(1+\frac{\varepsilon}{4}) max { NS ρ U ( f ) , NS ρ D ( f )} ≤ k ρ ( 1 + 4 ε ) . Then dist D ( f , I k ) ≤ ε \operatorname{dist}_{\mathcal{D}}(f,\mathcal{I}_k)\le\varepsilon dist D ( f , I k ) ≤ ε .
Algorithm and Analysis
Algorithm 5 extends the algorithm of [4 ] by separately estimating both NS ρ U \operatorname{NS}_{\rho}^{\mathcal{U}} NS ρ U and NS ρ D \operatorname{NS}_{\rho}^{\mathcal{D}} NS ρ D and tracking how the structural results of [4 ] depend on these two quantities.
The following theorem implies Theorem 1.10 via Lemma 2.2 and Remark 5.8.
Theorem 5.11. Algorithm 5 is a non-adaptive distribution-picky tester for I k \mathbb{I}_k I k with respect to D = { Unif ( [ 0 , 1 ] ) } \mathcal{D} = \{\operatorname{Unif}([0,1])\} D = { Unif ([ 0 , 1 ])} with query complexity O ( 1 / ε 4 ) O(1/\varepsilon^4) O ( 1/ ε 4 ) and sample complexity O ( 1 / ε 4 ) O(1/\varepsilon^4) O ( 1/ ε 4 ) .
Proof. The query and sample cost claims are immediate, as is non-adaptivity, so we now show correctness.
Completeness. Suppose f ∈ I k f \in\mathbb{I}_k f ∈ I k and D = U \mathcal{D} = \mathcal{U} D = U . By Lemma 5.9 , NS ρ U ( f ) ≤ k ρ \operatorname{NS}_{\rho}^{\mathcal{U}}(f) \le k\rho NS ρ U ( f ) ≤ k ρ . It follows by a Chernoff bound that Z U ≤ k ρ ( 1 + ε 8 ) Z_{\mathcal{U}} \le k\rho\left(1+\frac{\varepsilon}{8}\right) Z U ≤ k ρ ( 1 + 8 ε ) with probability at least 7 / 8 7/8 7/8 , as long as the constant in the choice of r = Θ ( 1 / ε 4 ) r = \Theta(1/\varepsilon^4) r = Θ ( 1/ ε 4 ) is sufficiently large. Since D = U \mathcal{D} = \mathcal{U} D = U , we similarly have that Z D ≤ k ρ ( 1 + ε 8 ) Z_{\mathcal{D}} \le k\rho\left(1+\frac{\varepsilon}{8}\right) Z D ≤ k ρ ( 1 + 8 ε ) with probability at least 7 / 8 7/8 7/8 . By a union bound, both events hold simultaneously with probability at least 3 / 4 3/4 3/4 , and in this case the tester outputs Accept.
Soundness. Suppose dist D ( f , I k ) > ε \operatorname{dist}_{\mathcal{D}}(f,\mathbb{I}_k) > \varepsilon dist D ( f , I k ) > ε . By Lemma 5.10, max { NS ρ U ( f ) , NS ρ D ( f ) } > k ρ ( 1 + ε 4 ) \max\{\operatorname{NS}_{\rho}^{\mathcal{U}}(f),\operatorname{NS}_{\rho}^{\mathcal{D}}(f)\} > k\rho\left(1+\frac{\varepsilon}{4}\right) max { NS ρ U ( f ) , NS ρ D ( f )} > k ρ ( 1 + 4 ε ) . Then, as above, a Chernoff bound implies that, with probability at least 3 / 4 3/4 3/4 , either Z U > k ρ ( 1 + ε 8 ) Z_{\mathcal{U}} > k\rho\left(1+\frac{\varepsilon}{8}\right) Z U > k ρ ( 1 + 8 ε ) or Z D > k ρ ( 1 + ε 8 ) Z_{\mathcal{D}} > k\rho\left(1+\frac{\varepsilon}{8}\right) Z D > k ρ ( 1 + 8 ε ) , and hence the tester outputs Reject.
Sample-Based Testing
The previous sections established the separations between query-based distribution-specific, distribution-robust, and distribution-free testing that were summarized in Figure 1 and Table 1 . In this section we establish the claimed separations for sample-based testers; recall that these are algorithms that do not make any queries but instead only use random labeled samples ( x , f ( x ) ) x ∼ D (x,f(x))_{x\sim\mathcal{D}} ( x , f ( x ) ) x ∼ D .
Prelude: Separating query- and sample-based distribution-robust testing. Before turning to separations between different sample-based testing models, we first observe that for some natural properties, sample-based distribution-robust testers can sometimes inherently be less efficient than query-based distribution-robust testers. This is an easy consequence of the results we established earlier for distribution-robust testing of conjunctions using queries and the following folklore lower bound for sample-based conjunction testing:
Observation 6.1 (Query-based distribution-robust testers can be more efficient than sample-based distribution-robust testers). Any sample-based distribution-robust tester for the class of conjunctions with respect to the uniform distribution must use at least Ω ( log n ) \Omega(\log n) Ω ( log n ) samples even if the distance parameter ε \varepsilon ε is an absolute constant such as 0.01.
Observation 6.1 is an easy consequence of the well known fact that any algorithm that only receives, say, 1 2 log n \frac{1}{2}\log n 2 1 log n independent samples of the form ( x , f ( x ) ) x ∼ Unif ( { 0 , 1 } n ) (x,f(x))_{x\sim\operatorname{Unif}(\{0,1\}^n)} ( x , f ( x ) ) x ∼ Unif ({ 0 , 1 } n ) cannot distinguish between the two possibilities that (i) f f f is a uniform random Boolean function (in which case f f f is far from every conjunction with extremely high probability), versus (ii) f f f is a uniform random dictator drawn from { x 1 , … , x n } \{x_1,\ldots,x_n\} { x 1 , … , x n } (in which case f f f is a conjunction). Theorem 1.9 and Observation 6.1 together show that conjunctions are distribution-robustly testable with constant complexity if both queries and samples are allowed (even without adaptivity), but if queries are disallowed then at least a logarithmic number of samples is required.
Separating distribution-specific and distribution-robust sample-based testing. As explained in the introduction, this separation is based on a result from a companion paper [2 ] on distribution-robust testing of halfspaces over R n \mathbb{R}^n R n with respect to the standard Gaussian distribution D = { N ( 0 , I n ) } \mathbb{D}=\{\mathcal{N}(0,I_n)\} D = { N ( 0 , I n )} . As was described earlier, the main lower bound result of [2 ] states that every sample-based distribution-robust halfspace tester with respect to the standard Gaussian N ( 0 , I n ) \mathcal{N}(0,I_n) N ( 0 , I n ) requires at least Ω ~ ( n 2 / 3 ) \widetilde{\Omega}(n^{2/3}) Ω ( n 2/3 ) samples. In contrast, sample-based distribution-specific halfspace testers with respect to N ( 0 , I n ) \mathcal{N}(0,I_n) N ( 0 , I n ) are known that use only O ~ ( n 1 / 2 ) ⋅ poly ( 1 / ε ) \widetilde{O}(n^{1/2})\cdot\operatorname{poly}(1/\varepsilon) O ( n 1/2 ) ⋅ poly ( 1/ ε ) samples [4 , 44 ] .
Separating distribution-robust and distribution-free sample-based testing. As stated earlier, [28 ] showed that any distribution-free tester for conjunctions must have complexity Ω ~ ( n 1 / 3 ) \widetilde{\Omega}(n^{1/3}) Ω ( n 1/3 ) even if both adaptive queries and samples are allowed. In contrast, conjunctions can be distribution-robustly tested with respect to Unif ( { 0 , 1 } n ) \operatorname{Unif}(\{0,1\}^{n}) Unif ({ 0 , 1 } n ) using exponentially fewer samples even if no queries are allowed:
Algorithm 6 Distribution-robust sample-based tester for conjunctions with respect to Unif ( { 0 , 1 } n ) \operatorname{Unif}(\{0,1\}^{n}) Unif ({ 0 , 1 } n )
Input:
Sample access to i.i.d. labeled examples ( x , f ( x ) ) x ∼ D (x,f(x))_{x\sim D} ( x , f ( x ) ) x ∼ D for some D ∈ Δ ( X ) D\in\Delta(\mathcal{X}) D ∈ Δ ( X ) ,
Closeness parameter ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) .
procedure SampleBasedDistributionRobustConjTester ( f , D , ε ) \operatorname{SampleBasedDistributionRobustConjTester}(f,D,\varepsilon) SampleBasedDistributionRobustConjTester ( f , D , ε )
Let g 1 , … , g K g_1,\ldots,g_K g 1 , … , g K be a list of all conjunctions of Boolean literals over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n of length at most L L L , where L : = ⌈ log ( 16 / ε ) ⌉ L:=\lceil\log(16/\varepsilon)\rceil L := ⌈ log ( 16/ ε )⌉ .
Use a batch of m m m (specified below) i.i.d. samples ( x , f ( x ) ) x ∼ D (x,f(x))_{x\sim D} ( x , f ( x ) ) x ∼ D to obtain, for each i ∈ [ K ] i\in[K] i ∈ [ K ] , an empirical estimate d ^ i \widehat{d}_i d i of dist D ( f , g i ) \operatorname{dist}_D(f,g_i) dist D ( f , g i ) . If some i ∈ [ K ] i\in[K] i ∈ [ K ] has its estimate at most 3 ε / 8 3\varepsilon/8 3 ε /8 , then output Accept . ▷ Uses samples from D D D .
Use a batch of m m m i.i.d. samples ( x , f ( x ) ) x ∼ D (x,f(x))_{x\sim D} ( x , f ( x ) ) x ∼ D to obtain, for each i ∈ [ K ] i\in[K] i ∈ [ K ] such that the conjunction g i g_i g i has length exactly L L L , an empirical estimate p ^ i \widehat{p}_i p i of Pr x ∼ D [ g i ( x ) = 1 ] \Pr_{x\sim D}[g_i(x)=1] Pr x ∼ D [ g i ( x ) = 1 ] . If one of these i i i ’s has p ^ i > 3 ε / 32 \widehat{p}_i>3\varepsilon/32 p i > 3 ε /32 then output Abstain . ▷ Uses samples from D D D .
Output Reject .
The following theorem, along with Observation 6.1, establishes Theorem 1.11 .
Theorem 6.2 (Sample-based distribution-robust conjunction testing with logarithmically many samples). Algorithm 6 is a sample-based distribution-robust tester for the class of conjunctions over X = { 0 , 1 } n \mathcal{X}=\{0,1\}^{n} X = { 0 , 1 } n with respect to D = { Unif ( { 0 , 1 } n ) } \mathbb{D}=\{\operatorname{Unif}(\{0,1\}^{n})\} D = { Unif ({ 0 , 1 } n )} that uses O ( log ( n ) ⋅ log ( 1 / ε ) ε ) O\left(\frac{\log(n)\cdot\log(1/\varepsilon)}{\varepsilon}\right) O ( ε l o g ( n ) ⋅ l o g ( 1/ ε ) ) samples.
Proof. Let P \mathbb{P} P denote the class of all conjunctions over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n . The list length K K K from Step 1 has size
K = ∑ ℓ = 0 L ( 2 n ℓ ) ≤ n O ( log ( 1 / ε ) ) , K=\sum_{\ell=0}^{L}\binom{2n}{\ell}\le n^{O(\log(1/\varepsilon))}, K = ℓ = 0 ∑ L ( ℓ 2 n ) ≤ n O ( l o g ( 1/ ε )) ,
and hence log K = O ( log ( n ) ⋅ log ( 1 / ε ) ) \log K=O(\log(n)\cdot\log(1/\varepsilon)) log K = O ( log ( n ) ⋅ log ( 1/ ε )) .
In Step 2, let d i : = dist D ( f , g i ) d_i:=\operatorname{dist}_{D}(f,g_i) d i := dist D ( f , g i ) be the true distance between f f f and g i g_i g i under D D D . Taking
m : = C log ( K ) / ε m:=C\log(K)/\varepsilon m := C log ( K ) / ε
for a sufficiently large universal constant C C C , by a multiplicative Chernoff bound and union bound we have that with probability at least 7 / 8 7/8 7/8 , for all i ∈ [ K ] i\in[K] i ∈ [ K ] it holds that if d i < ε / 4 d_i<\varepsilon/4 d i < ε /4 then d ^ i ≤ 3 ε / 8 \widehat{d}_i\le3\varepsilon/8 d i ≤ 3 ε /8 and if d i > ε / 2 d_i>\varepsilon/2 d i > ε /2 then d ^ i > 3 ε / 8 \widehat{d}_i>3\varepsilon/8 d i > 3 ε /8 .
In Step 3, let p i : = Pr x ∼ D [ g i ( x ) = 1 ] p_i:=\Pr_{x\sim D}[g_i(x)=1] p i := Pr x ∼ D [ g i ( x ) = 1 ] be the true probability that g i g_i g i is satisfied by a random draw from D D D for each length-L L L conjunction g i g_i g i . Another multiplicative Chernoff bound and union bound imply that with probability at least 7 / 8 7/8 7/8 , Step 3 outputs Abstain whenever some length-L L L conjunction has p i > ε / 8 p_i > \varepsilon/8 p i > ε /8 , and it does not not output Abstain when every length-L L L conjunction has p i ≤ ε / 16 p_i \le\varepsilon/16 p i ≤ ε /16 .
The total number of samples used by the algorithm is 2 m 2m 2 m , which is as claimed in Theorem 6.2 . Let E 2 E_2 E 2 be the successful Step 2 event and E 3 E_3 E 3 the successful Step 3 event, so both E 2 E_2 E 2 and E 3 E_3 E 3 hold with probability at least 3 / 4 3/4 3/4 . It remains to establish correctness conditioned on E 2 ∩ E 3 E_2 \cap E_3 E 2 ∩ E 3 .
Completeness. Suppose f ∈ P f \in\mathcal{P} f ∈ P , i.e. f f f is a conjunction. If f f f has at most L L L literals then f = g i f = g_i f = g i for some i ∈ [ K ] i \in[K] i ∈ [ K ] , so d i = 0 < ε / 4 d_i = 0 < \varepsilon/4 d i = 0 < ε /4 and the tester accepts in Step 2. Otherwise, let f ∗ f^* f ∗ be obtained from f f f by deleting literals until exactly L L L literals remain. Then f ∗ = g i f^* = g_i f ∗ = g i for some length-L L L conjunction in the list. If dist D ( f , f ∗ ) < ε / 4 \operatorname{dist}_{D}(f, f^*) < \varepsilon/4 dist D ( f , f ∗ ) < ε /4 , then because of E 2 E_2 E 2 the Step 2 test for this g i g_i g i causes the tester to accept. If dist D ( f , f ∗ ) ≥ ε / 4 \operatorname{dist}_{D}(f, f^*) \ge\varepsilon/4 dist D ( f , f ∗ ) ≥ ε /4 , then every satisfying assignment of f f f is also a satisfying assignment of f ∗ f^* f ∗ , and the points on which f f f and f ∗ f^* f ∗ differ are all points with f ∗ ( x ) = 1 f^*(x) = 1 f ∗ ( x ) = 1 and f ( x ) ≠ 1 f(x) \ne1 f ( x ) = 1 . Therefore
Pr x ∼ D [ f ∗ ( x ) = 1 ] ≥ dist D ( f , f ∗ ) ≥ ε / 4 , \Pr_{x\sim D}[f^*(x) = 1] \ge\operatorname{dist}_{D}(f, f^*) \ge\varepsilon/4, x ∼ D Pr [ f ∗ ( x ) = 1 ] ≥ dist D ( f , f ∗ ) ≥ ε /4 ,
so if the tester reaches Step 3, then because of E 3 E_3 E 3 the tester will abstain. Hence conditioned on E 2 ∩ E 3 E_2 \cap E_3 E 2 ∩ E 3 the tester never rejects a conjunction.
Soundness. Suppose dist D ( f , P ) > ε \operatorname{dist}_{D}(f, \mathcal{P}) > \varepsilon dist D ( f , P ) > ε . Then for every i ∈ [ K ] i \in[K] i ∈ [ K ] we have d i = dist D ( f , g i ) > ε > ε / 2 d_i = \operatorname{dist}_{D}(f, g_i) > \varepsilon> \varepsilon/2 d i = dist D ( f , g i ) > ε > ε /2 , so because of E 2 E_2 E 2 the tester does not accept in Step 2, hence it either abstains or rejects as required.
Assertiveness. Suppose D = Unif ( { 0 , 1 } n ) D = \operatorname{Unif}(\{0,1\}^n) D = Unif ({ 0 , 1 } n ) . Every conjunction of length exactly L L L is satisfied under D D D with probability 2 − L ≤ ε / 16 2^{-L} \le\varepsilon/16 2 − L ≤ ε /16 , so because of E 3 E_3 E 3 the tester does not abstain in Step 3 regardless of f f f . This concludes the proof.
Lower Bound for Testing Monotonicity
While our main interest is in establishing positive results which show that distribution-robust testing can be significantly more efficient than distribution-free testing. another natural question that suggests itself is to establish lower bounds showing that distribution-robust testing can be more challenging than standard-model testing. Such results are of interest because they serve as reassurance that the distribution-robust testing model is not simply the standard model “in disguise,” i.e. they rule out the possibility that every property that is testable in the standard model is also testable in the distribution-robust model with the same complexity.
As mentioned earlier, in an unpublished manuscript [2 ] it has been shown that for sample-based testing, the class of halfspaces over R n \mathbb{R}^n R n witnesses a separation between the distribution-robust and standard models. In more detail, [2 ] shows that any sample-based distribution-robust testing algorithm for the class of halfspaces under the standard Normal distribution N ( 0 , I n ) N(0,I_n) N ( 0 , I n ) must use Ω ~ ( n 2 / 3 ) \widetilde{\Omega}(n^{2/3}) Ω ( n 2/3 ) samples even when the distance parameter ε \varepsilon ε is Θ ( 1 ) \Theta(1) Θ ( 1 ) , which is larger than the O ~ ( n 1 / 2 ) \widetilde{O}(n^{1/2}) O ( n 1/2 ) upper bound on sample-based halfspaces testing with respect to the N ( 0 , I n ) N(0,I_n) N ( 0 , I n ) distribution (again for distance parameter ε = Θ ( 1 ) \varepsilon= \Theta(1) ε = Θ ( 1 ) ) that has been shown in [4 , 44 ] .
Here we show a different and larger separation, between the non-adaptive standard model and the non-adaptive distribution-robust testing model. This separation is for the class of monotone functions over { 0 , 1 } n \{0,1\}^n { 0 , 1 } n . We recall that the celebrated work of Khot, Minzer and Safra [48 ] gave a non-adaptive algorithm for testing monotone functions with respect to Unif ( { 0 , 1 } n ) \operatorname{Unif}(\{0,1\}^n) Unif ({ 0 , 1 } n ) that has query complexity O ~ ( n ) \widetilde{O}(\sqrt{n}) O ( n ) for constant closeness parameter ε \varepsilon ε . In contrast, the following result (which is a sharpening of Theorem 1.12 ) gives a mildly exponential lower bound for non-adaptive distribution-robust testers:
Theorem 7.1 (Mildly exponential lower bound for non-adaptive distribution-robust monotonicity testing over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n ). There are absolute constants ε 0 , c > 0 \varepsilon_{0},c>0 ε 0 , c > 0 such that the following holds. Let n n n be sufficiently large and let
1 n 1 / 6 ≤ ε ≤ ε 0 . \frac{1}{n^{1/6}} \le\varepsilon\le\varepsilon_{0}. n 1/6 1 ≤ ε ≤ ε 0 . Every non-adaptive distribution-robust tester for monotonicity over X = { 0 , 1 } n \mathcal{X}=\{0,1\}^{n} X = { 0 , 1 } n with closeness parameter ε \varepsilon ε with respect to the uniform distribution must either draw at least
2 c n / ε 2^{c\sqrt{n}/\varepsilon} 2 c n / ε labeled samples or make at least
2 c n 1 / 4 / ε 2^{cn^{1/4}/\sqrt{\varepsilon}} 2 c n 1/4 / ε non-adaptive queries.
Notation and Parameters
It will be convenient to carry out the proof over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n . Let U \mathcal{U} U denote the uniform distribution over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n . For x ∈ { 0 , 1 } n x\in\{0,1\}^{n} x ∈ { 0 , 1 } n , let ∣ x ∣ |x| ∣ x ∣ denote its Hamming weight.
A Boolean function f : { 0 , 1 } n → { 0 , 1 } f:\{0,1\}^{n}\to\{0,1\} f : { 0 , 1 } n → { 0 , 1 } is said to be monotone if f ( x ) ≤ f ( y ) f(x)\leq f(y) f ( x ) ≤ f ( y ) for every pair of x x x and y y y satisfying x ⪯ y ∈ { 0 , 1 } n x\preceq y\in\{0,1\}^{n} x ⪯ y ∈ { 0 , 1 } n . Given a distribution D \mathcal{D} D over { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n and f : { 0 , 1 } n → { 0 , 1 } f:\{0,1\}^{n}\to\{0,1\} f : { 0 , 1 } n → { 0 , 1 } , we write dist D ( f , Mono ) \operatorname{dist}_{\mathcal{D}}(f,\operatorname{Mono}) dist D ( f , Mono ) to denote the distance of f f f to monotonicity with respect to D \mathcal{D} D :
dist D ( f , Mono ) = min g { Pr x ∼ D [ f ( x ) ≠ g ( x ) ] } , \operatorname{dist}_{\mathcal{D}}(f,\operatorname{Mono})=\min_{g}\left\{\Pr_{x\sim\mathcal{D}}[f(x)\ne g(x)]\right\}, dist D ( f , Mono ) = g min { x ∼ D Pr [ f ( x ) = g ( x )] } ,
where the minimum is taken over all monotone functions g : { 0 , 1 } n → { 0 , 1 } g:\{0,1\}^{n}\to\{0,1\} g : { 0 , 1 } n → { 0 , 1 } .
Choose absolute constants c r , c Δ , c h > 0 c_{r},c_{\Delta},c_{h}>0 c r , c Δ , c h > 0 and then choose ε 0 > 0 \varepsilon_{0}>0 ε 0 > 0 sufficiently small. Let r r r be the largest odd integer at most c r n / ε c_{r}\sqrt{n}/\varepsilon c r n / ε , and set
Δ : = ⌈ c Δ n r ⌉ , h : = ⌈ c h r ⌉ , ρ : = Δ n . (1) \Delta:=\left\lceil\frac{c_{\Delta}n}{r}\right\rceil,\qquad h:=\left\lceil c_{h}\sqrt{r}\right\rceil,\qquad\rho:=\frac{\Delta}{\sqrt{n}}. \tag*{(1)} Δ := ⌈ r c Δ n ⌉ , h := ⌈ c h r ⌉ , ρ := n Δ . (1)
The constants are fixed so that, for all sufficiently large n n n ,
r = Θ ( n ε ) , Δ = Θ ( ε n ) , 20 h ≤ Δ ≤ n 20 , Θ ( ε ) = ρ ≥ C f a r ε , (2) r=\Theta\left(\frac{\sqrt{n}}{\varepsilon}\right),\qquad\Delta=\Theta(\varepsilon\sqrt{n}),\qquad20h\leq\Delta\leq\frac{\sqrt{n}}{20},\qquad\Theta(\varepsilon)=\rho\geq C_{\mathrm{far}}\varepsilon, \tag*{(2)} r = Θ ( ε n ) , Δ = Θ ( ε n ) , 20 h ≤ Δ ≤ 20 n , Θ ( ε ) = ρ ≥ C far ε , (2)
where C f a r > 0 C_{\mathrm{far}}>0 C far > 0 is a sufficiently large absolute constant. It is easy to check that these conditions are compatible: first take c r c_{r} c r sufficiently small relative to c Δ c_{\Delta} c Δ and c h c_{h} c h , and then take ε 0 \varepsilon_{0} ε 0 sufficiently small. Notice in particular that r = o ( n ) r=o(n) r = o ( n ) .
We will use the following standard fact about matchings in the hypercube (see, for example, [18 Claim 12] ).
Lemma 7.2. For every odd positive integer r r r , there is a perfect matching M M M of { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n such that every matched pair ( u − , u + ) (u^{-},u^{+}) ( u − , u + ) satisfies
u − ≺ u + and ∣ u − ∣ + ∣ u + ∣ = r . u^{-}\prec u^{+}\qquad\text{and}\qquad|u^{-}|+|u^{+}|=r. u − ≺ u + and ∣ u − ∣ + ∣ u + ∣ = r .
Proof. For each integer 0 ≤ k < r / 2 0 \le k < r/2 0 ≤ k < r /2 , consider the bipartite comparability graph between the k k k -th and ( r − k ) (r-k) ( r − k ) -th Hamming layers. This graph is regular on both sides, and hence it has a perfect matching by Hall’s theorem. Taking the union of these matchings over all k < r / 2 k < r/2 k < r /2 proves the lemma.
For each A ⊂ [ n ] A \subset[n] A ⊂ [ n ] of size r r r , we write M A M_A M A to denote the perfect matching of { 0 , 1 } n \{0,1\}^n { 0 , 1 } n obtained by applying Lemma 7.2 on the coordinates in A A A independently for every fixed setting of the coordinates in the complement A ‾ \overline{A} A . Thus every edge ( x , y ) ∈ M A (x,y) \in M_A ( x , y ) ∈ M A satisfies
x ≺ y , x A ‾ = y A ‾ , ∣ x A ∣ + ∣ y A ∣ = r . (3) x \prec y,\qquad x_{\overline{A}} = y_{\overline{A}},\qquad|x_A| + |y_A| = r. \tag*{(3)} x ≺ y , x A = y A , ∣ x A ∣ + ∣ y A ∣ = r . (3)
Overview of the Proof of Theorem 7.1
In § 7.3 , we will construct a pair of probability distributions D y e s \mathcal{D}_{\mathrm{yes}} D yes and D n o \mathcal{D}_{\mathrm{no}} D no over pairs ( f , D ) (f,\mathcal{D}) ( f , D ) where f f f is a function from { 0 , 1 } n \{0,1\}^n { 0 , 1 } n to { 0 , 1 } \{0,1\} { 0 , 1 } and D \mathcal{D} D is a probability distribution over { 0 , 1 } n \{0,1\}^n { 0 , 1 } n . The yes distribution always has D = U \mathcal{D} = \mathcal{U} D = U and always produces a monotone function. With constant probability, the no distribution produces a function that is Ω ( ρ ) \Omega(\rho) Ω ( ρ ) -far from monotone under its accompanying distribution; by (2) , this is more than ε \varepsilon ε . The main indistinguishability lemma shows that no deterministic non-adaptive algorithm using at most s s s labeled samples and q q q queries can distinguish the two distributions with constant advantage.
More precisely, after defining the distributions in § 7.3 we will prove the following three lemmas.
Lemma 7.3. A pair ( f , D ) ∼ D y e s (f,\mathcal{D}) \sim\mathcal{D}_{\mathrm{yes}} ( f , D ) ∼ D yes always satisfies D = U \mathcal{D} = \mathcal{U} D = U and f ∈ M o n o f \in\mathrm{Mono} f ∈ Mono .
Given this we will write ( f , U ) (f,\mathcal{U}) ( f , U ) to denote a draw from D y e s \mathcal{D}_{\mathrm{yes}} D yes from now on.
Lemma 7.4. There are absolute constants c , p 0 > 0 c,p_0 > 0 c , p 0 > 0 such that a pair ( g , D ) ∼ D n o (g,\mathcal{D}) \sim\mathcal{D}_{\mathrm{no}} ( g , D ) ∼ D no satisfies
dist D ( g , M o n o ) ≥ c ρ > ε \operatorname{dist}_{\mathcal{D}}(g,\mathrm{Mono}) \ge c\rho> \varepsilon dist D ( g , Mono ) ≥ c ρ > ε with probability at least p 0 p_0 p 0 .
For the last lemma, let s s s and q q q be the following parameters:
s = exp ( c 0 r ) and q = exp ( c 0 r ) , (4) s = \exp(c_0 r)\qquad\text{and}\qquad q = \exp(c_0\sqrt{r}), \tag*{(4)} s = exp ( c 0 r ) and q = exp ( c 0 r ) , (4)
where c 0 c_0 c 0 is a sufficiently small positive constant to be specified later.
We consider any deterministic, non-adaptive algorithm ALG (recall Definition 3.4 ) working on a given pair ( f , D ) (f,\mathcal{D}) ( f , D ) (drawn either from D y e s \mathcal{D}_{\mathrm{yes}} D yes or D n o \mathcal{D}_{\mathrm{no}} D no ) in the following fashion:
Phase 1: ALG receives s s s independent labeled samples drawn from D \mathcal{D} D (i.e., s s s pairs ( x 1 , f ( x 1 ) ) , … , ( x s , f ( x s ) ) (x^1,f(x^1)),\ldots,(x^s,f(x^s)) ( x 1 , f ( x 1 )) , … , ( x s , f ( x s )) ) with x 1 , … , x s x^1,\ldots,x^s x 1 , … , x s drawn independently from D \mathcal{D} D ;
Phase 2: Based on labeled samples received in Phase 1, ALG (deterministically) makes a single batch of q q q queries on f f f ;
Phase 3: Based on information received in Phases 1 and 2, ALG accepts or rejects.
The last lemma, which is the most challenging one among the three, is as follows:
Lemma 7.5. Every such deterministic non-adaptive algorithm A l g \mathrm{Alg} Alg satisfies
∣ Pr ( f , U ) ∼ D y e s [ A l g accepts ] − Pr ( g , D ) ∼ D n o [ A l g accepts ] ∣ = o n ( 1 ) , \left|\Pr_{(f,\mathcal{U})\sim\mathcal{D}_{\mathrm{yes}}}[\mathrm{Alg}\text{ accepts}]-\Pr_{(g,\mathcal{D})\sim\mathcal{D}_{\mathrm{no}}}[\mathrm{Alg}\text{ accepts}]\right|=o_n(1), ( f , U ) ∼ D yes Pr [ Alg accepts ] − ( g , D ) ∼ D no Pr [ Alg accepts ] = o n ( 1 ) , where the probabilities include the randomness of the labeled samples.
Theorem 7.1 then follows from these three lemmas by standard arguments. In particular, notice that by our constructions of D y e s \mathcal{D}_{\mathrm{yes}} D yes and D n o \mathcal{D}_{\mathrm{no}} D no , the lemmas yield a lower bound for distribution-picky, and hence also distribution-robust monotonicity testing with respect to U \mathcal{U} U .
The Construction
Choose a constant c 1 c_1 c 1 satisfying c 0 ≪ c 1 ≪ 1 c_0 \ll c_1 \ll1 c 0 ≪ c 1 ≪ 1 and define
N : = 2 r , L : = ⌊ exp ( c 1 r ) ⌋ . (5) N := 2^r,\qquad L := \left\lfloor\exp(c_1r)\right\rfloor. \tag*{(5)} N := 2 r , L := ⌊ exp ( c 1 r ) ⌋ . (5)
In particular we choose c 1 > 2 c 0 c_1 > 2c_0 c 1 > 2 c 0 , so L ≫ s 2 L \gg s^2 L ≫ s 2 , while c 1 c_1 c 1 is still small enough for all of the exponential union bounds below.
Talagrand terms and the multiplexer. We use T = ( T 1 , … , T N ) T=(T_1,\ldots,T_N) T = ( T 1 , … , T N ) to denote a sequence of N N N terms, where each T ℓ T_\ell T ℓ is of the form T ℓ : [ r ] → [ n ] T_\ell:[r]\to[n] T ℓ : [ r ] → [ n ] and should be interpreted as a term of length at most r r r . We will abuse the notation and write T ℓ T_\ell T ℓ to denote a Boolean function T ℓ : { 0 , 1 } n → { 0 , 1 } T_\ell:\{0,1\}^n\to\{0,1\} T ℓ : { 0 , 1 } n → { 0 , 1 } , where
T ℓ ( x ) : = ⋀ j = 1 r x T ℓ ( j ) . T_\ell(x):=\bigwedge_{j=1}^{r}x_{T_\ell(j)}. T ℓ ( x ) := j = 1 ⋀ r x T ℓ ( j ) .
Each T T T defines the following multiplexer map Γ T \Gamma_T Γ T , which maps each x ∈ { 0 , 1 } n x\in\{0,1\}^n x ∈ { 0 , 1 } n either to a special symbol in { 0 ∗ , 1 ∗ } \{0^*,1^*\} { 0 ∗ , 1 ∗ } , or to a subset of [ N ] [N] [ N ] of size at most 2 2 2 (including the empty set): Given x ∈ { 0 , 1 } n x\in\{0,1\}^n x ∈ { 0 , 1 } n ,
if ∣ x ∣ > n / 2 + Δ |x|>n/2+\Delta ∣ x ∣ > n /2 + Δ , set Γ T ( x ) = 1 ∗ \Gamma_T(x)=1^* Γ T ( x ) = 1 ∗ ;
if ∣ x ∣ < n / 2 − Δ |x|<n/2-\Delta ∣ x ∣ < n /2 − Δ , set Γ T ( x ) = 0 ∗ \Gamma_T(x)=0^* Γ T ( x ) = 0 ∗ ;
if ∣ x ∣ ∈ [ n / 2 − Δ , n / 2 + Δ ] |x|\in[n/2-\Delta,n/2+\Delta] ∣ x ∣ ∈ [ n /2 − Δ , n /2 + Δ ] (hereafter, the middle layers ), let Sat T ( x ) : = { ℓ : T ℓ ( x ) = 1 } \operatorname{Sat}_T(x):=\{\ell:T_\ell(x)=1\} Sat T ( x ) := { ℓ : T ℓ ( x ) = 1 } and set
Γ T ( x ) = { ∅ , Sat T ( x ) = ∅ , { ℓ } , Sat T ( x ) = { ℓ } , { ℓ 1 , ℓ 2 } , ∣ Sat T ( x ) ∣ ≥ 2 , \Gamma_T(x)=
\begin{cases}
\varnothing, & \operatorname{Sat}_T(x)=\varnothing,\\
\{\ell\}, & \operatorname{Sat}_T(x)=\{\ell\},\\
\{\ell_1,\ell_2\}, & |\operatorname{Sat}_T(x)|\ge2,
\end{cases} Γ T ( x ) = ⎩ ⎨ ⎧ ∅ , { ℓ } , { ℓ 1 , ℓ 2 } , Sat T ( x ) = ∅ , Sat T ( x ) = { ℓ } , ∣ Sat T ( x ) ∣ ≥ 2 ,
where ℓ 1 < ℓ 2 \ell_1<\ell_2 ℓ 1 < ℓ 2 are the two smallest indices in Sat T ( x ) \operatorname{Sat}_T(x) Sat T ( x ) in the last case.
We write T \mathcal{T} T to denote the uniform distribution over all such sequences T T T , where each term T ℓ T_\ell T ℓ is independently drawn by sampling its r r r coordinates independently and uniformly from [ n ] [n] [ n ] .
Action variables and support set. Let A A A denote a size-r r r subset of [ n ] [n] [ n ] ; the variables in A A A are called action variables . We write A \mathcal{A} A to denote the uniform distribution over all size-r r r subsets of [ n ] [n] [ n ] .
Once A A A is fixed, the support set S S S will be a set of 2 L 2L 2 L points in { 0 , 1 } n \{0,1\}^n { 0 , 1 } n that consists of L L L pairs of points from M A M_A M A . We write S A \mathcal{S}_A S A to denote the uniform distribution over all such size-( 2 L ) (2L) ( 2 L ) subsets of { 0 , 1 } n \{0,1\}^n { 0 , 1 } n , given A A A .
Term labels. We also associate with each term T ℓ T_\ell T ℓ a binary label b ℓ ∈ { 0 , 1 } b_\ell\in\{0,1\} b ℓ ∈ { 0 , 1 } , and write B = ( b 1 , … , b N ) B = (b_1,\ldots,b_N) B = ( b 1 , … , b N ) , which will be drawn uniformly below.
Construction of D y e s \mathcal{D}_{\mathrm{yes}} D yes
To draw ( f , U ) ∼ D y e s (f,\mathcal{U}) \sim\mathcal{D}_{\mathrm{yes}} ( f , U ) ∼ D yes , we first draw random objects T T T , A A A , S S S and B B B discussed above as follows:
T ∼ T T \sim\mathcal{T} T ∼ T , which is used to obtain the multiplexer map Γ T \Gamma_T Γ T ;
A ∼ A A \sim\mathcal{A} A ∼ A contains the r r r action variables;
S ∼ S A S \sim\mathcal{S}_A S ∼ S A is a size-( 2 L ) (2L) ( 2 L ) subset of { 0 , 1 } n \{0,1\}^n { 0 , 1 } n ; and
B = ( b 1 , … , b N ) B=(b_1,\ldots,b_N) B = ( b 1 , … , b N ) is drawn uniformly from { 0 , 1 } N \{0,1\}^N { 0 , 1 } N .
Note that the definition of the function f f f below will actually not use A A A and S S S ; they are useful for the proof of Lemma 7.5 (which proceeds by constructing a coupling). It should also be noted that the dependence among T T T , A A A , S S S and B B B is only between A A A and S S S . The distribution D \mathcal{D} D is set to U \mathcal{U} U , the uniform distribution over { 0 , 1 } n \{0,1\}^n { 0 , 1 } n .
The function f f f is defined as follows using T T T and B B B : Given any x ∈ { 0 , 1 } n x \in\{0,1\}^n x ∈ { 0 , 1 } n ,
If Γ T ( x ) = 1 ∗ \Gamma_T(x)=1^* Γ T ( x ) = 1 ∗ or ∣ Γ T ( x ) ∣ = 2 |\Gamma_T(x)|=2 ∣ Γ T ( x ) ∣ = 2 , set f ( x ) = 1 f(x)=1 f ( x ) = 1 ;
If Γ T ( x ) = 0 ∗ \Gamma_T(x)=0^* Γ T ( x ) = 0 ∗ or Γ T ( x ) = ∅ \Gamma_T(x)=\varnothing Γ T ( x ) = ∅ , set f ( x ) = 0 f(x)=0 f ( x ) = 0 ;
Otherwise, we have Γ T ( x ) = { ℓ } \Gamma_T(x)=\{\ell\} Γ T ( x ) = { ℓ } for some ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] , and set f ( x ) = b ℓ f(x)=b_\ell f ( x ) = b ℓ .
Construction of D n o \mathcal{D}_{\mathrm{no}} D no
To draw ( g , D ) ∼ D n o (g,\mathcal{D}) \sim\mathcal{D}_{\mathrm{no}} ( g , D ) ∼ D no , we first draw the same random objects T T T , A A A , S S S and B B B as in D y e s \mathcal{D}_{\mathrm{yes}} D yes , and set D \mathcal{D} D to be the uniform distribution over the 2 L 2L 2 L points in the support S S S .
Next we define the function g g g : Given any x ∈ { 0 , 1 } n x \in\{0,1\}^n x ∈ { 0 , 1 } n ,
If Γ T ( x ) = 1 ∗ \Gamma_T(x)=1^* Γ T ( x ) = 1 ∗ or ∣ Γ T ( x ) ∣ = 2 |\Gamma_T(x)|=2 ∣ Γ T ( x ) ∣ = 2 , set g ( x ) = 1 g(x)=1 g ( x ) = 1 ;
If Γ T ( x ) = 0 ∗ \Gamma_T(x)=0^* Γ T ( x ) = 0 ∗ or Γ T ( x ) = ∅ \Gamma_T(x)=\varnothing Γ T ( x ) = ∅ , set g ( x ) = 0 g(x)=0 g ( x ) = 0 .
Otherwise, we are left with the case when Γ T ( x ) = { ℓ } \Gamma_T(x)=\{\ell\} Γ T ( x ) = { ℓ } for some ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] . For this case, we say index ℓ \ell ℓ is qualifying (with respect to T T T , S S S and A A A ) if (i) there exists at least one matched pair ( y − , y + ) (y^-,y^+) ( y − , y + ) in S S S satisfying Γ T ( y − ) = Γ T ( y + ) = { ℓ } \Gamma_T(y^-)=\Gamma_T(y^+)=\{\ell\} Γ T ( y − ) = Γ T ( y + ) = { ℓ } and (ii) every point y ∈ S y \in S y ∈ S with Γ T ( y ) = { ℓ } \Gamma_T(y)=\{\ell\} Γ T ( y ) = { ℓ } satisfies
∣ ∣ y A ∣ − r 2 ∣ ≥ h . \left\lvert|y_A|-\frac{r}{2}\right\rvert\ge h . ∣ y A ∣ − 2 r ≥ h .
Then we have the following two cases: (recall that r r r is an odd integer)
(a) If ℓ \ell ℓ is qualifying, set
g ( x ) = { b ℓ if ∣ x A ∣ > r / 2 , 1 − b ℓ if ∣ x A ∣ < r / 2 g(x)=
\begin{cases}
b_\ell& \text{if } |x_A|>r/2,\\
1-b_\ell& \text{if } |x_A|<r/2
\end{cases} g ( x ) = { b ℓ 1 − b ℓ if ∣ x A ∣ > r /2 , if ∣ x A ∣ < r /2
(b) Otherwise, set g ( x ) = b ℓ g(x)=b_\ell g ( x ) = b ℓ .
See Figure 2 for a depiction of this construction.
Figure 2. Schematic diagram depicting the essential features of a function g g g from D n o \mathcal{D}_{\mathrm{no}} D no . The large diamond is a depiction of the whole { 0 , 1 } n \{0,1\}^{n} { 0 , 1 } n cube; its middle slab shows regions where no term is satisfied, where ≥ 2 \ge2 ≥ 2 terms are satisfied, and the highlighted region C ℓ C_\ell C ℓ where a single term T ℓ T_\ell T ℓ is satisfied. The two arrows lead to the possible cases for the highlighted index. Each right-hand rhombus is a copy of { 0 , 1 } A \{0,1\}^{A} { 0 , 1 } A obtained by fixing the coordinates outside A A A ; only the colored inner region lies in C ℓ C_\ell C ℓ . In the qualifying case, all points of S ∩ C ℓ S\cap C_\ell S ∩ C ℓ avoid the striped h h h -band and some matched pair y − ≺ y + y^{-}\prec y^{+} y − ≺ y + crosses the center. In the nonqualifying case, g = b ℓ g=b_\ell g = b ℓ throughout the colored region. The displayed pair is a violation exactly when b ℓ = 0 b_\ell=0 b ℓ = 0 .
The YES Functions are Monotone
Proof of Lemma 7.3. Given T T T and B B B , let f f f denote the function built in D y e s \mathcal{D}_{\mathrm{yes}} D yes . We show below that f f f is monotone. Fixing any x ⪯ y x \preceq y x ⪯ y , it suffices to show that f ( x ) = 1 f(x)=1 f ( x ) = 1 implies f ( y ) = 1 f(y)=1 f ( y ) = 1 . Consider the following cases:
f ( x ) = 1 f(x)=1 f ( x ) = 1 because Γ T ( x ) = 1 ∗ \Gamma_T(x)=1^* Γ T ( x ) = 1 ∗ : In this case, y y y must also be above the middle layers and thus, Γ T ( y ) = 1 ∗ \Gamma_T(y)=1^* Γ T ( y ) = 1 ∗ and f ( y ) = 1 f(y)=1 f ( y ) = 1 .
f ( x ) = 1 f(x)=1 f ( x ) = 1 because ∣ Γ T ( x ) ∣ = 2 \lvert\Gamma_T(x)\rvert=2 ∣ Γ T ( x )∣ = 2 : In this case, y y y must either be above the middle layers, or be in the middle layers and satisfy at least two terms. As a result, we also have f ( y ) = 1 f(y)=1 f ( y ) = 1 .
f ( x ) = 1 f(x)=1 f ( x ) = 1 because Γ T ( x ) = { ℓ } \Gamma_T(x)=\{\ell\} Γ T ( x ) = { ℓ } for some ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] and b ℓ = 1 b_\ell=1 b ℓ = 1 : In this case, y y y must either be above the middle layers, or be in the middle layers and satisfy at least two terms, or Γ T ( y ) = { ℓ } \Gamma_T(y)=\{\ell\} Γ T ( y ) = { ℓ } ; all these three cases lead to f ( y ) = 1 f(y)=1 f ( y ) = 1 .
This finishes the proof that f f f is monotone.
The NO Functions are Far from Monotone
For a fixed A A A , let P A P_A P A be the collection of oriented edges ( x − , x + ) ∈ M A (x^-,x^+) \in M_A ( x − , x + ) ∈ M A satisfying
∣ ∣ x A − ∣ − n − r 2 ∣ ≤ Δ 4 and h ≤ r 2 − ∣ x A − ∣ ≤ 2 h . (6) \left|\lvert x_A^-\rvert-\frac{n-r}{2}\right|\leq\frac{\Delta}{4}
\quad\text{and}\quad
h\leq\frac{r}{2}-\lvert x_A^-\rvert\leq2h. \tag*{(6)} ∣ x A − ∣ − 2 n − r ≤ 4 Δ and h ≤ 2 r − ∣ x A − ∣ ≤ 2 h . (6)
Both endpoints of every edge in P A P_A P A lie in the middle layers, by (2) . Moreover, we have
∣ P A ∣ = Θ ( ρ 2 n ) , (7) \lvert P_A\rvert=\Theta(\rho2^n), \tag*{(7)} ∣ P A ∣ = Θ ( ρ 2 n ) , (7)
since for a uniform x ∼ { 0 , 1 } n x\sim\{0,1\}^n x ∼ { 0 , 1 } n , the first condition in (6) holds with probability Θ ( Δ / n ) = Θ ( ρ ) \Theta(\Delta/\sqrt{n})=\Theta(\rho) Θ ( Δ/ n ) = Θ ( ρ ) , the second condition holds with constant probability, and the two events are independent.
For a fixed T T T , call an edge ( x − , x + ) ∈ P A (x^-,x^+) \in P_A ( x − , x + ) ∈ P A good if there is an index ℓ \ell ℓ such that
Γ T ( x − ) = Γ T ( x + ) = { ℓ } (8) \Gamma_T(x^-)=\Gamma_T(x^+)=\{\ell\} \tag*{(8)} Γ T ( x − ) = Γ T ( x + ) = { ℓ } (8)
and the term T ℓ T_\ell T ℓ contains at least r / 10 r/10 r /10 distinct coordinates. Given T T T and A A A , let M ∗ ( T , A ) M^*(T,A) M ∗ ( T , A ) be the set of good edges.
Claim 7.6. There are absolute constants c ∗ , p ∗ > 0 c_*,p_*>0 c ∗ , p ∗ > 0 such that, for every fixed A A A ,
Pr T [ ∣ M ∗ ( T , A ) ∣ ≥ c ∗ ρ 2 n ] ≥ p ∗ . (9) \Pr_T\left[\lvert M^*(T,A)\rvert\geq c_*\rho2^n\right]\geq p_*. \tag*{(9)} T Pr [ ∣ M ∗ ( T , A )∣ ≥ c ∗ ρ 2 n ] ≥ p ∗ . (9)
Proof. For each point x ∈ { 0 , 1 } n x\in\{0,1\}^n x ∈ { 0 , 1 } n , write p x : = Pr [ T ℓ ( x ) = 1 ] p_x:=\Pr[T_\ell(x)=1] p x := Pr [ T ℓ ( x ) = 1 ] (note that this is the same for all ℓ \ell ℓ ). Then for any x x x in the middle layers, i.e., ∣ x ∣ ∈ [ n / 2 − Δ , n / 2 + Δ ] \lvert x\rvert\in[n/2-\Delta,n/2+\Delta] ∣ x ∣ ∈ [ n /2 − Δ , n /2 + Δ ] , (1) gives
p x = ( ∣ x ∣ n ) r = 2 − r ( 1 ± O ( Δ / n ) ) r = 2 − r exp ( ± O ( r Δ / n ) ) = Θ ( 2 − r ) . (10) p_x=\left(\frac{\lvert x\rvert}{n}\right)^r=2^{-r}(1\pm O(\Delta/n))^r=2^{-r}\exp(\pm O(r\Delta/n))=\Theta(2^{-r}). \tag*{(10)} p x = ( n ∣ x ∣ ) r = 2 − r ( 1 ± O ( Δ/ n ) ) r = 2 − r exp ( ± O ( r Δ/ n )) = Θ ( 2 − r ) . (10)
Fix ( x − , x + ) ∈ P A (x^-,x^+)\in P_A ( x − , x + ) ∈ P A , which are in the middle layers as noted earlier. Since x − ≺ x + x^-\prec x^+ x − ≺ x + , (8) holds iff there is exactly one term T ℓ T_\ell T ℓ satisfied by x + x^+ x + and that term is already satisfied by x − x^- x − , which occurs with probability
N p x − ( 1 − p x + ) N − 1 = Θ ( 1 ) . Np_{x^-}(1-p_{x^+})^{N-1}=\Theta(1). N p x − ( 1 − p x + ) N − 1 = Θ ( 1 ) .
(by (10) applied to both x + x^+ x + and x − x^- x − ) Conditional on such a unique T ℓ T_{\ell} T ℓ existing, its r r r coordinates are drawn independently and uniformly from the ∣ x − ∣ = Θ ( n ) |x^{-}|=\Theta(n) ∣ x − ∣ = Θ ( n ) one-coordinates of x − x^{-} x − . Hence edge ( x − , x + ) ∈ P A (x^{-},x^{+})\in\mathcal{P}_{A} ( x − , x + ) ∈ P A is good with probability
Pr T [ ( 7.8 ) holds ] ⋅ Pr [ T ℓ contains at least r / 10 distinct coordinates ∣ T ℓ ( x − ) = 1 ] = Θ ( 1 ) ⋅ ( 1 − o n ( 1 ) ) = Θ ( 1 ) . \Pr_{T}\left[(7.8)\text{ holds}\right]\cdot\Pr\left[T_{\ell}\text{ contains at least }r/10\text{ distinct coordinates}\mid T_{\ell}(x^{-})=1\right]
=\Theta(1)\cdot(1-o_{n}(1))=\Theta(1). T Pr [ ( 7.8 ) holds ] ⋅ Pr [ T ℓ contains at least r /10 distinct coordinates ∣ T ℓ ( x − ) = 1 ] = Θ ( 1 ) ⋅ ( 1 − o n ( 1 )) = Θ ( 1 ) .
Thus E T [ ∣ M ∗ ( T , A ) ∣ ] ≥ Ω ( 1 ) ⋅ ∣ P A ∣ \mathbb{E}_{T}[|M^{*}(T,A)|]\ge\Omega(1)\cdot|\mathcal{P}_{A}| E T [ ∣ M ∗ ( T , A ) ∣ ] ≥ Ω ( 1 ) ⋅ ∣ P A ∣ . Since ∣ M ∗ ( T , A ) ∣ ≤ ∣ P A ∣ |M^{*}(T,A)|\le|\mathcal{P}_{A}| ∣ M ∗ ( T , A ) ∣ ≤ ∣ P A ∣ , the claim follows by Markov’s inequality along with (7) .
Proof of Lemma 7.4 . Condition on outcomes A , T A,T A , T of A , T A,T A , T for which ∣ M ∗ ( T , A ) ∣ = Ω ( ρ 2 n ) |M^{*}(T,A)|=\Omega(\rho2^{n}) ∣ M ∗ ( T , A ) ∣ = Ω ( ρ 2 n ) , which occurs with probability Ω ( 1 ) \Omega(1) Ω ( 1 ) by Claim 7.6 . Since S S S consists of L L L uniformly chosen edges of M A M_{A} M A , a hypergeometric tail bound shows that, with probability 1 − o n ( 1 ) 1-o_{n}(1) 1 − o n ( 1 ) over S S S , at least c ρ L c\rho L c ρ L of the edges selected for S S S belong to M ∗ M^{*} M ∗ .
We next show that, with probability 1 − o n ( 1 ) 1-o_{n}(1) 1 − o n ( 1 ) , every good edge in S S S has a qualifying index and that their indices are all distinct. By the definitions of P A \mathcal{P}_{A} P A and M ∗ M^{*} M ∗ , we already have that each good edge ( x − , x + ) (x^{-},x^{+}) ( x − , x + ) in S S S has Γ T ( x − ) = Γ T ( x + ) = { ℓ } \Gamma_{T}(x^{-})=\Gamma_{T}(x^{+})=\{\ell\} Γ T ( x − ) = Γ T ( x + ) = { ℓ } for T ℓ T_{\ell} T ℓ containing at least r / 10 r/10 r /10 distinct coordinates, and moreover ∣ x A − ∣ − r / 2 , ∣ x A + ∣ − r / 2 ≥ h |x^{-}_{A}|-r/2,|x^{+}_{A}|-r/2\ge h ∣ x A − ∣ − r /2 , ∣ x A + ∣ − r /2 ≥ h (by (6) , recalling that ∣ x A + ∣ + ∣ x A − ∣ = r |x^{+}_{A}|+|x^{-}_{A}|=r ∣ x A + ∣ + ∣ x A − ∣ = r by Lemma 7.2). Therefore it suffices to show that, with probability 1 − o n ( 1 ) 1-o_{n}(1) 1 − o n ( 1 ) , for every good edge ( x − , x + ) (x^{-},x^{+}) ( x − , x + ) in S S S and different (possibly non-good) edge ( y − , y + ) (y^{-},y^{+}) ( y − , y + ) in S S S , neither y − y^{-} y − nor y + y^{+} y + satisfies the T ℓ T_{\ell} T ℓ corresponding to ( x − , x + ) (x^{-},x^{+}) ( x − , x + ) . A uniformly random edge of M A M_{A} M A has an endpoint satisfying such T ℓ T_{\ell} T ℓ with probability at most 2 1 − r / 10 2^{1-r/10} 2 1 − r /10 , and hence a union bound over the at most L 2 L^{2} L 2 pairs of edges in S S S gives failure probability
O ( L 2 2 − r / 10 ) = o n ( 1 ) O(L^{2}2^{-r/10})=o_{n}(1) O ( L 2 2 − r /10 ) = o n ( 1 )
by the choice of c 1 c_{1} c 1 . Thus the claim holds.
For every good edge ( x − , x + ) (x^{-},x^{+}) ( x − , x + ) in S S S with distinct qualifying index ℓ \ell ℓ as above, the definition of g g g gives
g ( x − ) = 1 − b ℓ , g ( x + ) = b ℓ . g(x^{-})=1-b_{\ell},\qquad g(x^{+})=b_{\ell}. g ( x − ) = 1 − b ℓ , g ( x + ) = b ℓ .
These b ℓ b_{\ell} b ℓ 's are independent, so a Chernoff bound shows that, with probability 1 − o n ( 1 ) 1-o_{n}(1) 1 − o n ( 1 ) , Ω ( ρ L ) \Omega(\rho L) Ω ( ρ L ) of these disjoint comparable edges satisfy g ( x − ) = 1 g(x^{-})=1 g ( x − ) = 1 and g ( x + ) = 0 g(x^{+})=0 g ( x + ) = 0 . Any monotone function disagrees with g g g on at least one endpoint of every such edge. Since D \mathcal{D} D is uniform on the 2 L 2L 2 L points of S S S , it follows that
dist D ( g , Mono ) = Ω ( ρ ) > ε . \operatorname{dist}_{\mathcal{D}}(g,\operatorname{Mono})=\Omega(\rho)>\varepsilon. dist D ( g , Mono ) = Ω ( ρ ) > ε .
Indistinguishability
Fix a deterministic, non-adaptive algorithm ALG \operatorname{ALG} ALG with s s s samples and q q q queries, and let
α : = Pr ( f , U ) ∼ D y e s [ ALG accepts ( f , U ) ] and β : = Pr ( g , D ) ∼ D n o [ ALG accepts ( g , D ) ] . \alpha:=\Pr_{(f,\mathcal{U})\sim\mathcal{D}_{\mathrm{yes}}}\left[\operatorname{ALG}\text{ accepts }(f,\mathcal{U})\right]
\quad\text{and}\quad
\beta:=\Pr_{(g,\mathcal{D})\sim\mathcal{D}_{\mathrm{no}}}\left[\operatorname{ALG}\text{ accepts }(g,\mathcal{D})\right]. α := ( f , U ) ∼ D yes Pr [ ALG accepts ( f , U ) ] and β := ( g , D ) ∼ D no Pr [ ALG accepts ( g , D ) ] .
We would like to show that ∣ α − β ∣ ≤ o n ( 1 ) |\alpha-\beta|\le o_{n}(1) ∣ α − β ∣ ≤ o n ( 1 ) . To ease the proof, we introduce a new algorithm ALG ′ \operatorname{ALG}' ALG ′ derived from ALG \operatorname{ALG} ALG as follows. Letting ( h , D ) (h,\mathcal{D}) ( h , D ) be a pair drawn from D y e s \mathcal{D}_{\mathrm{yes}} D yes or D n o \mathcal{D}_{\mathrm{no}} D no , with T , A , S T,A,S T , A , S and B B B drawn during the process, ALG ′ \operatorname{ALG}' ALG ′ runs on ( h , D ) (h,\mathcal{D}) ( h , D ) as follows:
Phase 0: Recall that S S S contains L L L pairs (and thus, 2 L 2L 2 L points) in the perfect matching M A M_{A} M A . At the beginning, ALG ′ \operatorname{ALG}' ALG ′ receives L L L points, one from each pair in S S S drawn uniformly at random. Let R ⊂ S R\subset S R ⊂ S be this random set of size L L L . ALG ′ \operatorname{ALG}' ALG ′ receives R R R and their values under h h h .
Phase 1: A L G ′ \mathrm{ALG}' ALG ′ draws a sequence of s s s samples x 1 , … , x s x^1,\ldots,x^s x 1 , … , x s independently and uniformly from R R R and sends ( x 1 , h ( x 1 ) ) , … , ( x s , h ( x s ) ) (x^1,h(x^1)),\ldots,(x^s,h(x^s)) ( x 1 , h ( x 1 )) , … , ( x s , h ( x s )) to A L G \mathrm{ALG} ALG as samples the latter receives in its Phase 1.
Phase 2: A L G ′ \mathrm{ALG}' ALG ′ makes the same batch of q q q queries on h h h as A L G \mathrm{ALG} ALG makes in Phase 2.
Phase 3: A L G ′ \mathrm{ALG}' ALG ′ returns the same answer (accept or reject) as A L G \mathrm{ALG} ALG does in Phase 3.
With A L G ′ \mathrm{ALG}' ALG ′ defined from A L G \mathrm{ALG} ALG as above, we let
α ′ : = Pr ( f , U ) ∼ D y e s [ A L G ′ accepts ( f , U ) ] and β ′ : = Pr ( g , D ) ∼ D n o [ A L G ′ accepts ( g , D ) ] . (11) \alpha' := \Pr_{(f,\mathcal{U})\sim\mathcal{D}_{\mathrm{yes}}}\left[\mathrm{ALG}'\text{ accepts }(f,\mathcal{U})\right]\quad\text{and}\quad\beta' := \Pr_{(g,\mathcal{D})\sim\mathcal{D}_{\mathrm{no}}}\left[\mathrm{ALG}'\text{ accepts }(g,\mathcal{D})\right]. \tag*{(11)} α ′ := ( f , U ) ∼ D yes Pr [ ALG ′ accepts ( f , U ) ] and β ′ := ( g , D ) ∼ D no Pr [ ALG ′ accepts ( g , D ) ] . (11)
Then Lemma 7.5 follows from the following three claims:
Claim 7.7. ∣ α − α ′ ∣ ≤ o n ( 1 ) |\alpha-\alpha'|\leq o_n(1) ∣ α − α ′ ∣ ≤ o n ( 1 ) .
Claim 7.8. ∣ β − β ′ ∣ ≤ o n ( 1 ) |\beta-\beta'|\leq o_n(1) ∣ β − β ′ ∣ ≤ o n ( 1 ) .
Claim 7.9. ∣ α ′ − β ′ ∣ ≤ o n ( 1 ) |\alpha'-\beta'|\leq o_n(1) ∣ α ′ − β ′ ∣ ≤ o n ( 1 ) .
Claims 7.7 and 7.8 are easy to prove:
Proof of Claim 7.7. It suffices to show that the samples received by the simulation of A L G \mathrm{ALG} ALG in A L G ′ \mathrm{ALG}' ALG ′ are indistinguishable from the uniformly distributed samples received by the original A L G \mathrm{ALG} ALG . The probability that s s s samples from the uniform distribution on R R R use the same point of R R R twice is O ( s 2 / L ) = o n ( 1 ) O(s^2/L)=o_n(1) O ( s 2 / L ) = o n ( 1 ) . The distribution of s s s samples drawn from R R R without replacement is the same as the distribution of s s s i.i.d. points drawn uniformly from { 0 , 1 } n \{0,1\}^n { 0 , 1 } n conditional on no two points lying on the same edge of M A M_A M A ; the latter conditioning fails with probability at most O ( s 2 / 2 n ) = o n ( 1 ) O(s^2/2^n)=o_n(1) O ( s 2 / 2 n ) = o n ( 1 ) .
Proof of Claim 7.8. Compare sampling from the 2 L 2L 2 L endpoints in S S S with sampling from one uniformly random endpoint of each edge. The two experiments can be coupled perfectly unless the same edge is sampled twice, which has probability O ( s 2 / L ) = o n ( 1 ) O(s^2/L)=o_n(1) O ( s 2 / L ) = o n ( 1 ) .
We now prove Claim 7.9 for a more general class of deterministic algorithms A L G ∗ \mathrm{ALG}^* ALG ∗ . Letting ( h , D ) (h,\mathcal{D}) ( h , D ) be a pair drawn from either D y e s \mathcal{D}_{\mathrm{yes}} D yes or D n o \mathcal{D}_{\mathrm{no}} D no , with T T T , A A A , R R R , B B B being the random objects5 drawn during the process (recall that they are drawn from the same distribution in both cases), A L G ∗ \mathrm{ALG}^* ALG ∗ runs as follows:
Phase 1: At the beginning, A L G ∗ \mathrm{ALG}^* ALG ∗ receives R R R . Moreover, for each x ∈ R x\in R x ∈ R , A L G ∗ \mathrm{ALG}^* ALG ∗ also receives γ x = Γ T ( x ) \gamma_x=\Gamma_T(x) γ x = Γ T ( x ) and t x = h ( x ) t_x=h(x) t x = h ( x ) . We write γ = ( γ x : x ∈ R ) \gamma=(\gamma_x:x\in R) γ = ( γ x : x ∈ R ) and t = ( t x : x ∈ R ) t=(t_x:x\in R) t = ( t x : x ∈ R ) .
Phase 2: A L G ∗ \mathrm{ALG}^* ALG ∗ makes a nonadaptive batch of q q q queries on h h h based on R R R , t t t and γ \gamma γ .
Phase 3: A L G ∗ \mathrm{ALG}^* ALG ∗ accepts or rejects based on the information received in Phases 1 and 2.
We similarly define α ∗ \alpha^* α ∗ and β ∗ \beta^* β ∗ as the two probabilities given in Equation (11) , with A L G ′ \mathrm{ALG}' ALG ′ replaced by A L G ∗ \mathrm{ALG}^* ALG ∗ . Given that A L G ′ \mathrm{ALG}' ALG ′ is clearly a special case of A L G ∗ \mathrm{ALG}^* ALG ∗ , to prove Claim 7.9, it suffices to show that ∣ α ∗ − β ∗ ∣ = o n ( 1 ) |\alpha^*-\beta^*|=o_n(1) ∣ α ∗ − β ∗ ∣ = o n ( 1 ) for any A L G ∗ \mathrm{ALG}^* ALG ∗ .
To this end, we consider the following event over the three objects T T T , A A A and R R R : Event E E E : No two distinct points y , z ∈ R y,z \in\mathbf{R} y , z ∈ R satisfy any of the following conditions:
(a) y y y and z z z have Hamming distance smaller than n / 3 n/3 n /3 ; or
(b) y y y and z z z are in the middle layers and T ℓ ( y ) = T ℓ ( z ) = 1 T_{\ell}(y)=T_{\ell}(z)=1 T ℓ ( y ) = T ℓ ( z ) = 1 for some ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] .
Note that event E E E implies that no distinct y , z ∈ R y,z \in\mathbf{R} y , z ∈ R and ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] satisfy ℓ ∈ Γ T ( y ) ∩ Γ T ( z ) \ell\in\Gamma_T(y) \cap\Gamma_T(z) ℓ ∈ Γ T ( y ) ∩ Γ T ( z ) .
Claim 7.10. The event E E E has probability 1 − o n ( 1 ) 1-o_n(1) 1 − o n ( 1 ) .
Proof. For part (a), fix any outcome A \mathbf{A} A of A \mathbf{A} A . Notice that the A ‾ \overline{A} A part of the strings in R \mathbf{R} R are drawn i.i.d. uniformly from { 0 , 1 } A ‾ \{0,1\}^{\overline{A}} { 0 , 1 } A , and two such strings are at least n / 3 n/3 n /3 apart in Hamming distance with probability 1 − e − Ω ( n ) 1-e^{-\Omega(n)} 1 − e − Ω ( n ) by a Chernoff bound since ∣ A ‾ ∣ = n − r = n − o ( n ) |\overline{A}|=n-r=n-o(n) ∣ A ∣ = n − r = n − o ( n ) . By a union bound over the L 2 = e O ( r ) = e o ( n ) L^2=e^{O(r)}=e^{o(n)} L 2 = e O ( r ) = e o ( n ) pairs in R \mathbf{R} R , this holds simultaneously for all L 2 L^2 L 2 pairs with probability 1 − o n ( 1 ) 1-o_n(1) 1 − o n ( 1 ) .
For part (b), fix A A A and R R R such that (a) holds, let T ∼ T T \sim\mathcal{T} T ∼ T be random, and fix two points y , z y,z y , z in the middle layers at distance at least n / 3 n/3 n /3 . Then they have at most n / 3 + Δ n/3+\Delta n /3 + Δ common one-coordinates, since otherwise one of the points would have Hamming weight larger than n 3 + Δ + 1 2 ⋅ n 3 = n 2 + Δ \frac{n}{3}+\Delta+\frac{1}{2}\cdot\frac{n}{3}=\frac{n}{2}+\Delta 3 n + Δ + 2 1 ⋅ 3 n = 2 n + Δ , contradicting the middle-layer hypothesis. Hence the probability that one of the N = 2 r N=2^r N = 2 r terms in T T T is satisfied by both y y y and z z z is at most, by a union bound,
N ( n / 3 + Δ n ) r ≤ ( 2 3 + o n ( 1 ) ) r . N\left(\frac{n/3+\Delta}{n}\right)^r \leq\left(\frac{2}{3}+o_n(1)\right)^r. N ( n n /3 + Δ ) r ≤ ( 3 2 + o n ( 1 ) ) r .
A union bound over all (at most L 2 L^2 L 2 ) pairs of distinct points y , z ∈ R y,z \in\mathbf{R} y , z ∈ R proves the claim when c 1 c_1 c 1 is sufficiently small.
Given the above claim, it suffices to show that conditioning on T , A , R T,A,R T , A , R satisfying event E E E , the two probabilities α ∗ \alpha^* α ∗ and β ∗ \beta^* β ∗ are within o n ( 1 ) o_n(1) o n ( 1 ) of each other. For this, we next show that conditioning T , A T,A T , A and R R R (which are drawn in the same way in D y e s \mathcal{D}_{\mathrm{yes}} D yes and D n o \mathcal{D}_{\mathrm{no}} D no ) on E E E , the distribution of ( R , t , γ ) (R,t,\gamma) ( R , t , γ ) that A l g ∗ \mathrm{Alg}^* Alg ∗ receives in Phase 1 in the case of D y e s \mathcal{D}_{\mathrm{yes}} D yes is the same as in the case of D n o \mathcal{D}_{\mathrm{no}} D no :
Claim 7.11. Conditioning on event E E E , the distribution of ( R , t , γ ) (R,t,\gamma) ( R , t , γ ) is the same for D y e s \mathcal{D}_{\mathrm{yes}} D yes and D n o \mathcal{D}_{\mathrm{no}} D no .
Proof. Fix any T , A , R T,A,R T , A , R such that event E E E holds. Given that T , A T,A T , A and R R R are fixed, both R R R and γ \gamma γ are fixed. Given R R R and γ \gamma γ , t x t_x t x of an x ∈ R x \in R x ∈ R is distributed as follows: If Γ T ( x ) = { 0 ∗ , 1 ∗ , ∅ } \Gamma_T(x)=\{0^*,1^*,\emptyset\} Γ T ( x ) = { 0 ∗ , 1 ∗ , ∅ } or a set of size 2, then t x t_x t x is the same fixed value in { 0 , 1 } \{0,1\} { 0 , 1 } in both cases. Otherwise (i.e., Γ T ( x ) = { ℓ } \Gamma_T(x)=\{\ell\} Γ T ( x ) = { ℓ } for some ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] ), given that no other point y ∈ R y \in R y ∈ R has Γ T ( y ) = { ℓ } \Gamma_T(y)=\{\ell\} Γ T ( y ) = { ℓ } (as given by condition (b) of event E E E ), t x t_x t x is an independent uniform random bit drawn from { 0 , 1 } \{0,1\} { 0 , 1 } .
To finish the proof, we fix any triple ( R , t , γ ) (R,t,\gamma) ( R , t , γ ) that A l g ∗ \mathrm{Alg}^* Alg ∗ may receive under event E E E , and show that conditioning on event E E E and receiving ( R , t , γ ) (R,t,\gamma) ( R , t , γ ) in Phase 1, A l g ∗ \mathrm{Alg}^* Alg ∗ accepts with probabilities within o n ( 1 ) o_n(1) o n ( 1 ) of each other in D y e s \mathcal{D}_{\mathrm{yes}} D yes and D n o \mathcal{D}_{\mathrm{no}} D no .
For this purpose, we first note that by event E E E , set R R R and tuple γ \gamma γ must satisfy
Every two distinct points y , z ∈ R y,z \in R y , z ∈ R have Hamming distance at least n / 3 n/3 n /3 ; and
No two distinct points y , z ∈ R y,z \in R y , z ∈ R have ℓ ∈ γ y ∩ γ z \ell\in\gamma_y \cap\gamma_z ℓ ∈ γ y ∩ γ z for some ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] .
Conditioning on E E E and A l g ∗ \mathrm{Alg}^* Alg ∗ receiving ( R , t , γ ) (R,t,\gamma) ( R , t , γ ) , the objects T , A T,A T , A and B B B in the two cases are distributed as follows. First, T T T and A A A are independently distributed in the same way in the two cases as follows:
A A A is drawn from A \mathcal{A} A (i.e., uniform over all r r r -subsets; this is because every two points y , z ∈ R y,z \in R y , z ∈ R have Hamming distance at least n / 3 n/3 n /3 and thus, always have y A ≠ z A y_{\mathcal{A}} \ne z_{\mathcal{A}} y A = z A and hence do not belong to the same edge of M A M_{\mathcal{A}} M A , for any A A A );
T T T is uniform over all T T T satisfying Γ T ( y ) = γ y \Gamma_T(y)=\gamma_y Γ T ( y ) = γ y for all y ∈ R y \in R y ∈ R . In particular, for any ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] such that γ y = { ℓ } \gamma_y=\{\ell\} γ y = { ℓ } for some y ∈ R y \in R y ∈ R (which must be unique), T ℓ T_\ell T ℓ is uniform over all T ℓ T_\ell T ℓ such that
T ℓ ( y ) = 1 T_\ell(y)=1 T ℓ ( y ) = 1 ;
T ℓ ( z ) = 0 T_\ell(z)=0 T ℓ ( z ) = 0 for all z ∈ R z \in R z ∈ R with γ z = ∅ \gamma_z=\varnothing γ z = ∅ ;
T ℓ ( z ) = 0 T_\ell(z)=0 T ℓ ( z ) = 0 for all z ∈ R z \in R z ∈ R with γ z = { ℓ ′ } \gamma_z=\{\ell'\} γ z = { ℓ ′ } and ℓ ′ ≠ ℓ \ell' \ne\ell ℓ ′ = ℓ ;
T ℓ ( z ) = 0 T_\ell(z)=0 T ℓ ( z ) = 0 for all z ∈ R z \in R z ∈ R with γ z = { ℓ 1 , ℓ 2 } \gamma_z=\{\ell_1,\ell_2\} γ z = { ℓ 1 , ℓ 2 } and ℓ < max ( ℓ 1 , ℓ 2 ) \ell< \max(\ell_1,\ell_2) ℓ < max ( ℓ 1 , ℓ 2 ) .
Looking ahead, we will show in Claim 7.12 that this distribution of T ℓ T_\ell T ℓ has very small total variation distance from just drawing r r r random variables from { i ∈ [ n ] : y i = 1 } \{i \in[n] : y_i=1\} { i ∈ [ n ] : y i = 1 } .
Next, with T T T , A A A and R R R fixed, B = ( b 1 , … , b N ) B=(b_1,\ldots,b_N) B = ( b 1 , … , b N ) is distributed in the D y e s \mathcal{D}_{\mathrm{yes}} D yes case as follows:
For any ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] , if no y ∈ R y \in R y ∈ R has γ y = { ℓ } \gamma_y=\{\ell\} γ y = { ℓ } , then b ℓ b_\ell b ℓ is an independent uniform random bit;
If there exists a y ∈ R y \in R y ∈ R with γ y = { ℓ } \gamma_y=\{\ell\} γ y = { ℓ } (which must be unique), b ℓ b_\ell b ℓ is fixed to be t y t_y t y .
And B B B is distributed in the D n o \mathcal{D}_{\mathrm{no}} D no case as follows:
For any ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] , if no y ∈ R y \in R y ∈ R has γ y = { ℓ } \gamma_y=\{\ell\} γ y = { ℓ } , then b ℓ b_\ell b ℓ is an independent uniform random bit;
If there exists a y ∈ R y \in R y ∈ R with γ y = { ℓ } \gamma_y=\{\ell\} γ y = { ℓ } (which must be unique), then we have two cases: (1) if ℓ \ell ℓ is qualifying (given T T T , A A A and S S S , the latter of which can be inferred from A A A and R R R ), then b ℓ b_\ell b ℓ is fixed to be t y t_y t y if ∣ y A ∣ > r / 2 |y_A|>r/2 ∣ y A ∣ > r /2 , or 1 − t y 1-t_y 1 − t y if ∣ y A ∣ < r / 2 |y_A|<r/2 ∣ y A ∣ < r /2 ; (2) if ℓ \ell ℓ is not qualifying, then b ℓ b_\ell b ℓ is fixed to be t y t_y t y .
Given the above analysis of the distribution of T T T , A A A and B B B in the two cases, it is natural to consider the following coupling of T T T , A A A , B B B in the two cases. T T T and A A A are drawn as above and are shared in the two cases; after T T T and A A A are drawn, we draw b ℓ b_\ell b ℓ as an independent uniform bit for each ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] such that no y ∈ R y \in R y ∈ R has γ y = { ℓ } \gamma_y=\{\ell\} γ y = { ℓ } , which is the same in the two cases; for the rest of the b ℓ b_\ell b ℓ 's, they are set using t t t in the two cases as described above (in different ways, when ℓ \ell ℓ is qualifying).
We record the following claim about the distribution of T ℓ T_\ell T ℓ when γ y = { ℓ } \gamma_y=\{\ell\} γ y = { ℓ } for some y ∈ R y \in R y ∈ R :
Claim 7.12. Condition on any ( R , t , γ ) (R,t,\gamma) ( R , t , γ ) under event E E E . Suppose γ y = { ℓ } \gamma_y=\{\ell\} γ y = { ℓ } for some y ∈ R y \in R y ∈ R . Then the distribution of T ℓ T_\ell T ℓ has total variation distance at most ( 4 / 5 ) r (4/5)^r ( 4/5 ) r from the uniform distribution over all terms in which all r r r variables are drawn independently from { i ∈ [ n ] : y i = 1 } \{i \in[n] : y_i=1\} { i ∈ [ n ] : y i = 1 } .
Proof. Let R ′ R' R ′ be the subset of z ∈ R z \in R z ∈ R described above that must have T ℓ ( z ) = 0 T_\ell(z)=0 T ℓ ( z ) = 0 . Then T ℓ T_\ell T ℓ is uniform over all T ℓ T_\ell T ℓ that satisfies T ℓ ( y ) = 1 T_\ell(y)=1 T ℓ ( y ) = 1 and T ℓ ( z ) = 0 T_\ell(z)=0 T ℓ ( z ) = 0 for all z ∈ R ′ z \in R' z ∈ R ′ . Given that every z ∈ R ′ z \in R' z ∈ R ′ must lie in the middle layers and has Hamming distance at least n / 3 n/3 n /3 from y y y , we have
∣ { i : y i = 1 ∧ z i = 0 } ∣ ≥ n / 6 − O ( Δ ) . \left|\{i:y_i=1 \land z_i=0\}\right| \ge n/6-O(\Delta). ∣ { i : y i = 1 ∧ z i = 0 } ∣ ≥ n /6 − O ( Δ ) .
As a result, recalling that Δ = o ( n ) \Delta= o(n) Δ = o ( n ) , if we draw T ℓ T_\ell T ℓ as r r r uniform and independent draws from { i ∈ [ n ] : y i = 1 } \{i \in[n] : y_i = 1\} { i ∈ [ n ] : y i = 1 } , the probability of T ℓ ( z ) = 1 T_\ell(z) = 1 T ℓ ( z ) = 1 is at most ( 3 / 4 ) r (3/4)^r ( 3/4 ) r for sufficiently large n n n . The claim follows from a union bound over the at most ∣ R ∣ = L |R| = L ∣ R ∣ = L points in R ′ R' R ′ and by choosing the constant c 1 c_1 c 1 in L L L to be sufficiently small.
Given ( R , t , γ ) (R,t,\gamma) ( R , t , γ ) , let Q Q Q be the set of q q q queries that A l g ∗ \mathrm{Alg}^* Alg ∗ makes in Phase 2. To finish the proof, it suffices to show that for T , A , B T,A,B T , A , B drawn in the two cases under the coupling described earlier, we have with probability at least 1 − o n ( 1 ) 1-o_n(1) 1 − o n ( 1 ) , f ( x ) = g ( x ) f(x) = g(x) f ( x ) = g ( x ) for all x ∈ Q x \in Q x ∈ Q . To this end, we first define the following sufficient condition for this to happen:
Good ( T , A ) : there do not exist y ∈ R , z ∈ Q , ℓ ∈ [ N ] such that γ y = Γ T ( z ) = { ℓ } and ∣ y A ∣ − ∣ z A ∣ ≥ h . (12) \operatorname{Good}(T,A):\quad\text{there do not exist } y \in R,\ z \in Q,\ \ell\in[N]\text{ such that }\gamma_y = \Gamma_T(z) = \{\ell\}\text{ and }\lvert y_A\rvert- \lvert z_A\rvert\ge h. \tag*{(12)} Good ( T , A ) : there do not exist y ∈ R , z ∈ Q , ℓ ∈ [ N ] such that γ y = Γ T ( z ) = { ℓ } and ∣ y A ∣ − ∣ z A ∣ ≥ h . (12)
Claim 7.13. Suppose outcomes T , A T,A T , A of T , A T,A T , A satisfy Good ( T , A ) \operatorname{Good}(T,A) Good ( T , A ) . Then under the coupling above, we have f ( x ) = g ( x ) f(x) = g(x) f ( x ) = g ( x ) for all x ∈ Q x \in Q x ∈ Q .
Proof. Fix T T T and A A A such that Good ( T , A ) \operatorname{Good}(T,A) Good ( T , A ) holds, and consider any x ∈ Q x \in Q x ∈ Q . Clearly we have f ( x ) = g ( x ) f(x) = g(x) f ( x ) = g ( x ) trivially unless Γ T ( x ) = { ℓ } \Gamma_T(x) = \{\ell\} Γ T ( x ) = { ℓ } for some ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] . If no y ∈ R y \in R y ∈ R has γ y = { ℓ } \gamma_y = \{\ell\} γ y = { ℓ } , then b ℓ b_\ell b ℓ is set to be the same in both cases by the coupling. Given that ℓ \ell ℓ cannot be qualifying (since no y ∈ R y \in R y ∈ R has γ y = { ℓ } \gamma_y = \{\ell\} γ y = { ℓ } ), we have in both cases that f ( x ) f(x) f ( x ) and g ( x ) g(x) g ( x ) are set to b ℓ b_\ell b ℓ .
If there exists a y ∈ R y \in R y ∈ R with γ y = { ℓ } \gamma_y = \{\ell\} γ y = { ℓ } (which is unique), then we always have f ( x ) = t y f(x) = t_y f ( x ) = t y . For g ( x ) g(x) g ( x ) , we first note that condition Good ( T , A ) \operatorname{Good}(T,A) Good ( T , A ) implies that ∣ y A ∣ − ∣ x A ∣ < h \lvert y_A\rvert- \lvert x_A\rvert< h ∣ y A ∣ − ∣ x A ∣ < h . If ℓ \ell ℓ is not qualifying given T , A T,A T , A and R R R , then we have g ( x ) = t y = f ( x ) g(x) = t_y = f(x) g ( x ) = t y = f ( x ) . On the other hand, if ℓ \ell ℓ is qualifying, then we must have ∣ y A ∣ − r / 2 ≥ h \lvert y_A\rvert- r/2 \ge h ∣ y A ∣ − r /2 ≥ h ; note that no other point z ∈ R z \in R z ∈ R can even have γ y = { ℓ } \gamma_y = \{\ell\} γ y = { ℓ } . Combining the two inequalities we have g ( x ) = t y g(x) = t_y g ( x ) = t y as well by the definition of the coupling. This finishes the proof of the claim.
Finally we show that Good ( T , A ) \operatorname{Good}(T,A) Good ( T , A ) holds with high probability:
Claim 7.14. Conditional on every fixed ( R , t , γ ) (R,t,\gamma) ( R , t , γ ) satisfying E E E , Pr [ Good ( T , A ) ] = 1 − o n ( 1 ) \Pr[\operatorname{Good}(T,A)] = 1-o_n(1) Pr [ Good ( T , A )] = 1 − o n ( 1 ) .
Proof. Fix a z ∈ Q z \in Q z ∈ Q . We assume without loss of generality that z z z is in the middle layers. First, given that every two points in R R R have Hamming distance at least n / 3 n/3 n /3 , there can be at most one point y ∗ ∈ R y^* \in R y ∗ ∈ R with Hamming distance less than n / 6 n/6 n /6 from z z z .
We first bound the probability of the condition failing because of some y ≠ y ∗ y \ne y^* y = y ∗ in R R R and z z z . Assume without loss of generality that γ y = { ℓ } \gamma_y = \{\ell\} γ y = { ℓ } for some ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] . Given that they have Hamming distance at least n / 6 n/6 n /6 and are both in middle layers, with similar arguments to the ones used earlier, we have
∣ { i : y i = 1 ∧ z i = 0 } ∣ ≥ n / 12 − O ( Δ ) . \left|\{i : y_i = 1 \wedge z_i = 0\}\right| \ge n/12 - O(\Delta). ∣ { i : y i = 1 ∧ z i = 0 } ∣ ≥ n /12 − O ( Δ ) .
Using Claim 7.12 , the probability of T ℓ ( z ) = 1 T_\ell(z) = 1 T ℓ ( z ) = 1 is at most exp ( − Ω ( r ) ) \exp(-\Omega(r)) exp ( − Ω ( r )) . A union bound over at most L q = exp ( O ( r ) ) Lq = \exp(O(r)) L q = exp ( O ( r )) pairs yields contribution o n ( 1 ) o_n(1) o n ( 1 ) , for constants c 0 , c 1 c_0,c_1 c 0 , c 1 small enough.
Now consider the special y ∗ y^* y ∗ (skip this case if such a y ∗ y^* y ∗ does not exist). Again assume without loss of generality that γ y ∗ = { ℓ } \gamma_{y^*} = \{\ell\} γ y ∗ = { ℓ } for some ℓ ∈ [ N ] \ell\in[N] ℓ ∈ [ N ] . Let c = c h / 2 c = c_h/2 c = c h /2 and consider the following two cases:
If the Hamming distance between y y y and z z z is less than c n / r cn/\sqrt{r} c n / r , then since A ∼ A A \sim\mathcal{A} A ∼ A is uniform over r r r -subsets, the distribution of ∣ y A − z A ∣ |y_A-z_A| ∣ y A − z A ∣ is hypergeometric with expectation at most c r c\sqrt{r} c r , and hence the probability that ∣ ∣ y A ∣ − ∣ z A ∣ ∣ ≥ h = ⌊ c h r ⌋ \bigl||y_A|-|z_A|\bigr| \ge h=\lfloor c_h\sqrt{r}\rfloor ∣ y A ∣ − ∣ z A ∣ ≥ h = ⌊ c h r ⌋ is at most exp ( − Ω ( r ) ) \exp(-\Omega(\sqrt{r})) exp ( − Ω ( r )) ;
If the Hamming distance between y y y and z z z is at least c n / r cn/\sqrt{r} c n / r , then similar to the previous arguments we have ∣ { i : y i = 1 ∧ z i = 0 } ∣ ≥ c n / ( 2 r ) − O ( Δ ) |\{i:y_i=1\land z_i=0\}|\ge cn/(2\sqrt{r})-O(\Delta) ∣ { i : y i = 1 ∧ z i = 0 } ∣ ≥ c n / ( 2 r ) − O ( Δ ) , which is Ω ( n / r ) \Omega(n/\sqrt{r}) Ω ( n / r ) , since Δ = Θ ( n / r ) = o ( n / r ) \Delta=\Theta(n/r)=o(n/\sqrt{r}) Δ = Θ ( n / r ) = o ( n / r ) . Another application of Claim 7.12 gives
Pr [ T ℓ ( z ) = 1 ] ≤ ( 1 − Ω ( 1 / r ) ) r + exp ( − Ω ( r ) ) = exp ( − Ω ( r ) ) . \Pr[T_\ell(z)=1]\leq(1-\Omega(1/\sqrt{r}))^r+\exp(-\Omega(r))=\exp(-\Omega(\sqrt{r})). Pr [ T ℓ ( z ) = 1 ] ≤ ( 1 − Ω ( 1/ r ) ) r + exp ( − Ω ( r )) = exp ( − Ω ( r )) .
A union bound over the q q q points z ∈ Q z\in Q z ∈ Q , each with at most one associated y ∗ y^* y ∗ , yields contribution o n ( 1 ) o_n(1) o n ( 1 ) as long as c 0 c_0 c 0 is sufficiently small.
This concludes the proof of Claim 7.9 , and hence of Lemma 7.5 and Theorem 7.1 .
References
Omitted Proofs
Learning Decision Lists and Conjunctions
Fact 3.12. Let X = { 0 , 1 } n \mathcal{X}=\{0,1\}^{n} X = { 0 , 1 } n , let D = { Unif ( { 0 , 1 } n ) } \mathcal{D}=\{\operatorname{Unif}(\{0,1\}^{n})\} D = { Unif ({ 0 , 1 } n )} , and let P \mathbb{P} P be either the class P C o n j \mathbb{P}_{\mathrm{Conj}} P Conj of all Boolean conjunctions over X \mathcal{X} X or the class P D L \mathbb{P}_{\mathrm{DL}} P DL of all 1 1 1 -decision-lists over X \mathcal{X} X . There is a proper nonadaptive query learner for P \mathbb{P} P under Unif ( { 0 , 1 } n ) \operatorname{Unif}(\{0,1\}^{n}) Unif ({ 0 , 1 } n ) with query complexity q ( ε , δ ) = O ( ( log n ) ⋅ ( log ( 1 / ε ) ) + log ( 1 / δ ) ε ) q(\varepsilon,\delta)=O\left(\frac{(\log n)\cdot(\log(1/\varepsilon))+\log(1/\delta)}{\varepsilon}\right) q ( ε , δ ) = O ( ε ( l o g n ) ⋅ ( l o g ( 1/ ε )) + l o g ( 1/ δ ) ) .
Proof sketch. We consider the class of 1 1 1 -decision-lists below (the approach also works for conjunctions). Fact 3.12 follows from a standard Occam’s Razor argument using the fact that under the uniform distribution any 1 1 1 -decision-list f f f is ε / 2 \varepsilon/2 ε /2 -close to some 1 1 1 -decision-list f ′ f' f ′ that has length at most k : = log ( 2 / ε ) k:=\log(2/\varepsilon) k := log ( 2/ ε ) (simply truncate all nodes of f f f after the first k k k nodes).
In a bit more detail, the algorithm draws q ( ε , δ ) q(\varepsilon,\delta) q ( ε , δ ) uniform random labeled examples and outputs the 1 1 1 -decision-list of length at most k k k that has the best agreement with these examples. A standard multiplicative Chernoff bound gives that with probability at least 1 − δ / 2 1-\delta/2 1 − δ /2 the 1 1 1 -decision-list f ′ f' f ′ will disagree with at most a 3 ε / 4 3\varepsilon/4 3 ε /4 fraction of the q ( ε , δ ) q(\varepsilon,\delta) q ( ε , δ ) examples, and a multiplicative Chernoff bound and union bound together give that with probability at least 1 − δ / 2 1-\delta/2 1 − δ /2 , none of the (at most ( O ( n ) ) k (O(n))^{k} ( O ( n ) ) k many) 1 1 1 -decision-lists of length at most k k k that have true error rate greater than ε \varepsilon ε will disagree with less than a 3 ε / 4 3\varepsilon/4 3 ε /4 fraction of the q ( ε , δ ) q(\varepsilon,\delta) q ( ε , δ ) examples. So with probability at least 1 − δ 1-\delta 1 − δ the 1 1 1 -decision-list that is output will have error at most ε \varepsilon ε , as required.
Noise Sensitivity and Distance to Intervals
Lemma 5.10. Suppose max { NS ρ U ( f ) , NS ρ D ( f ) } ≤ k ρ ( 1 + ε 4 ) \max\{\operatorname{NS}^{\mathrm{U}}_{\rho}(f),\operatorname{NS}^{\mathrm{D}}_{\rho}(f)\}\leq k\rho(1+\frac{\varepsilon}{4}) max { NS ρ U ( f ) , NS ρ D ( f )} ≤ k ρ ( 1 + 4 ε ) . Then dist D ( f , I k ) ≤ ε \operatorname{dist}_{\mathcal{D}}(f,\mathcal{I}_{k})\leq\varepsilon dist D ( f , I k ) ≤ ε .
Proof. We closely follow the proof of the uniform distribution case from [4 Lemma 3.4] . The proof proceeds in three steps. First, we construct a “smoothed” function f ρ : R → { 0 , 1 } f_{\rho}:\mathbb{R}\to\{0,1\} f ρ : R → { 0 , 1 } by taking local averages of f f f and a “self-corrected” function g : R → { 0 , 1 } g:\mathbb{R}\to\{0,1\} g : R → { 0 , 1 } by applying a threshold to f ρ f_{\rho} f ρ , and show that f f f is ε / 2 \varepsilon/2 ε /2 -close to g g g under D \mathcal{D} D . Second, we show that g g g is a union of k ( 1 + ε / 2 ) k(1+\varepsilon/2) k ( 1 + ε /2 ) intervals. Third, we show that every union of k ( 1 + ε / 2 ) k(1+\varepsilon/2) k ( 1 + ε /2 ) intervals is ε / 2 \varepsilon/2 ε /2 -close to I k \mathcal{I}_{k} I k under D \mathcal{D} D .
Step 1. Define f ρ : R → R f_{\rho}:\mathbb{R}\to\mathbb{R} f ρ : R → R by f ρ ( x ) : = E y ∼ ρ x [ f ( y ) ] f_{\rho}(x):=\mathop{\mathbb{E}}_{y\sim\rho_x}[f(y)] f ρ ( x ) := E y ∼ ρ x [ f ( y )] . Let τ : = 2 ε k ρ ( 1 + ε 4 ) = ε 32 ( 1 + ε 4 ) \tau:=\frac{2}{\varepsilon}k\rho(1+\frac{\varepsilon}{4})=\frac{\varepsilon}{32}(1+\frac{\varepsilon}{4}) τ := ε 2 k ρ ( 1 + 4 ε ) = 32 ε ( 1 + 4 ε ) , so that NS ρ D ( f ) ≤ ε 2 ⋅ τ \operatorname{NS}^{\mathcal{D}}_{\rho}(f)\leq\frac{\varepsilon}{2}\cdot\tau NS ρ D ( f ) ≤ 2 ε ⋅ τ by hypothesis. Define g ∗ : R → { 0 , 1 , ∗ } g^{*}:\mathbb{R}\to\{0,1,*\} g ∗ : R → { 0 , 1 , ∗ } by
g ∗ ( x ) : = { 1 if f ρ ( x ) ≥ 1 − τ , 0 if f ρ ( x ) ≤ τ , ∗ otherwise. g^{*}(x):=
\begin{cases}
1 & \text{if } f_{\rho}(x)\geq1-\tau,\\
0 & \text{if } f_{\rho}(x)\leq\tau,\\
* & \text{otherwise.}
\end{cases} g ∗ ( x ) := ⎩ ⎨ ⎧ 1 0 ∗ if f ρ ( x ) ≥ 1 − τ , if f ρ ( x ) ≤ τ , otherwise.
Then, define g : R → { 0 , 1 } g:\mathbb{R}\to\{0,1\} g : R → { 0 , 1 } by g ( x ) : = g ∗ ( y ) g(x):=g^{*}(y) g ( x ) := g ∗ ( y ) for y = sup { z ≤ x : g ∗ ( z ) ≠ ∗ } y=\sup\{z\leq x:g^{*}(z)\neq*\} y = sup { z ≤ x : g ∗ ( z ) = ∗ } . Note that, for each x ∈ [ 0 , 1 ] x\in[0,1] x ∈ [ 0 , 1 ] , if NS ρ ( f , x ) ≤ τ \operatorname{NS}_{\rho}(f,x)\leq\tau NS ρ ( f , x ) ≤ τ then ∣ f ρ ( x ) − f ( x ) ∣ ≤ τ \lvert f_{\rho}(x)-f(x)\rvert\leq\tau ∣ f ρ ( x ) − f ( x )∣ ≤ τ and hence g ( x ) = g ∗ ( x ) = f ( x ) g(x)=g^{*}(x)=f(x) g ( x ) = g ∗ ( x ) = f ( x ) . Therefore, by the contrapositive and Markov’s inequality,
dist D ( f , g ) = Pr x ∼ D [ f ( x ) ≠ g ( x ) ] ≤ Pr x ∼ D [ NS ρ ( f , x ) > τ ] ≤ NS ρ D ( f ) τ ≤ ε 2 . \operatorname{dist}_{\mathcal{D}}(f,g)=\Pr_{x\sim\mathcal{D}}[f(x)\neq g(x)]\leq\Pr_{x\sim\mathcal{D}}[\operatorname{NS}_{\rho}(f,x)>\tau]\leq\frac{\operatorname{NS}^{\mathcal{D}}_{\rho}(f)}{\tau}\leq\frac{\varepsilon}{2}. dist D ( f , g ) = x ∼ D Pr [ f ( x ) = g ( x )] ≤ x ∼ D Pr [ NS ρ ( f , x ) > τ ] ≤ τ NS ρ D ( f ) ≤ 2 ε .
Step 2. We claim that g g g is a union of m ≤ k ( 1 + ε 2 ) m \le k\left(1+\frac{\varepsilon}{2}\right) m ≤ k ( 1 + 2 ε ) intervals. First, it is easy to check that f ρ f_{\rho} f ρ is Lipschitz continuous with Lipschitz constant 1 2 ρ \frac{1}{2\rho} 2 ρ 1 . By continuity, each left boundary point of an interval6 of g − 1 ( 1 ) g^{-1}(1) g − 1 ( 1 ) occurs at some point x ∈ [ 0 , 1 ] x \in[0,1] x ∈ [ 0 , 1 ] contained in a minimal interval [ y , z ] ⊆ [ 0 , 1 ] [y,z] \subseteq[0,1] [ y , z ] ⊆ [ 0 , 1 ] such that f ρ ( y ) ≤ τ f_{\rho}(y) \le\tau f ρ ( y ) ≤ τ , f ρ ( z ) ≥ 1 − τ f_{\rho}(z) \ge1-\tau f ρ ( z ) ≥ 1 − τ , and τ ≤ f ρ ≤ 1 − τ \tau\le f_{\rho} \le1-\tau τ ≤ f ρ ≤ 1 − τ within [ y , z ] [y,z] [ y , z ] . By the intermediate value theorem, there exists x ∗ ∈ [ y , z ] x^* \in[y,z] x ∗ ∈ [ y , z ] for which f ρ ( x ∗ ) = 1 2 f_{\rho}(x^*)=\frac{1}{2} f ρ ( x ∗ ) = 2 1 , and by the Lipschitz constant of f ρ f_{\rho} f ρ , we have that z − x ∗ ≥ 2 ρ ( 1 2 − τ ) z-x^* \ge2\rho\left(\frac{1}{2}-\tau\right) z − x ∗ ≥ 2 ρ ( 2 1 − τ ) and x ∗ − y ≥ 2 ρ ( 1 2 − τ ) x^*-y \ge2\rho\left(\frac{1}{2}-\tau\right) x ∗ − y ≥ 2 ρ ( 2 1 − τ ) . Observing that NS ρ ( f , t ) ≥ min { f ρ ( t ) , 1 − f ρ ( t ) } \operatorname{NS}_{\rho}(f,t) \ge\min\{f_{\rho}(t),1-f_{\rho}(t)\} NS ρ ( f , t ) ≥ min { f ρ ( t ) , 1 − f ρ ( t )} , and letting ℓ : = 2 ρ ( 1 2 − τ ) \ell:= 2\rho\left(\frac{1}{2}-\tau\right) ℓ := 2 ρ ( 2 1 − τ ) , we obtain
∫ y z NS ρ ( f , t ) d t = ∫ y x ∗ NS ρ ( f , t ) d t + ∫ x ∗ z NS ρ ( f , t ) d t ≥ ∫ 0 ℓ min { f ρ ( x ∗ + s ) , 1 − f ρ ( x ∗ + s ) } d s + ∫ 0 ℓ min { f ρ ( x ∗ − s ) , 1 − f ρ ( x ∗ − s ) } d s ≥ 2 ∫ 0 ℓ ( 1 2 − s 2 ρ ) d s = 2 ⋅ ( ℓ 2 − ℓ 2 4 ρ ) = ℓ ( 1 2 + τ ) ≥ 2 ρ ( 1 2 − τ ) 2 , (13) \begin{aligned}
\int_y^z \operatorname{NS}_{\rho}(f,t)\,\mathrm{d}t
&= \int_y^{x^*} \operatorname{NS}_{\rho}(f,t)\,\mathrm{d}t+\int_{x^*}^z \operatorname{NS}_{\rho}(f,t)\,\mathrm{d}t\\
&\ge\int_0^\ell\min\{f_{\rho}(x^*+s),1-f_{\rho}(x^*+s)\}\,\mathrm{d}s+\int_0^\ell\min\{f_{\rho}(x^*-s),1-f_{\rho}(x^*-s)\}\,\mathrm{d}s\\
&\ge2\int_0^\ell\left(\frac{1}{2}-\frac{s}{2\rho}\right)\,\mathrm{d}s
=2\cdot\left(\frac{\ell}{2}-\frac{\ell^2}{4\rho}\right)
=\ell\left(\frac{1}{2}+\tau\right)
\ge2\rho\left(\frac{1}{2}-\tau\right)^2, \tag*{(13)}
\end{aligned} ∫ y z NS ρ ( f , t ) d t = ∫ y x ∗ NS ρ ( f , t ) d t + ∫ x ∗ z NS ρ ( f , t ) d t ≥ ∫ 0 ℓ min { f ρ ( x ∗ + s ) , 1 − f ρ ( x ∗ + s )} d s + ∫ 0 ℓ min { f ρ ( x ∗ − s ) , 1 − f ρ ( x ∗ − s )} d s ≥ 2 ∫ 0 ℓ ( 2 1 − 2 ρ s ) d s = 2 ⋅ ( 2 ℓ − 4 ρ ℓ 2 ) = ℓ ( 2 1 + τ ) ≥ 2 ρ ( 2 1 − τ ) 2 , (13)
where the second inequality used that f ρ ( x ∗ ) = 1 2 f_{\rho}(x^*)=\frac{1}{2} f ρ ( x ∗ ) = 2 1 along with the Lipschitz property of f ρ f_{\rho} f ρ . Similarly, each right boundary point of an interval of g − 1 ( 1 ) g^{-1}(1) g − 1 ( 1 ) yields a minimal interval [ y , z ] ⊆ [ 0 , 1 ] [y,z]\subseteq[0,1] [ y , z ] ⊆ [ 0 , 1 ] satisfying (A.1). Since the resulting 2 m 2m 2 m intervals corresponding to all left and right boundaries are all disjoint, we conclude that
k ρ ( 1 + ε 4 ) ≥ NSU ρ 1 ( f ) = ∫ 0 1 NS ρ ( f , t ) d t ≥ 2 m ⋅ 2 ρ ( 1 2 − τ ) 2 = m ρ ( 1 − 2 τ ) 2 . k\rho\left(1+\frac{\varepsilon}{4}\right)\ge\operatorname{NSU}_{\rho}^{1}(f)=\int_0^1\operatorname{NS}_{\rho}(f,t)\,\mathrm{d}t\ge2m\cdot2\rho\left(\frac{1}{2}-\tau\right)^2=m\rho(1-2\tau)^2. k ρ ( 1 + 4 ε ) ≥ NSU ρ 1 ( f ) = ∫ 0 1 NS ρ ( f , t ) d t ≥ 2 m ⋅ 2 ρ ( 2 1 − τ ) 2 = m ρ ( 1 − 2 τ ) 2 .
and hence
m ≤ k ( 1 + ε 4 ) ( 1 − 2 τ ) 2 ≤ k ( 1 + ε 2 ) . m\le\frac{k\left(1+\frac{\varepsilon}{4}\right)}{(1-2\tau)^2}\le k\left(1+\frac{\varepsilon}{2}\right). m ≤ ( 1 − 2 τ ) 2 k ( 1 + 4 ε ) ≤ k ( 1 + 2 ε ) .
Step 3. We claim that g g g is ε 2 \frac{\varepsilon}{2} 2 ε -close to some union of k k k intervals under D \mathcal{D} D . Let h : [ 0 , 1 ] → { 0 , 1 } h:[0,1]\to\{0,1\} h : [ 0 , 1 ] → { 0 , 1 } be obtained from g g g by deleting its m − k ≤ k ε 2 m-k\le\frac{k\varepsilon}{2} m − k ≤ 2 k ε lightest intervals according to the measure assigned by D \mathcal{D} D , i.e., setting h h h to 0 0 0 on each of those intervals and copying the value of g g g elsewhere. Then h ∈ I k h\in\mathcal{I}_k h ∈ I k , and since the total measure of all the intervals of g g g under D \mathcal{D} D is at most 1 1 1 , we obtain that
dist D ( g , h ) ≤ m − k m = 1 − k m ≤ 1 − k k ( 1 + ε 2 ) ≤ ε 2 . \operatorname{dist}_{\mathcal{D}}(g,h)\le\frac{m-k}{m}=1-\frac{k}{m}\le1-\frac{k}{k\left(1+\frac{\varepsilon}{2}\right)}\le\frac{\varepsilon}{2}. dist D ( g , h ) ≤ m m − k = 1 − m k ≤ 1 − k ( 1 + 2 ε ) k ≤ 2 ε .
We conclude by the triangle inequality that dist D ( f , I k ) ≤ dist D ( f , g ) + dist D ( g , h ) ≤ ε \operatorname{dist}_{\mathcal{D}}(f,\mathcal{I}_k)\le\operatorname{dist}_{\mathcal{D}}(f,g)+\operatorname{dist}_{\mathcal{D}}(g,h)\le\varepsilon dist D ( f , I k ) ≤ dist D ( f , g ) + dist D ( g , h ) ≤ ε .
Proper Learning of Monotone Functions under Product Distributions
We used the following theorem to establish our upper bound on distribution-robust testing monotone functions under the class D p r o d , r e a l \mathcal{D}_{\mathrm{prod,real}} D prod , real of product distributions over R n \mathbb{R}^n R n .
Theorem 3.11. There is a sample-based proper learner for the class of monotone functions R n → { 0 , 1 } \mathbb{R}^n\to\{0,1\} R n → { 0 , 1 } under D p r o d , r e a l \mathcal{D}_{\mathrm{prod,real}} D prod , real , with sample cost 2 O ~ ( n / ε ) 2^{\widetilde{O}(\sqrt{n}/\varepsilon)} 2 O ( n / ε ) .
In this section we will sketch a proof of this theorem, which does not appear in the literature, but which is obtained by a combination of results of [47 , 14 ] . The next theorem is implicit in [14 ] .
Theorem A.1 ([14 ] ). There exists an algorithm which, given access to samples from any absolutely continuous product distribution D D D labelled by a monotone function f : R n → { 0 , 1 } f : \mathbb{R}^{n} \to\{0,1\} f : R n → { 0 , 1 } , draws 2 O ~ ( n / ε ) 2^{\widetilde{O}(\sqrt{n}/\varepsilon)} 2 O ( n / ε ) samples, uses time polynomial in the number of samples, and outputs the following:
A monotone function block : R n → [ N ] n \operatorname{block}: \mathbb{R}^{n} \to[N]^{n} block : R n → [ N ] n where N = Θ ( n / ε ) N = \Theta(n/\varepsilon) N = Θ ( n / ε ) ;
A function g : [ N ] n → { 0 , 1 } g : [N]^{n} \to\{0,1\} g : [ N ] n → { 0 , 1 } .
With probability at least 9 / 10 9/10 9/10 , these satisfy the following properties:
There exists a monotone function h : [ N ] n → { 0 , 1 } h : [N]^{n} \to\{0,1\} h : [ N ] n → { 0 , 1 } such that Pr y ∼ Unif ( [ N ] n ) [ g ( y ) ≠ h ( y ) ] < ε \Pr_{y \sim\operatorname{Unif}([N]^{n})}[g(y) \ne h(y)] < \varepsilon Pr y ∼ Unif ([ N ] n ) [ g ( y ) = h ( y )] < ε .
Pr x ∼ D [ g ( block ( x ) ) ≠ f ( x ) ] < ε \Pr_{x \sim D}[g(\operatorname{block}(x)) \ne f(x)] < \varepsilon Pr x ∼ D [ g ( block ( x )) = f ( x )] < ε .
dist T V ( block ( D ) , Unif ( [ N ] n ) ) < ε \operatorname{dist}_{\mathrm{TV}}(\operatorname{block}(D), \operatorname{Unif}([N]^{n})) < \varepsilon dist TV ( block ( D ) , Unif ([ N ] n )) < ε , where block ( D ) \operatorname{block}(D) block ( D ) is the distribution of block ( x ) \operatorname{block}(x) block ( x ) with x ∼ D x \sim D x ∼ D .
This is sufficient to prove Theorem 3.11 for continuous product distributions.
Proof of Theorem 3.11 for continuous distributions. Our proper learner is defined as follows. Given labelled sample access to a monotone function f : R n → { 0 , 1 } f : \mathbb{R}^{n} \to\{0,1\} f : R n → { 0 , 1 } with samples from continuous product distribution D D D :
Run the algorithm in Theorem A.1 with parameter ε / 3 \varepsilon/3 ε /3 to obtain functions block \operatorname{block} block and g g g , with N = Θ ( n / ε ) N = \Theta(n/\varepsilon) N = Θ ( n / ε ) .
Compute (by brute force) the monotone function h : [ N ] n → { 0 , 1 } h : [N]^{n} \to\{0,1\} h : [ N ] n → { 0 , 1 } that is closest to g g g under Unif ( [ N ] n ) \operatorname{Unif}([N]^{n}) Unif ([ N ] n ) .
Output the function x ↦ h ( block ( x ) ) x \mapsto h(\operatorname{block}(x)) x ↦ h ( block ( x )) .
Since h h h and block \operatorname{block} block are both monotone, the output h ( block ( ⋅ ) ) h(\operatorname{block}(\cdot)) h ( block ( ⋅ )) is also monotone. Let us verify that it is close to f f f under D D D . Assume the improper learner succeeds. Then
Pr y ∼ Unif ( [ N ] n ) [ g ( y ) ≠ h ( y ) ] < ε / 3 \Pr_{y \sim\operatorname{Unif}([N]^{n})}[g(y) \ne h(y)] < \varepsilon/3 Pr y ∼ Unif ([ N ] n ) [ g ( y ) = h ( y )] < ε /3 .
Pr x ∼ D [ g ( block ( x ) ) ≠ f ( x ) ] < ε / 3 \Pr_{x \sim D}[g(\operatorname{block}(x)) \ne f(x)] < \varepsilon/3 Pr x ∼ D [ g ( block ( x )) = f ( x )] < ε /3 .
dist T V ( block ( D ) , Unif ( [ N ] n ) ) < ε / 3 \operatorname{dist}_{\mathrm{TV}}(\operatorname{block}(D), \operatorname{Unif}([N]^{n})) < \varepsilon/3 dist TV ( block ( D ) , Unif ([ N ] n )) < ε /3 .
We first claim that
Pr x ∼ D [ g ( block ( x ) ) ≠ h ( block ( x ) ) ] < 2 ε / 3. \Pr_{x \sim D}[g(\operatorname{block}(x)) \ne h(\operatorname{block}(x))] < 2\varepsilon/3. x ∼ D Pr [ g ( block ( x )) = h ( block ( x ))] < 2 ε /3.
Let X ⊂ [ N ] n X \subset[N]^{n} X ⊂ [ N ] n be the set of points y ∈ [ N ] n y \in[N]^{n} y ∈ [ N ] n where g ( y ) ≠ h ( y ) g(y) \ne h(y) g ( y ) = h ( y ) . Then
dist D ( g ( block ( ⋅ ) ) , h ( block ( ⋅ ) ) ) = Pr x ∼ D [ block ( x ) ∈ X ] ≤ Pr y ∼ Unif ( [ N ] n ) [ y ∈ X ] + dist T V ( block ( D ) , Unif ( [ N ] n ) ) \begin{aligned}
\operatorname{dist}_{D}(g(\operatorname{block}(\cdot)),h(\operatorname{block}(\cdot))) = \Pr_{x \sim D}[\operatorname{block}(x) \in X] \\
&\le\Pr_{y \sim\operatorname{Unif}([N]^{n})}[y \in X] + \operatorname{dist}_{\mathrm{TV}}(\operatorname{block}(D), \operatorname{Unif}([N]^{n}))
\end{aligned} dist D ( g ( block ( ⋅ )) , h ( block ( ⋅ ))) = x ∼ D Pr [ block ( x ) ∈ X ] ≤ y ∼ Unif ([ N ] n ) Pr [ y ∈ X ] + dist TV ( block ( D ) , Unif ([ N ] n ))
≤ 2 ε / 3 , \le2\varepsilon/3, ≤ 2 ε /3 ,
which proves the claim. Now, by the triangle inequality,
dist D ( f , h ( block ( ⋅ ) ) ) ≤ dist D ( f , g ( block ( ⋅ ) ) ) + dist D ( g ( block ( ⋅ ) ) , h ( block ( ⋅ ) ) ) < ε . \operatorname{dist}_{D}(f,h(\operatorname{block}(\cdot))) \le\operatorname{dist}_{D}(f,g(\operatorname{block}(\cdot))) + \operatorname{dist}_{D}(g(\operatorname{block}(\cdot)),h(\operatorname{block}(\cdot))) < \varepsilon. dist D ( f , h ( block ( ⋅ ))) ≤ dist D ( f , g ( block ( ⋅ ))) + dist D ( g ( block ( ⋅ )) , h ( block ( ⋅ ))) < ε .
Let us now briefly sketch the proof for the more general case of D p r o d , r e a l \mathcal{D}_{\mathrm{prod,real}} D prod , real , which contains arbitrary product distributions. The method for doing this is described in Appendix A of [47 ] and it involves too many technicalities to responsibly include here. It proceeds essentially as follows:
Extend the domain from R n \mathbb{R}^{n} R n to R n × [ 0 , 1 ] n \mathbb{R}^{n} \times[0,1]^{n} R n × [ 0 , 1 ] n by doing this: (a) Replace sample x ∼ D x \sim\mathcal{D} x ∼ D with sample ( x , z ) ∼ D × Unif ( [ 0 , 1 ] n ) (x,z) \sim\mathcal{D} \times\operatorname{Unif}([0,1]^{n}) ( x , z ) ∼ D × Unif ([ 0 , 1 ] n ) . (b) Define input f ′ : R n × [ 0 , 1 ] n → { 0 , 1 } f^{\prime}\colon\mathbb{R}^{n} \times[0,1]^{n} \to\{0,1\} f ′ : R n × [ 0 , 1 ] n → { 0 , 1 } as f ′ ( x , z ) = f ( x ) f^{\prime}(x,z)=f(x) f ′ ( x , z ) = f ( x ) .
The above method for continuous distributions can be adapted to work for the augmented domain, and we learn a monotone function h ′ : R n × [ 0 , 1 ] n → { 0 , 1 } h^{\prime}\colon\mathbb{R}^{n} \times[0,1]^{n} \to\{0,1\} h ′ : R n × [ 0 , 1 ] n → { 0 , 1 } that is ε \varepsilon ε -close to f ′ f^{\prime} f ′ .
There is a rounding procedure which takes the monotone function h ′ h^{\prime} h ′ (whose values on each restriction h ′ ( x , ⋅ ) h^{\prime}(x,\cdot) h ′ ( x , ⋅ ) may not be constant) to a monotone function h : R n → { 0 , 1 } h\colon\mathbb{R}^{n} \to\{0,1\} h : R n → { 0 , 1 } .
Query Simulators for Conjunctions and Decision Lists
Query simulator for conjunctions. The paper [16 ] presents an algorithm called ApproxC which satisfies the following lemma, which can be deduced from Lemma 42 and an inspection of the proof of Lemma 43 in that paper:
Lemma A.2 ([16 ] , Lemmas 42 & 43). Given query access to f : { 0 , 1 } n → { 0 , 1 } f\colon\{0,1\}^{n} \to\{0,1\} f : { 0 , 1 } n → { 0 , 1 } and parameter ε ∈ ( 0 , 1 ) \varepsilon\in(0,1) ε ∈ ( 0 , 1 ) , the algorithm ApproxC makes O ~ ( 1 / ε ) \widetilde{O}(1/\varepsilon) O ( 1/ ε ) queries to f f f and either outputs Reject, or a set S ⊆ [ n ] S \subseteq[n] S ⊆ [ n ] and string w ∈ { 0 , 1 } n w \in\{0,1\}^{n} w ∈ { 0 , 1 } n . Define the function
g ( x ) : = f ( x S ∘ w S ‾ ) . g(x) := f(x_{S} \circ w_{\overline{S}}). g ( x ) := f ( x S ∘ w S ) . With probability at least 9 / 10 9/10 9/10 , the following properties hold:
If the output is not Reject, then dist D ( f , g ) < ε \operatorname{dist}_{\mathcal{D}}(f,g) < \varepsilon dist D ( f , g ) < ε .
If f f f is a conjunction then the output is not Reject, and g g g is a conjunction on at most ∣ S ∣ = O ( log ( 1 / ε ) ) |S| = O(\log(1/\varepsilon)) ∣ S ∣ = O ( log ( 1/ ε )) variables.
From this lemma, we can obtain Claim 4.2 by simply outputting the query simulator that, on input x x x , outputs f ( x S ∘ w S ‾ ) f(x_{S} \circ w_{\overline{S}}) f ( x S ∘ w S ) , when S S S and w w w are produced by the algorithm. If the algorithm outputs Reject, we can output a query simulator for the constant 0 function.
Query simulator for 1-decision lists. Let J ⊆ P D L \mathbb{J} \subseteq\mathsf{P}_{\mathrm{DL}} J ⊆ P DL be the class of 1-decision-lists of length at most K K K . The required subroutine is now ApproxGeneralC from [16 ] , Figure 14 and Lemma 54; the verification of Lemma 54’s two hypotheses for decision lists is given in the proof of [16 ] , Theorem 55. Lemma 54 bounds the number of relevant variables in the junta decision list by λ k \lambda k λk , for an absolute constant λ > 1 \lambda> 1 λ > 1 , where k = Θ ( log ( 1 / η ) ) k = \Theta(\log(1/\eta)) k = Θ ( log ( 1/ η )) ; this constant λ \lambda λ is absorbed into the hidden constant in the definition of K K K . Invoking the subclass and uniform-closeness parts of Lemma 54 with failure probability at most δ / 2 \delta/2 δ /2 each, the overall failure probability is at most δ \delta δ .