Almost Optimal Distribution-free Junta Testing
Nader H. Bshouty

TL;DR
This paper introduces a simpler, more efficient adaptive algorithm for distribution-free $k$-junta testing that reduces query complexity from roughly $k^2$ to $k$, improving the practicality of property testing.
Contribution
It presents a new two-sided error adaptive algorithm for distribution-free $k$-junta testing with nearly optimal query complexity of $ ilde O(k/\epsilon)$, improving upon previous methods.
Findings
Reduces query complexity from $ ilde O(k^2/\epsilon)$ to $ ilde O(k/\epsilon)$.
Provides a simpler and more efficient testing algorithm.
Achieves near-optimal performance in distribution-free junta testing.
Abstract
We consider the problem of testing whether an unknown -variable Boolean function is a -junta in the distribution-free property testing model, where the distance between function is measured with respect to an arbitrary and unknown probability distribution over . Chen, Liu, Servedio, Sheng and Xie showed that the distribution-free -junta testing can be performed, with one-sided error, by an adaptive algorithm that makes queries. In this paper, we give a simple two-sided error adaptive algorithm that makes queries.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Almost Optimal Distribution-free Junta Testing
**Nader H. Bshouty
**Dept. of Computer Science
Technion, Haifa, 32000
Abstract
We consider the problem of testing whether an unknown -variable Boolean function is a -junta in the distribution-free property testing model, where the distance between functions is measured with respect to an arbitrary and unknown probability distribution over . Chen, Liu, Servedio, Sheng and Xie [36] showed that the distribution-free -junta testing can be performed, with one-sided error, by an adaptive algorithm that makes queries. In this paper, we give a simple two-sided error adaptive algorithm that makes queries.
1 Inroduction
Property testing of Boolean function was first considered in the seminal works of Blum, Luby and Rubinfeld [11] and Rubinfeld and Sudan [43] and has recently become a very active research area. See for example, [1, 2, 3, 4, 7, 8, 13, 14, 15, 16, 18, 19, 22, 24, 28, 30, 33, 34, 38, 37, 40, 44] and other works referenced in the surveys [27, 41, 42].
A function is said to be -junta if it depends on at most variables. Juntas have been of particular interest to the computational learning theory community [9, 10, 12, 31, 35, 39]. A problem closely related to learning juntas is the problem of testing juntas: Given black-box query access to a Boolean function . Distinguish, with high probability, the case that is -junta versus the case that is -far from every -junta.
In the uniform distribution framework, where the distance between two functions is measured with respect to the uniform distribution, Ficher et al. [24] introduced the junta testing problem and gave adaptive and non-adaptive algorithms that make queries. Blais in [5] gave a non-adaptive algorithm that makes queries and in [6] an adaptive algorithm that makes queries. On the lower bounds side, Fisher et al. [24] gave an lower bound. Chockler and Gutfreund [21] gave an lower bound for adaptive testing and, recently, Sağlam in [44] improved this lower bound to . For the non-adaptive testing Chen et al. [17] gave the lower bound .
In the distribution-free property testing, [29], the distance between Boolean functions is measured with respect to an arbitrary and unknown distribution over . In this model, the testing algorithm is allowed (in addition to making black-box queries) to draw random according to the distribution . This model is studied in [20, 23, 26, 32, 36]. For testing -junta in this model, Chen et al. [36] gave a one-sided adaptive algorithm that makes queries and proved a lower bound for any non-adaptive algorithm. The results of Halevy and Kushilevitz [32] gives a one-sided non-adaptive algorithm that makes queries. The adaptive uniform-distribution lower bound from [44] trivially extend to the distribution-free model.
In this paper, we close the gap between the adaptive lower and upper bound. We prove
Theorem 1**.**
For any , there is a two-sided distribution-free adaptive algorithm for -testing -junta that makes queries.
Our exact upper bound is and therefore, by Sağlam [44] lower bound of , our bound is tight for any constant .
2 Preliminaries
In this section we give some notations follows by a formal definition of the model and some preliminary known results
2.1 Notations
We start with some notations. Denote . For and we write . For we denote by the set of all binary strings of length with coordinates indexed by . For and we write to denote the projection of over coordinates in . We denote by and the all one and all zero strings in , respectively. When we write we mean . For where and we write to denote their concatenation, the string in that agrees with over coordinates in and agrees with over . For we denote . We say that the Boolean function is a literal if .
Given and a probability distribution over , we say that is -close to with respect to if , where means is chosen from according to the distribution . We say that is -far from with respect to if . We say that is -far from every -junta with respect to if for every -junta , is -far from with respect to . We will use to denote the uniform distribution over .
2.2 The Model
In this subsection, we define the model.
We consider the problem of testing juntas in the distribution-free testing model. In this model, the algorithm has access to a -junta via a black-box that returns when a string is queried, and access to unknown distribution via an oracle that returns chosen randomly according to the distribution .
A distribution-free testing algorithm is a algorithm that, given as input a distance parameter and the above two oracles,
if is -junta then output “accept” with probability at least . 2. 2.
if is -far from every -junta with respect to the distribution then it output “reject” with probability at least .
We say that is one-sided if it always accepts when is -junta, otherwise, it is called two sided algorithm. The query complexity of a distribution-free testing algorithm is the number of queries made on .
2.3 Preliminaries Results
In this section, we give some known results that will be used in the sequel.
For a Boolean function and , we say that is a relevant set of if there are such that . When then we say that is relevant variable of . Obviously, if is relevant set of then contains at least one relevant variable of . In particular, we have
Lemma 2**.**
If is a partition of then for any Boolean function the number of relevant sets of is at most the number of relevant variables of .
We will use the following folklore result that is formally proved in [36].
Lemma 3**.**
Let be a partition of . Let be a Boolean function and . If then a relevant set of with a string that satisfies can be found with queries.
The following is from [6]
Lemma 4**.**
There exists a one-sided adaptive algorithm, UniformJunta, for -testing -junta that makes queries and rejects with probability at least when it is -far from every -junta with respect to the uniform distribution.
The following is from [36].
Lemma 5**.**
Let be any probability distribution over . If is -far from every -junta with respect to then for any , we have
[TABLE]
Proof.
Let of size . For every fixed the function is -junta and therefore Therefore
[TABLE]
∎
3 The Algorithm
In this section, we prove the correctness of the algorithm and show that it makes queries. We first give an overview of the algorithm then prove its correctness and analyze its query complexity.
3.1 Overview of the Algorithm
In this subsection we give an overview of the algorithm. We will use the notationד in Subsection 2.1 and the definitions and Lemmas in Subsection 2.3.
Consider the algorithm in Figure 1. In steps 1-1, the algorithm uniformly at random partitions into disjoint sets . Lemma 6 shows that,
Fact 1**.**
If the function is -junta then with high probability (w.h.p), each set of variables contains at most one relevant variable.
In steps 1-LABEL:EndRep, the algorithm finds
Fact 2**.**
relevant sets such that for , w.h.p., the function is -close to with respect to .
To find such set, the algorithm, after finding relevant sets , chooses random string and tests if where . The variable counts for how many random strings we get . If reaches the value then, w.h.p, is -close to with respect to and . Otherwise, and using Lemma 3 the algorithm finds a new relevant set . This is proved in Lemma 10.
In addition, for each relevant set , , it finds a string that satisfies . Obviously, if then, since each relevant set contains at least one relevant variable, the target is not -junta and the algorithm rejects. See Lemma 2.
Now one of the key ideas is the following: If is -junta then is -junta. If is -far from every -junta with respect to then since, by Fact 2, w.h.p., is -close to with respect to we have that,
Fact 3**.**
If is -far from every -junta with respect to then, w.h.p., is -far from every -junta with respect to .
Now, since each , is relevant set and , for the function is non-constant. In steps 1-LABEL:ConE, the algorithm tests that,
Fact 4**.**
w.h.p., for each there is such that is close to some literal in , with respect to the uniform distribution.
This is done using the procedure UniformJunta in Lemma 4.
If is -junta then, by Fact 1 and 2, w.h.p., it passes this test (does not output reject). This is Lemma 7. If the algorithm does not pass this test, it rejects. If is not -junta and it passes this test, then the statement in Fact 4 is true. This is proved in Lemma 11.
Consider now steps 1-LABEL:Finn. First, let us consider a function that is -far from every -junta with respect to . Let where is as defined in Fact 4. Since by Fact 3, w.h.p., is -far from every -junta with respect to and , by Lemma 5, w.h.p.,
[TABLE]
So we need to test whether is -far from (those are equal in the case when is -Junta). This is the last test we would like to do but the problem is that we do not know , so we cannot use this test as is. So we change it, as is done in [36], to an equivalent test as follows
[TABLE]
To be able to draw uniformly random with , we use Fact 4, that is, the fact that each is close to one of the literals in . For every , the algorithm draws uniformly random and then using the fact that is close to one of the literals in where the algorithm tests in which set or the index falls. If then the entry in is zero and if then the entry in is one. In the latter case, the algorithm replaces with (negation of each entry in ) which is also uniformly random. This gives a random uniform with . We do that for every and get a random uniform with . This is proved in Lemma 12. Then the algorithm rejects if . If is -far from every -junta then, by Lemma 5, is -far from , and the algorithm, with one test, rejects with probability at least . Therefore, by repeating this test times the algorithm rejects w.h.p. This is proved in Lemma 13.
Now we consider that is -junta. Obviously, if is -junta then when and the algorithm accepts. This is because are the relevant variables in . This is proved in Lemma 8.
3.2 The algorithm for -Junta
In this subsection, we show that if the target function is -junta then the algorithm accepts with probability at least .
We first prove
Lemma 6**.**
Consider steps 1-1 in the algorithm. If is a -junta then, with probability at least , for each , the set contains at most one relevant variable of .
Proof.
Let and be two relevant variables in . The probability that and are in the same set is equal to . By the union bound, it follows that the probability that some relevant variables and in are in the same set is at most . ∎
We now show that w.h.p. the algorithm reaches the final test in the algorithm
Lemma 7**.**
If is -junta and each contains at most one relevant variable of then
Each , , contains exactly one relevant variable. 2. 2.
The algorithm reaches step 1
Proof.
By Lemma 3 and steps LABEL:con1-LABEL:Finddd, for , and therefore contains exactly one relevant variable. Thus, for every , is a literal.
If the algorithm does not reach step 1, then it either halts in step LABEL:Rej, LABEL:Rej2 or LABEL:ConE. If it halts in step LABEL:Rej then and therefore, by Lemma 2, contains more than relevant variables and then it is not -Junta. If it halts in step LABEL:Rej2 then, by Lemma 4, for some , , is not -Junta (literal or constant function) and therefore contains at least two relevant variables. If it halts in step LABEL:ConE, then and then is not a literal. In all cases we get a contradiction. ∎
We now give two Lemmas that show that, with probability at least , the algorithm accepts -junta.
Lemma 8**.**
If is -Junta and each contains at most one relevant variable of then the algorithm outputs “accept”.
Proof.
By Lemma 7, the algorithm reaches step 1. We now show that it reaches step 1. Now we need to show that the algorithm does not halt in step LABEL:GGG or LABEL:Finn.
Since is a partition of , and contains exactly one relevant variable in of , this variable is either in or in but not in both. Suppose w.l.o.g. it is in and not in . Then is a literal and is a constant function. This implies that for any , and . Therefore, and . Thus the algorithm does not halt in step LABEL:GGG.
Now for every , , let be such that . If then and then by step LABEL:Gl, . If then and then . Therefore for every relevant variable in we have which implies that and therefore the algorithm does not halt in step LABEL:Finn. ∎
Lemma 9**.**
If is -Junta then the algorithm outputs “accept” with probability at least .
Proof.
The result follows from Lemma 6 and Lemma 8. ∎
3.3 The Algorithm for -Far Functions
In this subsection, we prove that if is -far from every -junta then the algorithm rejects with probability at least .
The first lemma shows that, w.h.p., is -close to .
Lemma 10**.**
If the algorithm reaches step 1 then and . If
[TABLE]
then the algorithm reaches step 1 with probability at most .
Proof.
The algorithm does not reaches step 1 if and only if it halts in step LABEL:Rej and then . The size of is increased by one each time the condition, , in step LABEL:con1, is true. Therefore, if the algorithm reaches step 1 then the condition in step LABEL:con1 was true at most times and . Then steps LABEL:Find-LABEL:tx0 are executed at most times. Thus, is updated to [math] at most times. The loop LABEL:Cho-LABEL:EndRep is repeated times and is updated to [math] at most times and therefore there is for which . This implies that when the algorithm reaches step 1, we have .
The probability that the algorithm reaches step 1 with is the probability that for one (of the at most ) , and . By the union bound, this probability is less than
[TABLE]
∎
In the following lemma we show that, w.h.p, each is close to a literal.
Lemma 11**.**
Consider steps 1-LABEL:Rej2. If for some , is -far from every literal with respect to the uniform distribution then, with probability at least , the algorithm rejects.
Proof.
If is -far from every literal with respect to the uniform distribution then it is either (case 1) -far from every -Junta (literal or constant) or (case 2) -far from every literal and -close to [math]-Junta. In case 1, by Lemma 4, with probability at least , “reject” and then the algorithm rejects. In case 2, if is -close to some [math]-Junta then it is either -close to [math] or -close to . Suppose it is -close to [math]. Let be a random uniform string generated in steps LABEL:ConB. Then is random uniform and for we have
[TABLE]
By the union bound the result follows. ∎
In the next lemma we prove that, w.h.p, the string generated in steps LABEL:feld-LABEL:Gl satisfies where are relevant variables of .
Lemma 12**.**
Consider steps LABEL:feld-LABEL:Gl. If for every the function is -close to a literal in with respect to the uniform distribution, where , and then, with probability at least , we have: For every , .
Proof.
Fix some . Suppose is -close to with respect to the uniform distribution. The case when it is -close to is similar. Since and we have that or , but not both. Suppose . The case where is similar. Define the random variable if and otherwise. Then
[TABLE]
Therefore
[TABLE]
and by Markov’s bound
[TABLE]
That is, for a random uniform string , with probability at least , is -close to with respect to the uniform distribution. Now, given that is -close to with respect to the uniform distribution the probability that is the probability that for random uniform strings . Let be random uniform strings in , be the event and the event that is -close to with respect to the uniform distribution. Let . Then
[TABLE]
Since , we have . Therefore, by step LABEL:Gl and since ,
[TABLE]
Therefore, the probability that for some is at most . ∎
We now show that w.h.p the algorithm reject if is -far from every -junta
Lemma 13**.**
If is -far from every -junta with respect to then, with probability at least , the algorithm outputs “reject”.
Proof.
If the algorithm stops in step LABEL:Rej then we are done. Therefore we may assume that
[TABLE]
By Lemma 10, if then, with probability at most , the algorithm reaches step 1. So we may assume that (failure probability )
[TABLE]
Since is -far from every -junta with respect to and is -close to with respect to we have is -far from every -junta with respect to . Therefore, by Lemma 5,
[TABLE]
By Lemma 11, if some is -far from any literal with respect to the uniform distribution then, with probability at least , the algorithm rejects. So we may assume (failure probability ) that every is -close to some or with respect to the uniform distribution, where .
Let be the strings generated in step LABEL:Gl. By Lemma 12, with probability at least , every generated in step LABEL:Gl satisfies for all . Also, since the distribution of and is uniform, the distribution of and is uniform. We now assume (failure probability ) that for all . Therefore, by (3),
[TABLE]
Therefore, the failure probability of an output “reject” is at most . ∎
3.4 The Query Complexity of the Algorithm
In this section we show that
Lemma 14**.**
The query complexity of the algorithm is
[TABLE]
Proof.
The condition in step LABEL:con1 requires two queries and is executed at most times. This is queries. Steps LABEL:Find is executed at most times. This is because each time it is executed, the value of is increased by one, and when the algorithm rejects. By Lemma 3, to find a new relevant set the algorithm makes queries. This is queries. Steps LABEL:Uni and LABEL:ConE are executed times, and by Lemma 4, the total number of queries made is .
The final test in the algorithm is repeated times (step 1) and each time, and for each , (step LABEL:feld01) it repeats times (step LABEL:feld02) two conditions that takes queries each (step LABEL:feld03). This takes queries. The number of queries in step LABEL:Finn is . Therefore the total number of queries is
[TABLE]
∎
4 Open Problems
In this paper we proved that for any , there is a two-sided distribution-free adaptive algorithm for -testing -junta that makes queries. It is also interesting to find a one-sided distribution-free adaptive algorithm with such query complexity.
Chen et al. [36] proved the lower bound for any non-adaptive (one round) algorithm. What is the minimal number rounds one needs to get query complexity? Can -round algorithms solve the problem with queries?
In the uniform distribution framework, where the distance between two functions is measured with respect to the uniform distribution Blais in [5] gave a non-adaptive algorithm that makes queries and in [6] an adaptive algorithm that makes queries. On the lower bounds side, Sağlam in [44] gave an lower bound for adaptive testing and Chen et al. [17] gave an lower bound for the non-adaptive testing. Thus in both the adaptive and non-adaptive uniform distribution settings, the query complexity of -junta testing has now been pinned down to within logarithmic factors. It is interesting to study -round algorithms. For example, what is the query complexity for -round algorithm.
[TABLE]
Acknowledgment. We would like to thank Xi Chen for reading the early version of the paper and for verifying the correctness of the algorithm.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Noga Alon, Tali Kaufman, Michael Krivelevich, Simon Litsyn, and Dana Ron. Testing reed-muller codes. IEEE Trans. Information Theory , 51(11):4032–4039, 2005. URL: https://doi.org/10.1109/TIT.2005.856958 , doi:10.1109/TIT.2005.856958 . · doi ↗
- 2[2] Roksana Baleshzar, Meiram Murzabulatov, Ramesh Krishnan S. Pallavoor, and Sofya Raskhodnikova. Testing unateness of real-valued functions. Co RR , abs/1608.07652, 2016. URL: http://arxiv.org/abs/1608.07652 , ar Xiv:1608.07652 .
- 3[3] Aleksandrs Belovs and Eric Blais. A polynomial lower bound for testing monotonicity. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016 , pages 1021–1032, 2016. URL: https://doi.org/10.1145/2897518.2897567 , doi:10.1145/2897518.2897567 . · doi ↗
- 4[4] Arnab Bhattacharyya, Swastik Kopparty, Grant Schoenebeck, Madhu Sudan, and David Zuckerman. Optimal testing of reed-muller codes. In Property Testing - Current Research and Surveys , pages 269–275. 2010. URL: https://doi.org/10.1007/978-3-642-16367-8_19 , doi:10.1007/978-3-642-16367-8\_19 . · doi ↗
- 5[5] Eric Blais. Improved bounds for testing juntas. In Approximation, Randomization and Combinatorial Optimization. Algorithms and Techniques, 11th International Workshop, APPROX 2008, and 12th International Workshop, RANDOM 2008, Boston, MA, USA, August 25-27, 2008. Proceedings , pages 317–330, 2008. URL: https://doi.org/10.1007/978-3-540-85363-3_26 , doi:10.1007/978-3-540-85363-3\_26 . · doi ↗
- 6[6] Eric Blais. Testing juntas nearly optimally. In Proceedings of the 41st Annual ACM Symposium on Theory of Computing, STOC 2009, Bethesda, MD, USA, May 31 - June 2, 2009 , pages 151–158, 2009. URL: https://doi.org/10.1145/1536414.1536437 , doi:10.1145/1536414.1536437 . · doi ↗
- 7[7] Eric Blais, Joshua Brody, and Kevin Matulef. Property testing lower bounds via communication complexity. In Proceedings of the 26th Annual IEEE Conference on Computational Complexity, CCC 2011, San Jose, California, USA, June 8-10, 2011 , pages 210–220, 2011. URL: https://doi.org/10.1109/CCC.2011.31 , doi:10.1109/CCC.2011.31 . · doi ↗
- 8[8] Eric Blais and Daniel M. Kane. Tight bounds for testing k-linearity. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques - 15th International Workshop, APPROX 2012, and 16th International Workshop, RANDOM 2012, Cambridge, MA, USA, August 15-17, 2012. Proceedings , pages 435–446, 2012. URL: https://doi.org/10.1007/978-3-642-32512-0_37 , doi:10.1007/978-3-642-32512-0\_37 . · doi ↗
