Testing Juntas and Junta Subclasses with Relative Error

Xi Chen, William Pires, Toniann Pitassi, Rocco A. Servedio

Introduction

In theoretical computer science and learning theory, identifying the core variables that determine the output of a complex system is a fundamental challenge. A Boolean function $f: \{0, 1\}^n \to \{0, 1\}$ is defined as a $k$-junta if its output depends on at most $k$ of its $n$ input variables. Traditionally, property testing for juntas has relied on the Hamming distance model, which measures the fraction of all $2^n$ possible inputs where two functions disagree.

However, the Hamming distance model becomes ineffective when dealing with sparse functions—functions that output "1" on only a negligible fraction of their domain. For instance, if a function is 1 on only $0.0001\%$ of inputs, it is considered "trivially close" to the constant zero function in the standard model, rendering the test practically useless. This paper addresses this gap by introducing highly efficient algorithms for testing $k$-juntas and their subclasses using a relative error metric.

The Relative Error Model

To provide meaningful guarantees for sparse functions, the authors adopt a model where distance is measured relative to the number of satisfying assignments (inputs where $f(x)=1$). In this framework, the tester is equipped with two primary tools:

  1. Black-box access (MQ): The ability to query $f(x)$ for any arbitrary input $x$.
  2. Random Sample Oracle: The ability to obtain independent, uniform samples from the set of inputs where $f(x)=1$.

The objective is to determine if $f$ is a $k$-junta or belongs to a specific subclass (such as small decision trees) using a sub-linear number of queries and samples.

The Junta-Subclass-Tester

The paper proposes a generalized Junta-Subclass-Tester designed for any subclass of juntas closed under variable permutation. The algorithm proceeds through four distinct phases:

  1. Partitioning and Identification: The $n$ variables are randomly partitioned into $O(k^2)$ blocks. Through a binary search procedure, the algorithm identifies "relevant blocks" that contain at least one variable upon which the function depends.
  2. Literal Testing: The algorithm examines these relevant blocks to determine if the function's behavior on them is "close to a literal" (i.e., behaving like a specific variable $x_i$ or its negation $\neg x_i$).
  3. Candidate Trimming: A set of potential "approximator" functions is generated. The algorithm then "trims" this set by validating them against random positive samples from the oracle. If a candidate function outputs 0 where the target function $f$ outputs 1, it is discarded.
  4. Selection and Verification: From the remaining candidates, the algorithm selects the one with the fewest satisfying assignments. This heuristic is critical; it prevents the tester from being misled by "superset" approximations that cover all of $f$'s satisfying assignments but include many extraneous ones. A final verification step ensures this candidate is truly close to $f$ in relative distance.

A key technical contribution is the development of the FindVarValue and MapBack subroutines, which allow the algorithm to isolate and evaluate specific relevant variables even when they are nested within large blocks of irrelevant data.

Key Insights and Theoretical Results

Matching the Standard Model

Perhaps the most significant finding is that for $k$-juntas, the authors achieve a query complexity of $\tilde{O}(k/\epsilon)$. This matches the optimal bounds of the standard Hamming model, a surprising result given that relative error testing is inherently more difficult. This resolves an open question from previous literature that previously only achieved $O(2^k/\epsilon)$.

Complexity of Subclasses

The paper establishes new upper bounds for various junta subclasses. For any subclass $\mathcal{C}(k)$ closed under permutation, the complexity is $\tilde{O}(\frac{k \log |\mathcal{C}(k)^*|}{\epsilon})$. This leads to highly efficient $\tilde{O}(k^2/\epsilon)$ testers for:

  • Size-$k$ decision trees
  • Size-$k$ branching programs
  • Size-$k$ Boolean formulas

Relative Error vs. Distribution-Free Testing

The authors clarify that relative error testing is distinct from "distribution-free" testing. In the relative error model, the tester must account for "false positives"—points where a candidate function $g(x)=1$ but the target $f(x)=0$. Because the sample oracle only provides points where $f(x)=1$, identifying these discrepancies requires sophisticated use of membership queries.

Limitations and Future Directions

While the paper marks a significant advancement, it notes that the current results apply specifically to functions that are exactly members of a junta subclass. In the standard model, many functions (like small circuits or DNFs) are well-approximated by juntas. However, in the relative error model, a small DNF might be "infinitely far" from any junta.

Future research is needed to develop relative-error testers for classes that are only approximated by juntas, such as $s$-term DNFs or general Boolean circuits. The authors suggest that these challenges may require entirely new algorithmic techniques or may eventually be proven to require a super-linear number of queries.

Summary updated

BibTeX
@inproceedings{chen2025testing,
  author = {Xi Chen and William Pires and Toniann Pitassi and Rocco A. Servedio},
  title = {{Testing Juntas and Junta Subclasses with Relative Error}},
  booktitle = {Conference on Learning Theory},
  year = {2025},
}
Figure