Testing Unate Distributions

Daeho Lee
Massachusetts Institute of Technology
daeho0_0@mit.edu

,

Shivam Nadimpalli
Massachusetts Institute of Technology
shivamn@mit.edu

,

Mingda Qiao
University of Massachusetts, Amherst
mingda.qiao.cs@gmail.com

,

Ronitt Rubinfeld
Massachusetts Institute of Technology
ronitt@csail.mit.edu


Abstract

We initiate the study of unate distributions over \(\bits^n\)—a natural analogue of unate Boolean functions—by considering two basic testing problems that parallel well-studied questions for monotone distributions:

  • Uniformity Testing of Unate Distributions: We show that \(\wt{\Theta}(n^{3/2})\) samples are sufficient and necessary, in contrast to the \(\wt{\Theta}(n)\) sample complexity of the analogous problem for monotone distributions (Rubinfeld and Servedio, STOC 2005; Adamaszek, Czumaj, and Sohler, SODA 2010).

  • Unateness Testing of Arbitrary Distributions: We give a tester that uses \(\wt{O}(n^{3/2})\) conditional samples in the subcube conditional model. On the other hand, every tester that draws conditional samples in a similar fashion, namely from \(O(1)\)-dimensional subcubes, must have an \(\wt{\Omega}(n^{2/3})\) complexity. In the same model, the complexity of monotonicity testing was recently shown to be \(\wt{\Theta}(n)\) (Chakrabarty et al., STOC 2025).

Our algorithms for both problems significantly outperform the naive approach of reducing to the monotone case, which would incur \(\Omega(n^2)\) sample complexity. Our uniformity tester relies on a subroutine that “weakly” learns the hidden orientations of a unate distribution, together with a new correlation bound for these estimates. Both tools may be of independent interest in studying monotonicity and unateness over \(\bn\).

1 Introduction↩︎

Many fundamental distribution testing tasks—uniformity testing being the canonical example—become infeasible in high dimensional settings such as the Boolean hypercube \(\bn\), requiring exponentially many samples in the dimension [1], [2]. A central theme in the field has therefore been to identify structured settings that admit efficient testers: examples include Bayesian networks [3], [4], Markov random fields [5], [6], and structured truncations [7], [8].

Among such structural assumptions, one of the most extensively studied is monotonicity, the distributional analogue of the classical Boolean function property.1 In the Boolean function setting, monotonicity has played a central role in sublinear algorithms for nearly three decades: it was among the first properties studied in Boolean function testing and continues to be actively investigated to this day [9][18]. In the distributional setting, monotonicity has similarly been studied in depth, leading to tight upper and lower bounds for tasks such as uniformity testing and property testing under various access models [19][27].

A closely related property in the Boolean function setting is unateness. Informally, a Boolean function is unate if each coordinate is either always non-decreasing or always non-increasing. The problem of testing unateness of Boolean functions was introduced alongside monotonicity testing in [10], and has since received considerable attention [28][33]. Both monotonicity and unateness are fundamental structural properties that arise naturally across many domains, for example in social choice (where we can view a Boolean function \(f\) as a voting rule), economics, learning theory, and circuit design.

Despite extensive work on unate functions, the analogous notion for distributions has, to the best of our knowledge, not been studied. In this work, we initiate the study of unate distributions over \(\bn\). The motivation for this is twofold:

  • The study of monotone distributions has a well-developed literature precisely because monotonicity is a natural structural constraint arising in settings ranging from social choice to learning theory. Unateness is a strict and natural generalization—it captures the same “directional” structure without fixing a canonical orientation—and we believe its study for distributions will prove equally fruitful.

  • Additionally, unate distributions, which we define shortly, form a broad and natural family of probability distributions. For example, every unate function \(f\) induces a unate distribution (the uniform distribution over \(f^{-1}(1))\), and the class of unate functions includes families such as halfspaces and read-once decision lists, which need not be monotone. Beyond this connection to functions, every product distribution over \(\bn\) is unate.

Finally, as this work demonstrates, unate distributions pose challenges that cannot be addressed by simply reducing to the monotone setting. Even for basic tasks such as uniformity testing, the sample complexity changes, and more broadly, new ideas are required to design and analyze optimal testers for this richer class of distributions.

1.1 Our Results↩︎

We start by formally defining unate distributions over \(\bits^n\):

Definition 1. A distribution \(\calD\) over \(\bits^n\) is unate* if there exists \(\sigma \in \bits^n\) such that \(\calD(x\oplus \sigma)\) is a monotone probability mass function, where \(\oplus\) denotes coordinate-wise multiplication.*

Unate distributions immediately inherit many of the algorithmic challenges and lower bounds known from the monotone distribution setting. This includes, for example, the exponential sample lower bounds for tasks such as entropy estimation and independence testing [20]. In this work, we give efficient algorithms as well as lower bounds for two basic problems:

  • Uniformity testing of unate distributions; and

  • Testing unateness of an unknown distribution in the subcube conditional model introduced by Canonne, Ron, and Servedio [34] and Chakraborty, Fischer, Goldhirsh, and Matsliah [35].

In the subcube conditional model for distributions over \(\bn\), an algorithm can query \(\calD\) with a subcube \(\rho \in \{\pm1, \ast\}^n\) and receive an independent sample \(\bx\sim\calD\) conditioned on \(\bx_i = \rho_i\) for all \(i\) where \(\rho_i \neq \ast\). This model provides a distributional analogue of the “membership query” from learning theory and property testing of Boolean functions, and has received considerable attention in recent years.

We note that for both of the problems we consider, an easy argument using the Chernoff bound together with a union bound over all \(\sigma \in \bn\) (cf. 1) allow us to reduce to the corresponding problems for monotone distributions with a multiplicative \(O(n)\) sample/subcube query overhead. Our main algorithmic results improve on this naive approach for each task; we defer a technical overview of our results to 1.2 and survey related work in 1.3.

1.1.1 Uniformity Testing of Unate Distributions↩︎

Throughout, we write \(\calU = \calU_n\) for the uniform distribution over \(\bn\). Our first result gives an efficient uniformity tester for high-dimensional distributions under the promise of unateness:

theoremunifUB Let \(\eps \in (0,1)\). There is an algorithm, Unate-Uniformity (1) which, given i.i.d. sample access to an unknown unate distribution \(\calD\) over \(\bn\), draws \(\wt{O}(n^{3/2}/\eps^2)\) samples and has the following performance guarantee:

  • If \(\calD = \calU\), then it outputs “accept” with probability \(9/10\).

  • If \(\mathrm{d}_{\mathrm{TV}}(\calD, \calU) \geq \eps\), then it outputs “reject” with probability \(9/10\).

Furthermore, it runs in \(\wt{O}(n^{5/2}/\eps^2)\) time.

Here \(\mathrm{d}_{\mathrm{TV}}(\cdot)\) refers to the total variation or statistical distance (2.2). This result should be contrasted with the \(\wt{O}(n/\eps^2)\) bound for uniformity testing of monotone distributions due to Rubinfeld and Servedio [20].2 At a high level, moving from monotone to unate distributions introduces an unknown orientation vector \(\sigma\) (cf. 1); any naive strategy that first learns \(\sigma\) and then runs the [20] tester provably incurs an \(\Omega(n^2)\) sample overhead. Our algorithm bypasses this bottleneck by never learning \(\sigma\) explicitly. Instead, we introduce a weak-orientation learning framework whose errors are provably weakly correlated across coordinates. This allows a small average bias to be amplified into a global signal using only \(\widetilde{O}(n^{3/2})\) samples. We believe this structural result on limited correlations among marginals of unate distributions is of independent interest. We complement [thm:our-unif-test] with a matching lower bound:

theoremunifLB Let \(\calA\) be any algorithm which, given i.i.d. sample access to an unknown distribution \(\calD\), has the performance guarantee from [thm:our-unif-test] with \(\eps = 1-n^{-10}\). Then \(\calA\) must draw \(\Omega(n^{3/2}/\log^2 n)\) samples from \(\calD\).

Our proof of [thm:our-unif-lb] extends the “monotone decomposition method” of Rubinfeld and Servedio [20] to the setting of unate distributions; see 1.2 for more details.

One might hope that the additional power of the subcube conditional model could yield improved bounds for uniformity testing of unate distributions. Recall that uniformity testing of arbitrary distributions can be done using \(\wt{O}(\sqrt{n})\) subcube queries [36]. Unfortunately, it turns out that the additional structure of unateness cannot beat this baseline: Chakrabarty, Chen, Ristic, Seshadhri, and Waingarten [27] have recently shown that even the easier problem of testing uniformity of monotone distributions in the subcube model already requires \(\wt{\Omega}(\sqrt{n})\) queries.

1.1.2 Testing Unateness of Distributions↩︎

We now turn to the problem of testing whether an unknown distribution over \(\bn\) is itself unate. In the standard access model where one receives i.i.d. samples from the unknown distribution being tester, this task is intractable: even for the simpler case of monotonicity, classical “birthday paradox” arguments imply that exponential-in-\(n\) sample complexity is unavoidable [24], [25]. It is therefore necessary to consider stronger access models to obtain meaningful algorithms.

Motivated by this, Chakrabarty, Chen, Ristic, Seshadhri, and Waingarten [27] studied monotonicity testing in the subcube conditional model, where the tester can query samples conditioned on arbitrary coordinate restrictions. Building on their results, we give an efficient algorithm for testing unateness in the same model.

theoremsubcubeUB Let \(\eps \in (0,1)\). There is an algorithm, Subcube-Unate (2) which, given subcube query access to an unknown distribution \(\calD\) over \(\bn\), makes \(\wt{O}(n^{3/2}/\eps^2)\) queries and has the following performance guarantee:

  • If \(\calD\) is unate, it outputs “accept” with probability at least \(2/3\).

  • If \(\calD\) is \(\eps\)-far in TV distance from every unate distribution on \(\bn\), then it outputs “reject” with probability at least \(2/3\).

We note that the algorithm of [thm:our-subcube-UB] also works in the weaker coordinate oracle model of Blanca et al. [37] where queries are only made on one-dimensional subcubes. We complement [thm:our-subcube-UB] with the following lower bound:

theoremsubcubeLB There exists a constant \(\eps_0 > 0\) such that the following holds: If an algorithm tests whether an unknown distribution \(\calD\) over \(\bits^n\) is unate or \(\eps_0\)-far from unate by drawing \(Q_1\) samples from \(\calD\) and making \(Q_2\) (possibly adaptive) subcube queries on subcubes of dimensions \(\le d\), we have \[Q_1 + 2^dQ_2 \ge \Omega(n^{2/3} / \log^3 n).\]

We note that all prior lower bounds in the subcube model are based on product distributions as hard instances. Since every product distribution is trivially unate, these techniques cannot be applied to this setting. To the best of our knowledge, ours is the first lower bound that breaks this barrier; we return to this point in 1.4.

1.2 Main Ideas↩︎

We give a brief technical overview of our results. Although both of our upper bounds end up with the same asymptotic sample complexity of \(\wt{O}(n^{3/2}/\varepsilon^2)\), that the ideas underlying each of them are quite different.

1.2.1 Testing Uniformity of Unate Distributions↩︎

1.2.1.1 Upper Bound.

A natural first attempt is to adapt the Rubinfeld–Servedio [20] uniformity tester for monotone distributions to the unate setting. The idea would be to first learn the hidden “orientation vector” \(\sigma^\ast \in \bits^n\) (cf. 1) such that the reoriented distribution \(\calD^{\sigma^\ast}\), where \(\bx\sim\calD^{\sigma^\ast}\) is obtained by drawing \(\by \sim \calD\) and setting \(\bx_i = \sigma^\ast_i \cdot \by_i\), is monotone. Since total variation distance is preserved under bijections, \(\mathrm{d}_{\mathrm{TV}}(\calD, \calU) = \mathrm{d}_{\mathrm{TV}}(\calD^{\sigma^\ast}, \calU)\). Thus, if \(\sigma^\ast\) were known, one could directly apply the \(O(n/\varepsilon^2)\)-sample uniformity tester of [20], [21].

However, exactly recovering \(\sigma^\ast\) can be prohibitively expensive. Consider, for example, a product distribution where each coordinate has mean \(\pm \Theta(1/n)\). Such a distribution is \(\Omega(1)\)-far from uniform, but distinguishing \(\E[x_i]=0\) from \(\E[x_i]=\pm \Theta(1/n)\) for each coordinate requires \(\Omega(n^2)\) samples by Chernoff bounds. This naive approach of fully learning the orientation thus fails to give the desired sample complexity of \(\wt{O}(n^{3/2})\).

Our algorithm circumvents this barrier by avoiding the need to learn \(\sigma^\ast\) exactly. Instead, we estimate a weakly correlated proxy for \(\sigma^\ast\) using only \(\wt{O}(n^{3/2}/\varepsilon^2)\) samples. The key technical step (2; which may be of independent interest) shows that for unate distributions, the coordinate-wise sign estimates cannot exhibit strong correlations: indeed, their covariances decay at rate \(O(1/\sqrt{m})\) after \(m\) samples. This weak dependence is sufficient to amplify a small average bias across coordinates into a global signal, allowing us to test uniformity with \(\wt{O}(n^{3/2})\) samples.

1.2.1.2 Lower Bound.

Our lower bound builds on the “monotone decomposition” method of Rubinfeld and Servedio [20], which we briefly recall. Concretely, one starts from a (slightly biased) monotone product distribution \(\calD_\tau\), which admits a representation as a convex combination of uniform distributions on monotone subcubes (the “decomposition”). Using this representation, we define a random distribution \(\bq\) by sampling \(T\) such subcubes and averaging their uniform measures, and show that for appropriate parameters \(\bq\) is a monotone distribution that is (with high probability) very far from uniform even though it is indistinguishable from \(\calD_\tau\) with \(\ll n\) samples.

To lift this construction from monotone to unate distributions, we apply a random orientation: we draw a uniformly random \(\boldsymbol{\sigma}\in\{\pm1\}^n\) and output \(\bq' := \bq^{\boldsymbol{\sigma}}\) which is the distribution \(\bq\) but with output bits flipped according to \(\boldsymbol{\sigma}\) (see [notation:D-sigma] for a precise definition). This preserves the distance from uniformity since total variation distance is invariant under bijections, while hiding the global direction of bias and ensuring that \(\bq'\) is a valid hard instance in the unate class. The key point is that although \(\bq'\) is far from uniform with high probability, it is information-theoretically difficult to distinguish \(\bq'\) from \(U\) using fewer than \(\widetilde{\Omega}(n^{3/2})\) samples. The proof proceeds in two steps:

  • First, a coupling argument shows that \(m\) samples from \(\bq'\) are close (in total variation distance) to \(m\) samples from the randomly oriented biased product distribution \(\calD_\tau^{\boldsymbol{\sigma}}\). (We note that this step holds for every \(m\).)

  • Second, averaging over the random orientation \(\boldsymbol{\sigma}\) forces strong cancellations, and a \(\chi^2\)-divergence calculation on one-dimensional marginals shows that \((\calD_\tau^{\boldsymbol{\sigma}})^{\otimes m}\) itself is close to \(U^{\otimes m}\) whenever \(m \ll n^{3/2}\).

Putting these together yields our matching lower bound, up to polylogarithmic factors.

1.2.2 Testing Unate Distributions via Subcube Queries↩︎

1.2.2.1 Upper Bound.

For the task of testing whether an unknown distribution is itself unate, we work in the subcube conditional model, following the recent work of Chakrabarty et al. [27]. At a high level, our algorithm adapts the classical edge tester for Boolean unateness [10] to the distributional setting. The central tool is a structural lemma of [27], based on a real-valued “directed” generalization of an isoperimetric inequality due to Talagrand [38], which controls the “edge bias” of monotone distributions. We refer the reader to 5 for a precise statement. Using this lemma, we show that if \(\calD\) is \(\varepsilon\)-far from unate, then there exists some coordinate \(i\) that simultaneously witnesses both “monotone” and “anti-monotone” violations. This can then be detected by making \(\wt{O}(n^{3/2})\) subcube edge queries; the analysis requires an elementary but careful calculation.

1.2.2.2 Lower Bound.

On the lower-bound side, we reduce Boolean unateness testing to distributional unateness. Given a Boolean function \(f:\bn\to\{0,1\}\), let \(D_f\) be the uniform distribution on \(f^{-1}(1) \sse \bn\). Our reduction is based on two key facts:

  • First, we show that (i) if \(f:\bn\to\zo\) is unate, then so is \(D_f\), and (ii) conversely, if \(f\) is \(\eps\)-far from unate (in Hamming distance), \(D_f\) is \(\Omega(\eps)\)-far from unate (in total variation distance).

  • Second, we note that membership query access to \(f\) allows us to simulate unconditional samples from \(D_f\) and samples from \(D_f\) restricted to \(d\)-dimensional subcubes (with \(2^d\) queries per restriction).

Combining these observations with the \(\wt{\Omega}(n^{2/3})\) query lower bound for Boolean unateness testing [30] yields [thm:subcube-lower-bound].

1.3 Related Work↩︎

Monotonicity of Boolean functions is among the most extensively studied properties in sublinear algorithms; we will not attempt to survey the very large body of results here and instead refer the reader to the comprehensive discussion from [27]. The problem of unateness testing of Boolean functions was introduced alongside that of monotonicity testing in [10], and a sequence of works [10], [28][32] have pinned down its exact query complexity: \(\wt{\Theta}(n^{2/3})\) queries are both necessary and sufficient to test unateness of Boolean functions.

A number of natural distribution testing tasks have exponential sample complexity in high-dimensional settings. This includes uniformity testing over \(\bits^n\); see the surveys [1], [2] for more discussion on this. In order to overcome these lower bounds, many works either make structural assumptions on the distribution being tested, or assume stronger access models to the distribution. Examples of the former include monotonicity [20], [21], Bayesian networks [3], [4], Markov random fields [5], [6], various classes of structured truncations [7], [8], [39]; see also Section 7 of [1].

The subcube conditioning model, introduced by [34], [35], [40], takes the other route of assuming stronger access to the distribution being tested. This model has received much attention in recent years [27], [36], [37], [41][44], and has also found applications beyond distribution testing to problems in learning theory [26], [41]. There has also been a nascent line of work on using the subcube conditioning model to make high-dimensional distribution testing practical [45], [46].

The works most relevant to our results are [20] and [27]. Rubinfeld and Servedio [20] establish an essentially tight bound of \(\wt{\Theta}(n)\) samples for the problem of testing uniformity of an unknown monotone distribution, whereas Charkabarty et al. [27] give \(\wt{\Theta}(n)\)-query upper and lower bounds for testing monotonicity of an unknown distribution in the subcube model. Both our results—for uniformity testing as well as unateness testing—rely on ingredients going into the analyses of [20], [27] respectively.

1.4 Discussion↩︎

Our results raise a number of intriguing questions for further study; we highlight two compelling directions below.

1.4.0.1 Lower Bounds for Unateness Testing with Subcube Queries.

Recall that [thm:subcube-lower-bound] gives a \(\wt{\Omega}(n^{2/3})\) query lower bound against algorithms that make \(O(1)\)-dimensional subcube queries. At present, all known lower-bounds in the subcube conditional model [27], [36], [41] construct hard instances that are product distributions, which are amenable to moment-matching techniques [27], [41]. However, since product distributions are automatically unate, none of these techniques can be lifted the unateness setting. Improving on [thm:subcube-lower-bound] is thus likely to lead to new insights and techniques for proving lower bounds in the subcube conditional model.

1.4.0.2 \(k\)-Monotone Distributions.

Finally, one can consider distributional analogues of other structural generalizations of monotonicity. A natural candidate is the class of \(k\)-monotone distributions, where the distribution’s mass function changes direction at most \(k\) times along any monotone path from \(-1^n\) to \(1^n\). The class of \(k\)-monotone functions has already been studied in the Boolean function setting [47][49], and \(k\)-monotone distributions could provide another structured setting for distribution testing beyond monotonicity.

2 Preliminaries↩︎

We use boldfaced letters such as (e.g. \(\bx \sim \bits^n\)) to denote random variables. Unless explicitly stated otherwise, all probabilities and expectations will be with respect to the uniform distribution. Throughout, we will write \(\calU_n\) for the uniform distribution over \(\bn\) and when the dimension \(n\) is clear from context we will simply write \(\calU\) instead.

For a distribution \(\calD\), it will be convenient to write \(\calD^{\otimes m}\) for the distribution of \(m\) independent draws from \(\calD\). We will use the following notation throughout:

Given a distribution \(\calD\) over \(\bn\) and \(\sigma \in \bn\), we write \(\calD^\sigma\) for the distribution over \(\bn\) where a draw \(\bx\sim\calD^\sigma\) is obtained by first drawing \(\by\sim\calD\) and then setting \(\bx_i \mathrel{\vcenter{:}}= \sigma_i\cdot\by_i\) for \(i\in[n]\).

2.1 The Berry–Esseen Theorem↩︎

We will write \(N(0, I_d)\) for the \(d\)-dimensional standard Gaussian distribution, where \(I_d\) denotes the \(d\times d\) identity matrix. We recall the (multi-dimensional) Berry–Esseen theorem (which will be used to prove 2):

Theorem 1 (Theorem 1.1 of [50]). Let \(\bX_1, \dots, \bX_m\) be i.i.d. random vectors in \(\R^d\) distributed as \(\bX\) where \(\E[\bX] = 0\) and \(\E[\bX\bX^\top] = I_d\). Then for any convex set \(A \sse \R^d\), we have \[\abs{\Prx\sbra{\frac{\sum_{i=1}^m \bX_i}{\sqrt{m}}\in A} - \Prx[\bG \in A]} \leq O(1)\cdot \frac{d^{1/4}}{\sqrt{m}}\cdot\Ex\sbra{\|\bX\|^3}\,.\] where \(\bG\sim N(0,I_d)\).

2.2 Distance Metrics Between Probability Distributions↩︎

We will identify a distribution \(\calD\) over a discrete domain \(\Omega\) with its density function \(\calD : \Omega \to [0,1]\). Recall that for two distributions \(\calD_1\), \(\calD_2\) over a discrete domain \(\Omega\), the total variation (or statistical) distance between \(\calD_1\) and \(\calD_2\) is \[\mathrm{d}_{\mathrm{TV}}(\calD_1,\calD_2) = \frac{1}{2}\sum_{x\in\Omega} \abs{\calD_1(x) - \calD_2(x)}\,.\] We will frequently make use of the fact that total variation distance is invariant under bijections.

We also recall the Kullback–Leibler (KL) and \(\chi^2\)-divergences: \[\mathrm{d}_{\mathrm{KL}}(\calD_1,\calD_2) = \sum_{x\in\Omega} \calD_1(x)\log\frac{\calD_1(x)}{\calD_2(x)} \qquad\text{and}\qquad \mathrm{d}_{\mathrm{\chi^2}}(\calD_1,\calD_2) = \sum_{x\in\Omega} \frac{\pbra{\calD_1(x) - \calD_2(x)}^2}{\calD_2(x)}\] respectively. The following relationships are standard: \[\label{eq:distance-relationships} \mathrm{d}_{\mathrm{TV}}(\calD_1, \calD_2) \leq \sqrt{\frac{1}{2}\mathrm{d}_{\mathrm{KL}}(\calD_1,\calD_2)} \leq \sqrt{\frac{1}{2}\log\pbra{1 + \mathrm{d}_{\mathrm{\chi^2}}(\calD_1,\calD_2)}}\,.\tag{1}\]

We will use the following version of the data processing inequality:

Let \(\bX_1\), \(\bX_2\) be random variables over the same domain. For any (possibly randomized) algorithm \(\calA\), we have \(\mathrm{d}_{\mathrm{TV}}\pbra{\calA(\bX_1), \calA(\bX_2)} \leq \mathrm{d}_{\mathrm{TV}}(\bX_1, \bX_2)\).

3 Testing Uniformity of Unate Distributions↩︎

We will prove [thm:our-unif-test,thm:our-unif-lb] in this section, starting with the former.

3.1 Upper Bound↩︎

We first recall the principal technical lemma of [20]’s uniformity tester for monotone distributions:

Lemma 1 (Corollary 6 of [20]). If \(\calD\) is a monotone distribution over \(\bn\) that is \(\eps\)-far from uniform, then \[\Ex_{\bx\sim\calD}\sbra{\sumi \bx_i} \geq \eps\,.\]

We now turn to our uniformity tester for unate distributions. First, note that if \(\calD\) is a unate distribution, then there exists some \(\sigma^\ast \in \bn\) such that \(\calD^{\sigma^\ast}\) is a monotone distribution. In particular, note that we may take \(\sigma^\ast_i = \sign(\Ex_{\bx \sim \calD}[\bx_i])\). This suggests a natural algorithm: estimate \(\sigma^\ast\) by drawing \(m\) samples \(\x{1}, \x{2}, \ldots, \x{m}\) from \(\calD\) and setting \[{\boldsymbol{\sigma}}_i := \sign\pbra{\sum_{j=1}^m \x{j}_i}\,,\] and then run the [20] uniformity tester on the monotone distribution \(\calD^{{\boldsymbol{\sigma}}}\). Indeed, since \[\mathrm{d}_{\mathrm{TV}}(\calD^{{\boldsymbol{\sigma}}}, \calU) = \mathrm{d}_{\mathrm{TV}}(\calD^{{\boldsymbol{\sigma}}}, \calU^{\boldsymbol{\sigma}}) = \mathrm{d}_{\mathrm{TV}}(\calD, \calU),\] replacing \(\calD\) with \(\calD^{\boldsymbol{\sigma}}\) preserves the uniformity (or distance from uniformity) of the distribution.

However, learning the whole sign vector \(\sigma^\ast\) can be too expensive. In particular, while 1 ensures that \(\sumi \Ex[\bx_i]\) is large, it gives no guarantee on the magnitude of each individual \(\Ex[\bx_i]\). In particular, note that distinguishing \(\Ex[\bx_i]=0\) (which corresponds to the uniform distribution) from \(\Ex[\bx_i]=\pm\Theta(1/n)\) requires \(\Theta(n^2)\) samples per coordinate by standard Chernoff lower bounds. We bypass this obstacle by not insisting on the exact orientation and instead weakly learning the sign vector \(\sigma^\ast\).

3.1.1 Warm-Up: A Sub-Quadratic Tester in a Special Case↩︎

As a warm-up, we show how to obtain a sub-quadratic tester in the hard instance just described above, where naively learning \(\sigma^\ast\) requires \(\Omega(n^2)\) queries. It will be convenient to write \[\mu_i \mathrel{\vcenter{:}}= \Ex_{\bx\sim\calD}[\bx_i]\,.\] We make one simplifying assumption for now: \(\mu_i = \frac{1}{n}\) holds for every \(i \in [n]\), i.e., the unate distribution \(\calD\) is in fact monotone, and each coordinate has the same bias of \(\Theta(1/n)\) towards \(+1\).

Let \(p > 0\) be a parameter that we will set later. By the assumption that \(\mu_i = \frac{1}{n}\), it can be verified that \(m = \Theta(n^2p^2)\) samples suffice for the “orientation step” to produce random signs \(\boldsymbol{\sigma}_1, \dots, \boldsymbol{\sigma}_n \in \bits\) with the promise that \[\Ex[\boldsymbol{\sigma}_i] \geq p~\text{for all}~i\in[n]\,.\] Equivalently, we correctly deduce that \(\sigma^*_i = +1\) with probability \(1/2 + \Omega(p)\), which is slightly better than a random guess.

Writing \(\bX \mathrel{\vcenter{:}}= \frac{1}{n} \sumi \boldsymbol{\sigma}_i \in [-1,1]\), note that \(\E[\bX] \geq p\). Applying Markov’s inequality to the non-negative random variable \(1-\bX\) gives \[\Prx\sbra{\bX \leq \frac{p}{2}} = \Pr\sbra{1 - \bX \geq 1-\frac{p}{2}} \leq \frac{\Ex\sbra{1-\bX}}{1-\frac{p}{2}} \leq \frac{1-p}{1-\frac{p}{2}} \leq 1-\Omega(p)\,.\]

In other words, the event \(\frac{1}{n} \sumi \boldsymbol{\sigma}_i \geq \frac{p}{2}\) holds with probability \(\Omega(p)\). Repeating this “orientation step” independently \(O(1/p)\) times ensures that with constant probability, at least one draw satisfies \(\bX \geq p/2\). Then, we note that, conditioning on the realization of \(\boldsymbol{\sigma}\in \bits^n\), the \(\boldsymbol{\sigma}\)-weighted Hamming weight \(\sum_{i=1}^{n}\boldsymbol{\sigma}_i\bx_i\) for \(\bx \sim \calD\) has an expectation of exactly \[\sum_{i=1}^{n}\boldsymbol{\sigma}_i \cdot \Ex_{\bx \sim \calD}\left[\bx_i\right] = \sum_{i=1}^{n}\boldsymbol{\sigma}_i \cdot \mu_i = \frac{1}{n}\sum_{i=1}^{n}\boldsymbol{\sigma}_i.\] Therefore, by estimating \(\frac{1}{n}\sum_{i=1}^{n}\boldsymbol{\sigma}_i\) to an additive error of \(O(p)\) using \(\widetilde{O}(n/p^2)\) additional samples, we obtain a tester with sample complexity (modulo polylogarithmic factors) \[\label{eq:stitch} \frac{1}{p}\cdot n^2p^2 + \frac{n}{p^2}.\tag{2}\] Setting \(p = n^{-1/3}\) gives a sample complexity of \(\widetilde{O}(n^{5/3})\), which already improves upon the easy \(\widetilde{O}(n^2)\) bound (cf. 1.1).

3.1.2 Main Technical Lemma↩︎

Recall from the warm-up that the sign estimates \(\boldsymbol{\sigma}_1, \boldsymbol{\sigma}_2, \ldots, \boldsymbol{\sigma}_n\) satisfy \(\Ex_{}\left[\boldsymbol{\sigma}_i\right] \ge p\), which implies \[\Prx_{\boldsymbol{\sigma}}\sbra{\frac{1}{n}\sum_{i=1}^{n}\boldsymbol{\sigma}_i \ge \Omega(p)} \ge \Omega(p)\,.\] Now, note that if we were able to replace the R.H.S. above with \(\Omega(1)\) instead of \(\Omega(p)\), then this stronger lower bound would imply that \(O(1)\) independent sign estimates would suffice for “catching” the \(\Omega(p)\) bias. Then, the sample complexity (up to polylogarithmic factors) would be (cf. 2 ), which reduces to if we set \(p = n^{-1/4}\).

We first note that the property \(\Ex_{}\left[\boldsymbol{\sigma}_i\right] \ge p\) alone does not imply the desired high-probability bound, namely, \[\Pr_{}\left[\frac{1}{n}\sum_{i=1}^{n}\boldsymbol{\sigma}_i \ge \Omega(p)\right] \ge \Omega(1).\] Suppose for the sake of simplicity that \(n\) is even, and imagine that \(\boldsymbol{\sigma}\in \{\pm 1\}^n\) is drawn from the following distribution:

  • With probability \(p\), \(\boldsymbol{\sigma}= (+1, +1, \ldots, +1)\).

  • With the remaining probability \(1 - p\), \(\boldsymbol{\sigma}\) is chosen as a uniformly random permutation of \(n/2\) copies of \(+1\) and \(n/2\) copies of \(-1\).

It can be easily verified that the above distribution satisfies \(\Ex_{}\left[\boldsymbol{\sigma}_i\right] = p\), yet \(\frac{1}{n}\sum_{i=1}^{n}\boldsymbol{\sigma}_i > 0\) only holds with probability \(p\).

Therefore, the crux is to show that the \(\boldsymbol{\sigma}_i\)’s cannot be too correlated (as in the example above). Concretely, proving the following will suffice for our purposes:

Lemma 2. Suppose \(\calD\) is a unate distribution on \(\bn\). Suppose \(\x{1}, \dots \x{m} \sim \calD\) and let \[\boldsymbol{\sigma}_i := \sign\pbra{\sum_{j=1}^m \x{j}_i}\,.\] For any \(1 \leq i < j \leq n\), it holds that \[|\Cov[\boldsymbol{\sigma}_i, \boldsymbol{\sigma}_j]| = O\pbra{\frac{1}{\sqrt{m}}}\,.\]

It is readily verified that 2 fails for non-unate distributions: consider, for example, the two-point distribution \(\calD(+1^n) = \calD(-1^n) = 0.5\). We defer the proof of 2 to 3.1.4, and first show why it implies the correctness of 1.

3.1.3 Proof of [thm:our-unif-test]↩︎

We will require the following lemma due to Qiao and Valiant [51]:

Lemma 3 (Lemma B.2 of [51]). Suppose \(k \in \N\) and \(\delta \in (0, 1/15\sqrt{k})\). Let \(P\) and \(Q\) be two distributions on the same support with \(\mathrm{d}_{\mathrm{TV}}(P, Q) \geq \delta\). Then \[\mathrm{d}_{\mathrm{TV}}(P^{\otimes k}, Q^{\otimes k}) \geq \frac{\delta\sqrt{k}}{15}\,.\]

Figure 1: The \texttt{Unate-Uniformity} algorithm.

[thm:our-unif-test] Note that the sample complexity and runtime are evident from 1. Next, note that if \(\calD = \calU\), then \(\calD^\sigma = \calU\) for every \(\sigma \in \bn\). It now follows from Theorem 4 of [20] that Unate-Uniformity will output “accept” with probability at least \(9/10\). In particular, note that in this case, Steps 1(c) through 1(f) of Unate-Uniformity are identical to the TestUniform algorithm of [20] run on \(\calU\).

We now show how 2 implies the soundness of \(\texttt{Unate-Uniformity}\). Suppose that the unate distribution \(\calD\) is \(\eps\)-far from uniform. As before, we write \[\mu_i \mathrel{\vcenter{:}}= \Ex_{\bx\sim\calD}\sbra{\bx_i}\,.\] Since \(\calD\) is unate, it follows that there exists some \(\sigma^\ast \in \bits^n\) such that \(\calD^{\sigma^\ast}\) is monotone. In particular, we can take \(\sigma^\ast_i = \sign(\mu_i)\), and so we have \(\sigma_i^\ast \mu_i = |\mu_i| \geq 0\). Since the TV distance is preserved under bijections, \(\calD^{\sigma^\ast}\) is also \(\eps\)-far from uniform. Applying 1 to \(\calD^{\sigma^\ast}\) gives \[\|\mu\|_1 = \sumi \sigma^\ast_i \mu_i = \Ex_{\bx \sim \calD^{\sigma^\ast}}\left[\sum_{i=1}^{n}\bx_i\right] \geq \eps\,.\]

Recall that we use a sample of size \(m_1 = \Theta(n^{3/2}/\eps^2)\) in Step 1(a) and 1(b) to compute \(\boldsymbol{\sigma}_1, \ldots, \boldsymbol{\sigma}_n \in \{\pm 1\}\). Set a threshold \(\theta = \frac{\eps}{100n}\). For every \(i \in [n]\) that satisfies \(|\mu_i| \geq \theta\), we will now show that \[\label{eq:neyman-pearson} \Ex_{}\left[\sigma^\ast_i\boldsymbol{\sigma}_i\right] \ge \Omega\pbra{\frac{\eps}{n}\cdot \frac{n^{3/4}}{\eps}} = \Omega(n^{-1/4})\,,\tag{3}\] using 3. In more detail, let \(P\) be the distribution of \(\sigma_i^\ast \bx_i\) for \(\bx \sim \calD\) and \(Q\) be \(-P\), i.e. \(\by\sim Q\) is obtained by drawing \(\by'\sim P\) and setting \(\by = -\by'\). Note that \[\Prx_{\by \sim \calP}[\by = +1] = \frac{1+|\mu_i|}{2} \qquad\text{and}\qquad \Prx_{\by \sim \calP}[\by = -1] = \frac{1-|\mu_i|}{2}\,,\] with swapped probabilities for \(Q\). It follows that \(\mathrm{d}_{\mathrm{TV}}(P,Q) = \abs{\mu_i} \geq \frac{\eps}{100n}\); note also that \[\frac{\eps}{100n} \leq \frac{1}{15\sqrt{m_1}}\] for appropriate choice of hidden constant in \(m_1\). In particular, applying 3 gives \[\mathrm{d}_{\mathrm{TV}}(P^{\otimes m_1}, Q^{\otimes m_1}) \geq \Omega\pbra{\frac{\eps}{n}\cdot \frac{n^{3/4}}{\eps}} = \Omega(n^{-1/4})\,.\] In order to establish 3 , it suffices to show that \(\mathrm{d}_{\mathrm{TV}}(P^{\otimes m_1}, Q^{\otimes m_1}) = \Theta(1)\cdot\Ex[\sigma_i^\ast\boldsymbol{\sigma}_i]\). Since \(P\) and \(Q\) are Bernoulli random variables, their likelihood ratio is monotone in the number of successes (i.e., \(+1\) draws), and so by the Neyman–Pearson lemma, the TV-distance maximizing set is \(\{\sum_\ell \by^{(\ell)} \geq 0\}\). We may assume that \(m_1\) is odd (to avoid handling ties), and so we get \[\begin{align} \mathrm{d}_{\mathrm{TV}}(P^{\otimes m_1}, Q^{\otimes m_1}) &= P^{\otimes m_1}\pbra{\sum_{\ell=1}^{m_1} \by^{(\ell)} \geq 0} - Q^{\otimes m_1}\pbra{\sum_{\ell=1}^{m_1} \by^{(\ell)} \geq 0} \nonumber \\ &=P^{\otimes m_1}\pbra{\sum_{\ell=1}^{m_1} \by^{(\ell)} \geq 0} - P^{\otimes m_1}\pbra{\sum_{\ell=1}^{m_1} \by^{(\ell)} < 0} \label{eq:dunkin}\\ &= \Ex[\sigma^\ast_i\boldsymbol{\sigma}_i]\,, \nonumber \end{align}\tag{4}\] from which 3 follows readily. Note that 4 relies on the fact that \(P = -Q\). Finally, note also that the same argument shows that \(\Ex_{}\left[\sigma^\ast_i\boldsymbol{\sigma}_i\right] \ge 0\) for every \(i \in [n]\), even if \(|\mu_i| < \theta\).

Let \(\bX \mathrel{\vcenter{:}}= \sum_{i=1}^{n}\mu_i \cdot \boldsymbol{\sigma}_i = \sum_{i=1}^{n}|\mu_i| \cdot (\sigma^\ast_i\boldsymbol{\sigma}_i)\). We have \[\Ex_{}\left[\bX\right] \ge \sum_{i \in [n]: |\mu_i| \ge \theta}|\mu_i| \cdot \Ex_{}\left[\sigma^\ast_i\boldsymbol{\sigma}_i\right] \ge \Omega(n^{-1/4}) \cdot \sum_{i \in [n]: |\mu_i| \ge \theta}|\mu_i| = \Omega(n^{-1/4} \cdot \|\mu\|_1).\] The first step above holds since both \(|\mu_i|\) and \(\Ex_{}\left[\sigma^\ast_i\boldsymbol{\sigma}_i\right]\) are non-negative for every \(i \in [n]\). The second step applies \(|\mu_i| \ge \theta \implies \Ex_{}\left[\sigma^\ast_i\boldsymbol{\sigma}_i\right] \ge \Omega(n^{-1/4})\). The third step holds since our choice of \(\theta = \frac{\eps}{100n}\) and the fact \(\|\mu\|_1 \ge \eps\) together imply \[\sum_{i \in [n]: |\mu_i| \ge \theta}|\mu_i| \ge \sum_{i=1}^{n}|\mu_i| - n \cdot \theta = \|\mu\|_1 - \frac{\eps}{100} \ge \Omega(\|\mu\|_1).\]

It remains to show that \[\Var[\bX] \le O(n^{-1/2} \cdot \|\mu\|_1^2).\] By Chebyshev’s inequality, the variance bound above would imply that, with probability \(\Omega(1)\), \[\bX \ge \Ex_{}\left[\bX\right] - O(\sqrt{\Var[\bX]}) \ge \Omega(n^{-1/4} \cdot \|\mu\|_1) \ge \Omega(\eps / n^{1/4}),\] where the second step applies the following observations:

  • \(\Ex_{}\left[\bX\right] \ge \Omega(n^{-1/4} \cdot \|\mu\|_1)\), where the hidden constant in \(\Omega(\cdot)\) is lower bounded by a universal constant when \(m_1 = \Theta(n^{3/2}/\eps^2)\) is sufficiently large.

  • We will show that \(\Var[\bX] \le O(n^{-1/2} \cdot \|\mu\|_1^2)\), where the hidden constant in \(O(\cdot)\) goes to zero as the hidden constant in \(m_1 = \Theta(n^{3/2}/\eps^2)\) increases.

  • Therefore, for some careful choice of \(m_1\) in the algorithm, the difference \(\Ex_{}\left[\bX\right] - O(\sqrt{\Var[\bX]})\) is positive and on the order of \(\Omega(n^{-1/4} \cdot \|\mu\|_1)\).

By a Chernoff bound, we can then catch this \(\Omega(\eps / n^{1/4})\) bias using \(\widetilde{O}\left(\frac{n}{(\eps / n^{1/4})^2}\right) = \widetilde{O}(n^{3/2} / \eps^2)\) additional samples in Step 1(f) of the algorithm. By 2, we have \[\Var[\bX] = \sum_{i=1}^{n}\mu_i^2\Var[\boldsymbol{\sigma}_i] + 2\sum_{1 \le i < j \le n}\mu_i\mu_j\Cov[\boldsymbol{\sigma}_i, \boldsymbol{\sigma}_j] \le \sum_{i=1}^{n}\mu_i^2\Var[\boldsymbol{\sigma}_i] + O(n^{-1/2})\cdot \|\mu\|_1^2.\] The second term above is exactly the desired upper bound. For the first term, we note that \[\Var[\boldsymbol{\sigma}_i] = e^{-\Omega(m_1\mu_i^2)},\] so each term \(\mu_i^2\Var[\sigma_i]\) is at most \(O(1/m_1)\). Recalling \(m_1 = \Theta(n^{3/2} / \eps^2)\) and \(\|\mu\|_1 \ge \eps\), we conclude that \[\sum_{i=1}^{n}\mu_i^2\Var[\boldsymbol{\sigma}_i] \le O(n/m_1) = O(\eps^2 / \sqrt{n}) \le O(n^{-1/2} \cdot \|\mu\|_1^2),\] which proves the desired variance bound \(\Var[\bX] \le O(n^{-1/2} \cdot \|\mu\|_1^2)\) and completes the proof.

3.1.4 Proof of 2↩︎

Without loss of generality, we prove the lemma when the unate distribution \(\calD\) is monotone; the more general statement then follows from the observation that flipping the \(i^\text{th}\) coordinate of \(\calD\) leads to a flip in the distribution of \(\boldsymbol{\sigma}_i\), which preserves the magnitude of the covariances.

For \(i \in [n]\), we define \[\bS_i := \sum_{\ell=1}^m \x{\ell}_i \qquad\text{and}\qquad \mu_i := \Ex_{\bx\sim\calD}\sbra{\bx_i}\,.\] In particular, we have \(\boldsymbol{\sigma}_i = \sign(\bS_i) = 2\cdot \mathbf{1}\cbra{\bS_i\geq 0} - 1\), and so \[\label{eq:cov-in-terms-of-big-sig} \Cov[\boldsymbol{\sigma}_i,\boldsymbol{\sigma}_j] = 4\pbra{\Pr[\bS_i \geq 0,\bS_j \geq 0] - \Pr[\bS_i \geq 0]\Pr[\bS_j \geq 0] }\,.\tag{5}\]

We will prove 2 with \(i = 1\) and \(j = 2\); that is, we will show that \[\Cov[\boldsymbol{\sigma}_1, \boldsymbol{\sigma}_2] = O\pbra{\frac{1}{\sqrt{m}}}\,.\] Define \[\begin{align} p_{00} := \Prx_{\bx\sim\calD}\sbra{(\bx_1,\bx_2) = (-1,-1)}\,, \qquad&\qquad p_{10} := \Prx_{\bx\sim\calD}\sbra{(\bx_1,\bx_2) = (+1,-1)}\,, \\ p_{01} := \Prx_{\bx\sim\calD}\sbra{(\bx_1,\bx_2) = (-1,+1)}\,, \qquad&\qquad p_{11} := \Prx_{\bx\sim\calD}\sbra{(\bx_1,\bx_2) = (+1,+1)}\,. \end{align}\] Thanks to monotonicity of \(\calD\), we have \(p_{00} \leq p_{10} \leq p_{11}\) and \(p_{00}\leq p_{01} \leq p_{11}\). It also follows that \(\mu_1 = 1 - 2(p_{00} + p_{01}) \geq 0\) and \(\mu_2 = 1 - 2(p_{00} + p_{10}) \geq 0\). The proof considers two cases depending on the value of \(\mu_1 + \mu_2\):

Case 1: \(\mu_1 + \mu_2 > 1/2\)↩︎

We record the following easy bound on \(\Cov[\boldsymbol{\sigma}_1, \boldsymbol{\sigma}_2]\): \[\label{eq:easy-cov-ub} \abs{\Cov[\boldsymbol{\sigma}_1,\boldsymbol{\sigma}_2]} \leq 4\min\cbra{\Pr\sbra{\bS_1 < 0}, \Pr\sbra{\bS_2 < 0}}\,.\tag{6}\] Assuming 6 , a direct application of the Hoeffding bound gives \[\Pr[\bS_i <0] \leq e^{-m\mu_i^2/2}\,, \qquad\text{and so}\qquad |\Cov(s_1, s_2)|\leq 4e^{-m/32}\ll O\pbra{\frac{1}{\sqrt{m}}}\,,\] where we make use of the fact that \(\min\{\mu_1, \mu_2\} \geq 1/4\) by the assumption \(\mu_1 + \mu_2 > 1/2\).

We now justify 6 . It will be convenient to write \[A := \Pr[\bS_1\geq 0, \bS_2\geq0]\,, \qquad B := \Pr[\bS_1\geq0]\,, \qquad\text{and}\qquad C=\Pr[\bS_2\geq0]\,.\] Note that \(\E[\boldsymbol{\sigma}_1] = 2B - 1\) and \(\E[\boldsymbol{\sigma}_2] = 2C-1\). Writing \(D := 1 + A - B - C\), it is readily checked that \(D = \Pr[\bS_1 < 0, \bS_2 < 0]\). It follows from 5 that \(\Cov[\boldsymbol{\sigma}_1,\boldsymbol{\sigma}_2] = 4(A-BC)\). In particular, we have \[\frac{1}{4}\abs{\Cov[\boldsymbol{\sigma}_1,\boldsymbol{\sigma}_2]} = \abs{A - BC}\,.\] Now,

  • If \(A \geq BC\), then \(A-BC \leq C(1 - B) \leq 1-B\).

  • If \(A < BC\), then \(BC - A \leq C-(B+C-1) = 1-B\), since \(D \geq 0\) gives \(A \geq B+C -1\).

It follows that \(|\Cov[\boldsymbol{\sigma}_1,\boldsymbol{\sigma}_2]| \leq 4(1-B) = 4\Pr[\bS_1 < 0]\). By symmetry, the same holds with \(B\) and \(C\) swapped, which yields 6 .

Case 2: \(\mu_1 + \mu_2 \leq 1/2\)↩︎

In this case, we will control \(\Cov(\boldsymbol{\sigma}_1,\boldsymbol{\sigma}_2)\) via a Gaussian approximation to the sums \(\bS_1\) and \(\bS_2\). First, let \(\kappa := \Cov[\bx_1,\bx_2]\) for \(\bx\sim\calD\). Note that \(\kappa = p_{00} + p_{11} - p_{01} - p_{10} - \mu_1\mu_2\).

We will first control the covariance of the Gaussian approximation. Consider the standardized random vector \[\bT = (\bT_1, \bT_2) := \frac{1}{\sqrt{m}}(\bS_1 - m\mu_1, \bS_2 - m\mu_2)\, \qquad\text{and let}\qquad \Sigma:=\begin{pmatrix} \lambda_1^2 & \kappa \\[2pt] \kappa & \lambda_2^2\end{pmatrix}\] where \(\lambda_i^2 = 1 - \mu_i^2\). We will sometimes write \(\mu = (\mu_1, \mu_2)\). Finally, let \(\rho\) be the correlation between \(\bT_1\) and \(\bT_2\), that is, \[\rho := \frac{\kappa}{\lambda_1\lambda_2}\,.\]

Note that by the central limit theorem, \(\bT \to N(0, \Sigma)\) (in distribution) as \(m \to \infty\). Following 5 , the Gaussian approximation of the correlation is \[\Cov_{\approx} := 4\Bigl(\Pr\big[\bZ_1\geq -\sqrt{m}\mu_1,\bZ_2\geq-\sqrt{m}\mu_1\big]-\Pr\big[\bZ_1\geq-\sqrt{m}\mu_1\big]\Pr\big[\bZ_2\geq-\sqrt{m}\mu_2\big]\Bigr).\] Note that \(\Cov_{\approx} = \Cov[\boldsymbol{\tau}_1,\boldsymbol{\tau}_2]\) where \(\boldsymbol{\tau}_i = \sign(\bZ_i - \sqrt{m}\mu_i)\). Next, we will show that \(\Cov_{\approx} = O(m^{-1/2})\) via known estimates for computing bi-variate normal probabilities. In particular, applying Equation 3.6 of [52] gives \[\begin{align} |\Cov_{\approx}| &= 4\left|\frac{1}{2\pi}\int_0^\rho \frac{1}{\sqrt{1-z^2}}\exp\Bigl(-\frac{1}{2}\frac{(\sqrt{m}\tfrac{\mu_1}{\lambda_1})^2+(\sqrt{m}\tfrac{\mu_2}{\lambda_2})^2-2(\sqrt{m}\tfrac{\mu_1}{\lambda_1})(\sqrt{m}\tfrac{\mu_2}{\lambda_2})z}{1-z^2}\Bigr) \, dz\right| \nonumber \\ &\leq \frac{2}{\pi}\int_0^{|\rho|} \frac{1}{\sqrt{1-z^2}}\exp\Bigl(-\frac{m}{2}\left(\frac{(\tfrac{\mu_1}{\lambda_1}-\tfrac{\mu_2}{\lambda_2})^2}{1-z^2}+\frac{2\tfrac{\mu_1}{\lambda_1}\tfrac{\mu_2}{\lambda_2}}{1+z}\right)\Bigr) \, dz \tag{7} \\ &\leq \frac{2}{\pi}\int_0^{|\rho|} \frac{1}{\sqrt{1-z^2}}\exp\Bigl(-\frac{m}{8}(\tfrac{\mu_1}{\lambda_1}+\tfrac{\mu_2}{\lambda_2})^2\Bigr) \, dz \tag{8} \\ &\leq \frac{2}{\pi}\sin^{-1}|\rho|\exp\Bigl(-\frac{m}{8}(\mu_1+\mu_2)^2\Bigr) \nonumber \\ &\leq |\rho|\exp\Bigl(-\frac{m}{8}(\mu_1+\mu_2)^2\Bigr)\,, \tag{9} \end{align}\] where 7 relies on the fact that the integrand is larger on the positive \(z\) side, 8 uses \[\frac{(\tfrac{\mu_1}{\lambda_1}-\tfrac{\mu_2}{\lambda_2})^2}{1-z^2}+\frac{2\tfrac{\mu_1}{\lambda_1}\tfrac{\mu_2}{\lambda_2}}{1+z} \geq (\tfrac{\mu_1}{\lambda_1}-\tfrac{\mu_2}{\lambda_2})^2+\tfrac{\mu_1}{\lambda_1}\tfrac{\mu_2}{\lambda_2} = \frac{1}{4}(\tfrac{\mu_1}{\lambda_1}+\tfrac{\mu_2}{\lambda_2})^2+\frac{3}{4}(\tfrac{\mu_1}{\lambda_1}-\tfrac{\mu_2}{\lambda_2})^2\,,\] and 9 relies on \(\lambda_i\leq 1\) and \(\sin^{-1}(\theta) \leq \frac{\pi\theta}{2}\) for \(\theta\geq 0\).

We record the following lemma:

Lemma 4. For monotone distributions, if \(\mu_1+\mu_2 \leq \frac{1}{2}\), then \(|\rho|\leq \mu_1+\mu_2\).

Proof. Parametrize the probabilities of the monotone distribution as \[p_{00} = a, \quad p_{01}=a+b, \quad p_{10}=a+c, \quad p_{11}=a+d.\] Then \(\mu_1 = d+c-b\), \(\mu_2 = d+b-c\), so \(\mu_1+\mu_2 = 2d\) implies \(d\leq \tfrac14\). Now \[\begin{align} |\rho| &= \frac{|(d-b-c)-(d+c-b)(d+b-c)|}{\sqrt{(1-\mu_1^2)(1-\mu_2^2)}} \nonumber\\ &\leq \frac{2}{\sqrt{3}}\left|(d-b-c)+((b-c)^2-d^2)\right| \tag{10} \\ &\leq \frac{2}{\sqrt{3}}(d+d^2) \tag{11} \\ &=2d\cdot \frac{1+d}{\sqrt{3}} \leq 2d = \mu_1+\mu_2 \nonumber \end{align}\] where in 10 we use that \((1-\mu_1^2)(1-\mu_2^2) \geq \frac{3}{4}\), and in 11 we note that \(|d-b-c|\leq d\) and \(|b-c|\leq d\). ◻

Combining 9 with 4, we get \[\label{eq:senior-fitness} |\Cov_{\approx}| \leq (\mu_1+\mu_2) \exp\Bigl(-\frac{m}{8}(\mu_1+\mu_2)^2\Bigr) = O\pbra{\frac{1}{\sqrt{m}}}\,.\tag{12}\]

Next, we will control the error in the Gaussian approximation to \(\Cov[\boldsymbol{\sigma}_1,\boldsymbol{\sigma}_2]\) itself by applying the multivariate Berry-Eseeen central limit theorem (cf. 1). It is readily verified using 5 and the triangle inequality that \[\frac{1}{4}\pbra{\Cov[\boldsymbol{\sigma}_1,\boldsymbol{\sigma}_2] - \Cov_{\approx}} \leq \sum_{i=1}^3 |\alpha_i - \beta_i|\] where \[\begin{gather} \alpha_1 = \Prx[\bS_1 \geq 0, \bS_2 \geq 0]\,,\quad \alpha_2 = \Pr[\bS_1 \geq 0]\,,\quad \alpha_3 = \Pr[\bS_2 \geq 0]\,,\\[0.5em] \beta_1 = \Pr\sbra{\bZ_1 \geq -\sqrt{m}\mu_1, \bZ_2 \geq -\sqrt{m}\mu_2}\,,\quad \beta_2 = \Pr\sbra{\bZ_1 \geq -\sqrt{m}\mu_1}\,, \quad \beta_3 = \Pr\sbra{\bZ_2 \geq -\sqrt{m}\mu_2}\,. \end{gather}\] 1 combined with the fact that both \(\mu_1, \mu_2 \leq 1/2\) immediately gives \(|\alpha_2-\beta_2|\), \(|\alpha_3-\beta_3| = O(m^{-1/2})\). In more detail, 1 gives \[|\alpha_2-\beta_2| = O\left(\frac{1}{\sqrt{m}}\cdot\frac{[|\bS_1-\mu_1|^3]}{\Ex[(\bS_1-\mu_1)^2]^{3/2}}\right) = O\left(\frac{1}{\sqrt{m}}\cdot\frac{(1+\mu_1)^3]}{(1-\mu_1^2)^{3/2}}\right) \leq O\pbra{\frac{1}{\sqrt{m}}}\,.\] An identical argument gives the same bound for \(|\alpha_3-\beta_3|\). Finally, in order to show that \(|\alpha_1-\beta_1| = O(m^{-1/2})\) using 1, it suffices to establish that \(\E[\|\Sigma^{-1/2}(\bS-\mu)\|_2^3] = O(1)\), where \(\bS = (\bS_1, \bS_2)\). To see this, first note that \[\Sigma^{-1/2} = \frac{1}{2}\begin{bmatrix} \alpha & \beta \\ \beta & \alpha \end{bmatrix}\begin{bmatrix} \lambda_1 & 0 \\ 0 & \lambda_2 \end{bmatrix}^{-1}\] where \(\alpha = \frac{1}{\sqrt{1+\rho}}+\frac{1}{\sqrt{1-\rho}}\) and \(\beta = \frac{1}{\sqrt{1+\rho}}-\frac{1}{\sqrt{1-\rho}}\). Now, \[\begin{align} \|\Sigma^{-1/2}(\bS-\mu)\|_2^2 &= \frac{1}{4}\left((\alpha\lambda_1^{-1}(\bS_1-\mu_1)+\beta\lambda_2^{-1}(\bS_2-\mu_2))^2+(\beta\lambda_1^{-1}(\bS_1-\mu_1)+\alpha\lambda_2^{-1}(\bS_2-\mu_2))^2\right) \nonumber\\ &= \frac{1}{1-\rho^2}\left(\lambda_1^{-2}(\bS_1-\mu_1)^2+\lambda_2^{-2}(\bS_2-\mu_2)^2-\rho\lambda_1^{-1}\lambda_2^{-1}(\bS_1-\mu_1)(\bS_2-\mu_2)\right) \tag{13} \\ &\leq \frac{4}{1-\rho^2}\left(\lambda_1^{-2}+\lambda_2^{-2}+\rho\lambda_1^{-1}\lambda_2^{-1}\right) \tag{14} \\ &= 4\cdot\frac{2-(\mu_1^2+\mu_2^2)+\kappa}{(1-\mu_1^2)(1-\mu_2^2)-\kappa^2} \nonumber \\ &\leq 4\cdot \frac{2-\frac{1}{2}+\frac{1}{4}}{\frac{3}{4}-\left(\frac{4}{9}\right)^2} < 16 \tag{15}, \end{align}\] where in 13 we note that \(\alpha^2+\beta^2 = \frac{4}{1-\rho^2}\) and \(2\alpha\beta = -\frac{4\rho}{1-\rho^2}\), in 14 we use \(|X_i-\mu_i|\leq 2\), and in 15 we recall \((1-\mu_1^2)(1-\mu_2^2) \geq \frac{3}{4}\) and \(-\tfrac{4}{9} \leq \kappa \leq \tfrac{1}{4}\). The result follows immediately. 0◻

3.2 Lower Bound↩︎

Turning to lower bounds for uniformity testing of unate distribution, we will establish the following:

In particular, [thm:our-unif-lb] implies that the algorithm from 3.1 has essentially optimal sample complexity. Our proof of [thm:our-unif-lb] will rely on a slight modification of the construction used by Rubinfeld and Servedio [20] to show a tight lower bound for uniformity testing of monotone distributions.

3.2.1 Useful Preliminaries↩︎

Throughout this section, we set a parameter \[\tau := \Theta\pbra{\frac{\log n}{n}}\,.\] We write \(\calD_\tau\) for the product distribution over \(\bn\) where each marginal is a \(\tau\)-biased bit. In other words, for \(x\in\bn\), we have \[\calD_\tau(x) = \pbra{\frac{1}{2} + \tau}^{\abs{\{i:x_i = +1\}}}\pbra{\frac{1}{2} - \tau}^{\abs{\{i:x_i = -1\}}}\,.\] Claim 11 of [20] gives the following representation of \(\calD_\tau\) which will be useful for our purposes: \[\label{eq:RS-subcube-decomp} \calD_\tau(x) = \sum_{i=0}^n \sum_{\substack{y \in \bn \\ |i : y_i = +1| = i}} (2\tau)^i(1-2\tau)^{n-i} \calU_y(x) =: \sum_{y \in \bn} p_y \calU_y(x)\,,\tag{16}\] where we write \(\calU_y\) for the uniform distribution on the monotone subcube rooted at \(y\), i.e., the uniform distribution on \(\{z \in \bn : z_i \geq y_i~\text{for all}~i\in[n] \}\).

Let \(T \in \N\) and suppose \(m \leq 0.1\sqrt{T}\). Let \(\bS_1\) be the random variable where a draw is obtained by making \(m\) independent draws from \(\calD_\tau\). We define a new random variable \(\bS_2\) on the same domain as \(\bS_1\), where a draw is obtained as follows:

  1. First, for \(\ell \in [T]\), independently draw \(\by^{(\ell)}\sim\bn\) with probability \(p_y\) (cf. 16 ).

  2. Define the distribution \(\bq\) over \(\bn\) as \[\bq(x) := \frac{1}{T}\sum_{\ell=1}^T \calU_{\by^{(\ell)}}(x)\,.\] Then, we make \(m\) independent draws from \(\bq\).

We then have \[\mathrm{d}_{\mathrm{TV}}(\bS_1, \bS_2) \leq \frac{1}{100}\,.\]

Note, in particular, that the value of \(T\) in [prop:RS-claim-7] is unconstrained. We will also require the following due to Rubinfeld and Servedio, which states that for \(T = n^3\), with high probability the distribution \(\bq\) constructed in [prop:RS-claim-7] is far from uniform:

Suppose \(T = n^3\), and let \(\bq\) be as in [prop:RS-claim-7]. Then with probability \(1-o(1)\) over the random choice of \(\bq\), we have \[\mathrm{d}_{\mathrm{TV}}(\bq, \calU) \geq 1 - \frac{1}{n^{9}}\,,\] where \(\calU\) denotes the uniform distribution over \(\bn\).

We note that Rubinfeld and Servedio [20] proved their Lemma 13 with \(T= n^2\), but we require a larger \(T\) for our result. The variant above readily follows from inspecting their proof and adjusting the constant hidden by \(\Theta(\cdot)\) in \(\tau\).

3.2.2 Proof of [thm:our-unif-lb]↩︎

Let \(T = n^3\), \(m = \Theta(n^{3/2}/\log^2(n))\), and let \(\calD_\tau\) be as in the previous section. (Note that \(m \leq 0.1\sqrt{T}\) for \(n\) large enough.) We will show that there exists a distribution \(\calF\) over unate distributions over \(\bn\) such that

  1. With probability \(1-o(1)\) over the draw of \(\bq'\sim\calF\), \(\mathrm{d}_{\mathrm{TV}}(\bq', \calU) \geq 1-n^{-9}\).

  2. The statistical distance between (a) the distribution of \(m\) independent samples from \(\calU\), and (b) the draw of \(m\) independent samples from \(\bq'\) where \(\bq' \sim\calF\), is at most \(0.2\).

Items 1 and 2 immediately imply that any algorithm with performance guarantee as in [thm:our-unif-test] must draw \(m = \Omega(n^{3/2})\) samples.

We now define the family \(\calF\) of hard distributions. A distribution \(\bq'\sim\calF\) is generated as follows:

  1. First generating \(\bq\) as in [prop:RS-claim-7] and drawing \(\boldsymbol{\sigma}\sim\bn\).

  2. Returning the distribution \(\bq' := \bq^{\boldsymbol{\sigma}}\) (cf. [notation:D-sigma]).

Note that since every \(\bq\) generated as in [prop:RS-claim-7] is monotone, it follows that every \(\bq' = \bq^{\boldsymbol{\sigma}}\) is a unate distribution. Item 1 follows immediately from [prop:RS-lemma-13]; all that remains is to establish Item 2 above.

It will be convenient to write \(\calD'\) for the distribution of \(m\) independent samples from \(\bq'\) after drawing \(\bq'\sim\calF\). For \(\boldsymbol{\sigma}\) as in Item (a) above, we have \[\begin{align} \mathrm{d}_{\mathrm{TV}}\pbra{\calD', \calU^{\otimes m}} &\leq \mathrm{d}_{\mathrm{TV}}\pbra{\calD', (\calD_\tau^{\boldsymbol{\sigma}})^{\otimes m}} + \mathrm{d}_{\mathrm{TV}}\pbra{(\calD_\tau^{\boldsymbol{\sigma}})^{\otimes m}, \calU^{\otimes m}}\\ &= \mathrm{d}_{\mathrm{TV}}\pbra{\bS_1, \bS_2} + \mathrm{d}_{\mathrm{TV}}\pbra{(\calD_\tau^{\boldsymbol{\sigma}})^{\otimes m}, \calU^{\otimes m}} \\ &\leq \frac{1}{100} + \mathrm{d}_{\mathrm{TV}}\pbra{(\calD_\tau^{\boldsymbol{\sigma}})^{\otimes m}, \calU^{\otimes m}}\,, } \end{align}\] where \(\bS_1, \bS_2\) are as in [prop:RS-claim-7]. Note that in the first item above, \((\calD_\tau^{\boldsymbol{\sigma}})^{\otimes m}\) refers to the distribution of \(m\) samples obtained by first drawing \(\boldsymbol{\sigma}\) and then drawing \(m\) independent samples from \(\calD_\tau^{\boldsymbol{\sigma}}\).

The remainder of the argument will establish \[\label{eq:unif-LB-final-goal} \mathrm{d}_{\mathrm{TV}}\pbra{(\calD_\tau^{\boldsymbol{\sigma}})^{\otimes m}, \calU^{\otimes m}} \leq 0.1\,,\tag{17}\] which will complete the proof of [thm:our-unif-lb]. Since each marginal is independent in both \(\calD_\tau^{\boldsymbol{\sigma}}\) and \(\calU\), it follows from additivity of the KL divergence that \[\begin{align} \mathrm{d}_{\mathrm{TV}}\pbra{(\calD_\tau^{\boldsymbol{\sigma}})^{\otimes m}, \calU^{\otimes m}} &\leq \sqrt{\frac{1}{2}\mathrm{d}_{\mathrm{KL}}\pbra{(\calD_\tau^{\boldsymbol{\sigma}})^{\otimes m}, \calU^{\otimes m}}} } \\ &= \sqrt{\frac{1}{2}\sumi \mathrm{d}_{\mathrm{KL}}\pbra{(\calD_\tau^{\boldsymbol{\sigma}})_i^{\otimes m}, (\calU)_i^{\otimes m}}}\,, \end{align}\] where we use the subscript \(i\in [n]\) to denote the marginal of the draw of \(m\) samples, each restricted to the \(i^\text{th}\) bit. Note that for any fixed \(i\in [n]\), the quantity \(\mathrm{d}_{\mathrm{KL}}\pbra{(\calD_\tau^{\boldsymbol{\sigma}})_i^{\otimes m}, (\calU)_i^{\otimes m}}\) is the KL divergence between (i) the uniform mixture of \(\mathsf{Binomial}(m,1/2-\tau)\) and \(\mathsf{Binomial}(m, 1/2+\tau)\), and (ii) \(\mathsf{Binomial}(m, 1/2)\).

Let \(p_\pm:=\tfrac12\pm\tau\) with \(0<\tau<\tfrac12\), and define the distributions \[P(k)=\tfrac12\binom{m}{k}p_-^{\,k}(1-p_-)^{m-k} +\tfrac12\binom{m}{k}p_+^{\,k}(1-p_+)^{m-k}, \qquad Q(k)=\binom{m}{k}\,2^{-m}\] for notational convenience. Note that \(P\) is the uniform mixture from above, while \(Q\) is \(\mathsf{Binomial}(m, 1/2 + \tau)\) . Finally, let \[f_{\pm}(k) := \frac{P_{\pm}(k)}{Q(k)} = \frac{P_\pm(k)}{Q(k)} =\bigl(2p_\pm\bigr)^{k}\bigl(2(1-p_\pm)\bigr)^{m-k}\,,\] and note that \(\E_{Q}[f_{\pm}] = 1\). We have from 1 that \[\begin{align} \mathrm{d}_{\mathrm{KL}}\pbra{(\calD_\tau^{\boldsymbol{\sigma}})_i^{\otimes m}, (\calU)_i^{\otimes m}} &\leq \mathrm{d}_{\mathrm{\chi^2}}\pbra{(\calD_\tau^{\boldsymbol{\sigma}})_i^{\otimes m}, (\calU)_i^{\otimes m}} \\ &=\Ex_Q\!\left[\left(\tfrac12(f_-+f_+)-1\right)^{\!2}\right]\\ &=\tfrac14\,\Ex_Q\!\bigl[(f_-+f_+)^2\bigr]-1\\ &=\tfrac14\Bigl(\Ex_Q[f_-^2]+\Ex_Q[f_+^2]+2\,\Ex_Q[f_-f_+]\Bigr)-1\\ &=\tfrac12\Bigl((1+4\tau^2)^m+(1-4\tau^2)^m\Bigr)-1\\ &=8m(m-1)\tau^4+O\!\bigl(m\tau^6\bigr)\,. \end{align}\] Combining this with the earlier bound, we get \[\mathrm{d}_{\mathrm{TV}}\pbra{(\calD_\tau^{\boldsymbol{\sigma}})^{\otimes m}, \calU^{\otimes m}} \leq O(1)\cdot \sqrt{n m^2 \tau^4} \ll 1 ~\qquad\text{for}~m = \Theta\pbra{\frac{n^{3/2}}{\log^2 n}}\,,\] which establishes 17 and completes the proof of [thm:our-unif-lb]. 0◻

4 Testing Unateness with Subcube Conditioning↩︎

We now turn to the proofs of [thm:our-subcube-UB,thm:subcube-lower-bound], starting with the former.

4.1 Upper Bound↩︎

We start by recalling [thm:our-subcube-UB]:

4.1.1 Preliminaries from [27]↩︎

Chakrabarty, Chen, Ristic, Seshadhri, and Waingarten [27] gave an \(\widetilde{O}(n/\eps^2)\)-query algorithm for monotonicity testing of a distribution over \(\{\pm 1\}^n\) in the subcube conditional model. Our \(\widetilde{O}(n^{3/2}/\eps^2)\)-query algorithm for unateness testing will rely on their principal technical lemma, which we state after introducing some relevant notation.

For any \(x \in \{\pm 1\}^n\) and \(i \in [n]\), we define \[\delta_{x,i} \mathrel{\vcenter{:}}= \frac{\calD(x^{i\to -1}) - \calD(x^{i\to +1})}{\calD(x^{i\to -1}) + \calD(x^{i\to +1})} \in [-1, 1]\] as the bias on the edge \(\{x, x^{\oplus i}\}\). Note that if \(\calD\) is monotone, we always have \(\delta_{x,i} \le 0\), so a positive \(\delta_{x,i}\) witnesses a violation of monotonicity.

Central to the analysis in [27] is the following lemma, which is implicit in the proof of [27]. For \(x \in \R\), we write \((x)_+ \mathrel{\vcenter{:}}= \max\{x, 0\}\).

Lemma 5 ([27]). For any \(\calD\) that is \(\eps\)-far from monotone, there exists a positive integer \(w \le O(\log(n/\eps))\) such that \[\Prx_{\bx \sim \calD \atop \bi \sim [n]}\sbra{(\delta_{\bx, \bi})_+^2 \ge 2^{-w}} \ge \widetilde{\Omega}\left(\frac{2^w \cdot \eps^2}{n}\right).\]

The proof of 5 relies on a real-valued “directed” isoperimetric inequality proved in [27]. In particular, it follows from 5 that if we draw a random \(\bw \le O(\log(n/\eps))\) with probability \(\bw = w\) proportional to \(2^{-w}\), we have \[\label{eq:MIT-tech-review} \Prx_{\bw, \bx \sim \calD, \bi \sim [n]}\sbra{(\delta_{\bx, \bi})_+^2 \ge 2^{-\bw}} \ge \sum_{w=1}^{O(\log(n/\eps))}2^{-w}\cdot\Prx_{\bx \sim \calD \atop \bi \sim [n]}\sbra{(\delta_{\bx, \bi})_+^2 \ge 2^{-w}} \ge \widetilde{\Omega}\left(\frac{\eps^2}{n}\right).\tag{18}\]

Give the lemma above, the algorithm of [27] is natural: we simply sample \(\widetilde{O}(n/\eps^2)\) triples \((\bw, \bx, \bi)\), in the hope of finding at least one with \((\delta_{\bx, \bi})_+^2 \ge 2^{-\bw}\). For each triple, we make \(\widetilde{O}(2^w)\) queries to the subcube (or edge) \(\{x, x^{\oplus i}\}\) to check whether \((\delta_{x,i})_+^2 \ge 2^{-w }\) holds. If this holds for any triple, we reject distribution \(\calD\). Over the randomness in \(\bw\), we make \(\sum_{w=1}^{O(\log(n/\eps))}2^{-w}\cdot\widetilde{O}(2^w) = \widetilde{O}(1)\) queries for each triple, so the overall query complexity is \(\widetilde{O}(n/\eps^2)\).

4.1.2 Proof of [thm:our-subcube-UB]↩︎

We first introduce some additional notation before proving [thm:our-subcube-UB]. Recall from [notation:D-sigma] that, for \(\sigma \in \bn\), \(\calD^\sigma\) is the distribution of \[\bx^\sigma \mathrel{\vcenter{:}}= (\sigma_1 \bx_1, \sigma_2 \bx_2, \ldots, \sigma_n \bx_n)\,,\] where \(\bx \sim \calD\), i.e., \(\calD^\sigma\) is obtained from \(\calD\) by flipping the coordinates indexed by \(\{i \in [n]: \sigma_i = -1\}\). Recall that, with respect to distribution \(\calD\), we defined \[\delta_{x,i} \mathrel{\vcenter{:}}= \frac{\calD(x^{i\to -1}) - \calD(x^{i\to +1})}{\calD(x^{i\to -1}) + \calD(x^{i\to +1})}\,.\] In the following, we will write \(\delta^{\calD}_{x,i}\) to avoid confusion and emphasize dependence on \(\calD\). While the next identity is notation-heavy, it states an intuitive fact: if \(\calD^\sigma\) has a bias on an edge adjacent to \(x\) along the \(i^\text{th}\) direction, \(\calD\) should also have a bias at \(x^\sigma\), albeit flipped by \(\sigma_i\). More formally, \[\begin{align} \delta^{\calD^\sigma}_{x,i} &= \frac{\calD^\sigma(x^{i\to -1}) - \calD^\sigma(x^{i\to +1})}{\calD^\sigma(x^{i\to -1}) + \calD^\sigma(x^{i\to +1})} \nonumber \\ &= \frac{\calD((x^{i\to -1})^\sigma) - \calD((x^{i\to +1})^\sigma)}{\calD((x^{i\to -1})^\sigma) + \calD((x^{i\to +1})^\sigma)}\nonumber \\ &= \frac{\sigma_i \cdot \left[\calD((x^\sigma)^{i\to -1}) - \calD((x^\sigma)^{i\to +1})\right]}{\calD((x^\sigma)^{i\to -1}) + \calD((x^\sigma)^{i\to +1})} \nonumber \\ &= \sigma_i \cdot \delta^P_{x^\sigma, i}\,. \label{eq:banana} \end{align}\tag{19}\]

We now record a corollary of 5 which will be crucial to our analysis of 2. Since \(\calD\) is \(\eps\)-far from unate, for every sign pattern \(\sigma \in \{\pm 1\}^n\), the distribution \(\calD^\sigma\) is \(\eps\)-far from monotone. Applying 5 (or more precisely, 18 ) to \(\calD^\sigma\) then gives \[\begin{align} \wt{\Omega}\pbra{\frac{\eps^2}{n}} &\leq \Prx_{\bw, \bx\sim \calD^\sigma, \bi \sim [n]}\sbra{(\delta^{\calD^\sigma}_{\bx, \bi})_+^2 \ge 2^{-\bw}} \nonumber \\ &= \Prx_{\bw, \bx\sim \calD^\sigma, \bi \sim [n]}\sbra{(\sigma_i\cdot\delta^{\calD}_{\bx^\sigma, \bi})_+^2 \ge 2^{-\bw}} } \nonumber \\ &= \Prx_{\bw, \bx\sim \calD, \bi \sim [n]}\sbra{(\sigma_i\cdot\delta^{\calD}_{\bx, \bi})_+^2 \ge 2^{-\bw}}\,, \label{eq:super-nice-bakery} \end{align}\tag{20}\] where 20 relies on the fact that for \(\bx\sim\calD^\sigma\), the random variable \(\bx^\sigma\) is distributed as \(\calD\). We record this consequence of 5 for future use:

Corollary 1. Suppose \(\calD\) is \(\eps\)-far from unate. Then for every \(\sigma\in\bn\), we have \[\Prx_{\bw, \bx\sim \calD, \bi \sim [n]}\sbra{(\sigma_i\cdot\delta^{\calD}_{\bx, \bi})_+^2 \ge 2^{-\bw}} \geq \wt{\Omega}\pbra{\frac{\eps^2}{n}}\,.\]

1 suggests a natural test to detect distributions that are far from unate and forms the basis of 2: iterating over each coordinate \(i\in [n]\), we reject if there exist two pairs \((\bw, \bx)\) and \((\bw', \bx')\) such that \[\label{eq:subcube-reject-condition} (\delta^\calD_{\bx,i})_{+}^2 \ge 2^{-\bw} \quad\text{and}\quad (-\delta^\calD_{\bx',i})_{+}^2 \ge 2^{-\bw'}\,.\tag{21}\] Intuitively, the former condition rules out the possibility that \(\calD\) is monotone in direction \(i\), and the latter rules out that \(\calD\) is anti-monotone in direction \(i\). Note that if \(\calD\) is unate, then both conditions above can never hold simultaneously.

Figure 2: The \texttt{Subcube-Unate} algorithm.

We now turn to the proof of [thm:our-subcube-UB]:

Proof of [thm:our-subcube-UB]. For a fixed triple \((i,\bx,\bw)\), the expected number of conditional samples is \[\sum_{t=1}^{\Theta(\log(n/\varepsilon))}\Pr[\bw=t]\cdot T(t) =\sum_t \Theta(2^{-t})\cdot \Theta(2^{t}\log(nk)) =\widetilde{O}(1).\] We perform \(\Theta(n\cdot k)=\widetilde{\Theta}(n^{3/2}/\varepsilon^2)\) triples, so the total query complexity is \(\widetilde{O}(n^{3/2}/\varepsilon^2)\).

By Hoeffding’s inequality, \[\Pr\!\left[\big|\boldsymbol{\tau}_\ell-\delta^{\calD}_{\bx,i}\big| \;\ge\;\frac{1}{8}\,2^{-\bw/2}\right] \;\le\;2\exp\!\Big(-\tfrac12\cdot (\frac{1}{8}\,2^{-\bw/2})^2\,T(\bw)\Big) \;\le\;\frac{\delta_{\mathrm{cmp}}}{6nk},\] for a sufficiently large absolute constant in the definition of \(T(\bw)\). Taking a union bound over all \(nk\) trials, with probability at least \(1-\delta_{\mathrm{cmp}}/6\) we have, simultaneously for all trials, \[\label{eq:good-event} \boldsymbol{\tau}_\ell \in \Big[\delta^{\calD}_{\bx,i}-\frac{1}{8}\,2^{-\bw/2},\; \delta^{\calD}_{\bx,i}+\frac{1}{8}\,2^{-\bw/2}\Big].\tag{22}\] For the remainder of the argument, we condition on the event that 22 holds for all trials.

4.1.2.1 Completeness.

Conditioned on the above event, it is readily seen that Subcube-Unate has one-sided error. In particular, suppose \(\calD\) is a unate distribution. It follows that there exists \(\sigma\in\bn\) such that \(\calD^\sigma\) is monotone. In particular, \(\sigma_i \cdot \delta^{\calD}_{x,i} \leq 0\) for all \(x\in\bn\) and \(i\in[n]\). Fix a coordinate \(i \in [n]\) and suppose \(\sigma_i = +1\). We have \(\delta^{\calD}_{\bx,i}\le 0\) for every \(\bx\), and conditioned on 22 , \[\boldsymbol{\tau}_\ell \le\;\tfrac18\,2^{-\bw/2}\;<\;c_{\bw}= \frac{2^{-\bw/2}}{4}\,,\] so this trial cannot create a positive witness for coordinate \(i\). An identical argument gives that if \(\sigma_i = -1\), then the trial cannot create a negative witness for coordinate \(i\). It follows that, conditioned on 22 , the algorithm will output “accept” with probability \(1\).

4.1.2.2 Soundness.

We now turn to soundness of \(\texttt{Subcube-Unate}(\calD, \eps)\). Suppose \(\calD\) is \(\eps\)-far from every unate distribution, we will show that \(\texttt{Subcube-Unate}(\calD,\eps)\) will output “reject” with probability at least \(9/10\). For \(\bw\) distributed as in Step 2(a).ii of 2 and \(i\in[n]\), let \[q^{+}_i \mathrel{\vcenter{:}}= \Prx_{\bw,\bx \sim \calD}\sbra{(\delta^{\calD}_{\bx, i})_+^2 \ge 2^{-\bw}} \qquad\text{and}\qquad q^{-}_i \mathrel{\vcenter{:}}= \Prx_{\bw,\bx \sim \calD}\sbra{(-\delta^{\calD}_{\bx, i})_+^2 \ge 2^{-\bw}}\] be the probabilities that, over the randomness in \(\bw\) and \(\bx\), the pair \((\bw, \bx)\) witnesses that the \(i^\text{th}\) coordinate cannot be monotone and anti-monotone respectively. 1 directly implies that \[\label{eq:corCCRSW} m:=\frac{1}{n} \sum_{i=1}^n m_i \geq \widetilde{\Omega}\!\left(\frac{\varepsilon^{2}}{n}\right)\,, \qquad\text{where}~m_i \mathrel{\vcenter{:}}= \min \left\{ q_i^{+}, q_i^{-} \right\}\,.\tag{23}\] Let \(r_i\) be the probability that \(\texttt{Subcube-Unate}(\calD,\eps)\) outputs “reject” in Step 2(b) on coordinate \(i\). Thanks to independence, we have \[\Prx\sbra{\texttt{Subcube-Unate}(\calD,\eps)~\text{outputs ``accept''}} = \prod_{i=1}^n (1-r_i) \leq \exp\pbra{-\sumi r_i}\,,\] and so the remainder of the argument will establish that \(\sumi r_i = \Omega(1).\)

First, note that \[\label{eq:quarters} r_i \geq \pbra{1-(1-q_i^+)^{k/2}}\pbra{1-(1-q_i^-)^{k/2}} \geq \pbra{1-(1-m_i)^{k/2}}^2\,,\tag{24}\] where the first inequality holds because the probability of returning “reject” after \(k\) iterations of Steps 2(a).i–iii is at least the probability of detecting a positive witness among the first \(k/2\) iterations and a negative witness among the last \(k/2\) iterations. The following lemma will be useful:

Lemma 6. For \(K\geq1\), the function \(f(x) = (1-(1-x)^K)^2\) is convex on the interval \((0, \ln(2)/K)\).

Proof. We explicitly compute the first and second derivatives of the function \(f\). Note that \[f'(x) = 2K\pbra{1-(1-x)^K}(1-x)^{K-1}\,.\] Taking another derivative gives \[\begin{align} f''(x) &= 2K^2(1-x)^{2K-2}-2K(K-1)(1-(1-x)^K)(1-x)^{K-2} \\ &= 2K(1-x)^{K-2}((2K-1)(1-x)^K-(K-1))\,. \end{align}\] So it suffices to show \[(2K-1)\Bigl(1-\tfrac{\ln 2}{K}\Bigr)^K \geq K-1\,,\] or equivalently \(F(K)\geq 0\) where \(F(x):=x\ln\Bigl(1-\tfrac{\ln 2}{x}\Bigr)-\ln\!\Bigl(\tfrac{x-1}{2x-1}\Bigr)\). Since \[\lim_{x\to+\infty}F(x)=-\ln 2-\ln \tfrac12=0,\] showing that \(F'(x)<0\) for all \(x\in(1, +\infty)\) will complete the proof.

Note that \[F'(x) = \ln\Bigl(1-\frac{1}{x/\ln2}\Bigr)+\frac{1}{x/\ln2-1}-\frac{1}{(x-1)(2x-1)}.\] Furthermore, the function \(h(y) := \ln\Bigl(1-\frac{1}{y}\Bigr)+\frac{1}{y-1}\) has derivative \(h'(y)=-\frac{1}{y(y-1)^2}\), and is thus strictly decreasing on \((1, +\infty)\). If we could show that \[\label{eq:hooray-daeho} h(x) = \ln\Bigl(1-\frac{1}{x}\Bigr)+\frac{1}{x-1}\leq\frac{1}{(x-1)(2x-1)}\tag{25}\] holds for all \(x \in (1, +\infty)\), we would have the desired inequality \[F'(x) = h(x / \ln 2) - \frac{1}{(x-1)(2x-1)} < h(x) - \frac{1}{(x-1)(2x-1)} \le 0.\] 25 follows immediately from the well-known/readily verified inequality \(2a \leq (2+a)\cdot\ln(1+a)\) for \(a\geq0\) by taking \(a=(x-1)^{-1}\). ◻

Returning to the soundness of Subcube-Unate, note that if there exists a coordinate \(j\) with \(m_j \geq \tfrac{2\ln2}{k}\), then thanks to 24 we have \[\begin{align} r_j \geq (1-(1-m_j)^{k/2})^2 \geq \left(1-\left(1-\frac{\ln2}{k/2}\right)^{k/2}\right)^2 \geq (1-e^{-\ln2})^2 = \frac{1}{4}. \end{align}\] Consequently, the amplification in Step 1 ensures that one of the \(\Theta(1)\) independent runs will output “reject” with probability at least \(9/10\).

On the other hand, suppose \(m_i< \tfrac{2\ln2}{k}\) for all \(i \in [n]\). Thanks to 6 and Jensen’s inequality, we then have \[\sumi r_i \geq \sumi \pbra{1 - (1-m_i)^{k/2}}^2 \geq n\pbra{1 - (1-m)^{k/2}}^2\,.\] It follows that \(\sumi r_i \geq 99/100\) from 23 and our choice of \(k\) by an easy application of Bernoulli’s inequality \((1+u)^r \geq 1+ru\) for \(r,u \geq 0\). ◻

4.2 Lower Bound↩︎

We prove the following lower bound for testing unateness of distributions in the subcube model, which applies to all testers that only make subcube queries on either the entire hypercube (to get an unconditional sample) or a small subcube.

Recall that our tester for [thm:our-subcube-UB], like the monotonicity tester of [27], only makes subcube queries on edges (i.e., one-dimensional subcubes) in addition to drawing unconditional samples. In other words, our tester satisfies the precondition of [thm:subcube-lower-bound] with \(d = 1\). The theorem then implies that all such testers must make at least \(\widetilde{\Omega}(n^{2/3})\) queries in total.

We prove this lower bound by reducing the unateness testing of a Boolean function \(f: \bits^n \to \zo\) to that of a distribution over \(\bits^n\).3 For a non-zero Boolean function \(f\), let \(\calD_f\) denote the uniform distribution over \(f^{-1}(1) \mathrel{\vcenter{:}}= \{x \in \bits^n: f(x) = 1\}\). [thm:subcube-lower-bound] is an immediate consequence of the following observations and a lower bound of Chen, Waingarten, and Xie [30] for testing unateness of Boolean functions:

  • (7) If function \(f: \bits^n \to \zo\) is unate, distribution \(\calD_f\) is also unate. If \(f\) is \(\eps\)-far from unate, \(\calD_f\) is \(\Omega(\eps)\)-far from unate.

  • (8) Given membership query access to \(f: \bits^n \to \zo\), we can sample from \(\calD_f\) and its restrictions to small subcubes. Assuming that \(f\) is \(\eps\)-far from the zero function, \(O(1/\eps)\) queries suffice for drawing an unconditional sample from \(\calD_f\). Moreover, \(2^d\) queries suffice for sampling from \(\calD_f\) restricted to a \(d\)-dimensional subcube.

  • By [30], testing the unateness of an \(n\)-variable Boolean function requires \(\widetilde{\Omega}(n^{2/3})\) queries.

We state and prove [lemma:unate-function-to-dist,lemma:function-to-dist-reduction] in the rest of this section.

Lemma 7. The following two claims hold for every \(f: \bits^n \to \zo\) and \(\eps \ge 0\):

  • If \(f\) is unate, \(\calD_f\) is unate.

  • If \(f\) is \(\eps\)-far from unate, \(\calD_f\) is \((\eps/2)\)-far from unate.

Proof. Let \(g: \bits^n \to [0, 1]\) be the probability mass function (PMF) of \(\calD_f\). The first claim easily follows from the observation that \(g\) is exactly \(\alpha \mathrel{\vcenter{:}}= 1 / |f^{-1}(1)|\) times \(f\), and is thus unate for every unate function \(f\).

For the second claim, we prove its contrapositive: if \(\calD_f\) is \(\eps\)-close to a unate distribution, \(f\) is \((2\eps)\)-close to a unate Boolean function. Assuming that \(\calD_f\) is \(\eps\)-close (in total variation distance) to a unate distribution \(\calD'\), there exists a unate function \(g': \bits^n \to [0, 1]\) (namely, the PMF of \(\calD'\)) such that \[\|g - g'\|_1 \mathrel{\vcenter{:}}= \sum_{x \in \bits^n}|g(x) - g'(x)| \le 2\eps.\] The factor of \(2\) appears since the TV distance is half the \(L_1\) distance between the PMFs.

In the rest of the proof, we will show that there exists \(g'': \bits^n \to \{0, \alpha\}\) such that \(\|g - g''\|_1 \le 2\eps\). Note that the lemma would directly follow from this claim: Since both \(g\) and \(g''\) are \(\{0, \alpha\}\)-valued, we have \[2\eps \ge \|g - g''\|_1 = \sum_{x \in \bits^n}|g(x) - g''(x)| = \alpha \cdot \sum_{x \in \bits^n}\mathbf{1}\left[g(x) \ne g''(x)\right],\] which implies that \(g\) and \(g''\) differ on at most \(2\eps / \alpha = 2\eps|f^{-1}(1)| \le 2\eps \cdot 2^n\) inputs. Therefore, \(g'' / \alpha\) is a unate Boolean function that disagrees with \(f = g / \alpha\) on at most a \((2\eps)\)-fraction of inputs. In other words, \(f\) is \((2\eps)\)-close to unate.

4.2.0.1 Existence of \(g''\).

To show the existence of \(g'': \bits^n \to \{0, \alpha\}\) such that \(\|g - g''\|_1 \le 2\eps\), we consider a standard linear program for finding the unate function that is the closest to \(g\) in \(L_1\) distance.

Recall that \(g\) is \((2\eps)\)-close to a unate function \(g'\). Let \(E \subseteq \bits^n \times \bits^n\) be the set of all ordered pairs \((x, x')\) such that the constraint \(g'(x) \le g'(x')\) is enforced by the unateness of \(g'\). Formally, for each edge \(\{x^{i \to -1}, x^{i \to +1}\}\) of the hypercube (where \(x \in \bits^n\) and \(i \in [n]\)), we have \((x^{i \to -1}, x^{i \to +1}) \in E\) if \(g'\) is monotone in the \(i\)-th coordinate and \((x^{i \to +1}, x^{i \to -1}) \in E\) if \(g'\) is anti-monotone in the \(i\)-th coordinate. Then, we consider the following linear program (LP) on \(2^{n+1}\) real-valued variables \(\{h(x): x \in \bits^n\}\) and \(\{\delta(x): x \in \bits^n\}\): \[\begin{align} \text{Minimize}&\quad \sum_{x \in \bits^n}\delta(x) &\\ \text{Subject to}&\quad h(x) \le h(x') &\quad \forall (x, x') \in E,\\ &\quad -\delta(x) \le g(x) - h(x) \le \delta(x) &\quad \forall x \in \bits^n. \end{align}\] This LP finds the unate function \(h\) (with the same monotonicity as \(g'\) on all the \(n\) coordinates) that is the closest to \(g\) in \(L_1\) distance: the first set of constraints enforces the unateness of \(h\), while the second ensures that the optimal choice of each \(\delta(x)\) is \(|g(x) - h(x)|\).

Since \(g'\) is a feasible solution to the LP above with an objective value of \(\le 2\eps\), by the fundamental theorem of linear programming (e.g., [53]), there exists a basic feasible solution \((h^*, \delta^*)\) that attains an objective value of \(\le 2\eps\). In other words, \(h^*\) is a unate function that is \((2\eps)\)-close to \(g\), and \((h^*, \delta^*)\) is uniquely determined by the linear system obtained from replacing a subset of the constraints with equations.

Then, equations of form “\(h^*(x) = h^*(x')\)” (where \((x, x') \in E\)) partition \(\bits^n\) into several connected components: two different points \(x, x' \in \bits^n\) are in the same component if there exist a path \(x = x_1, x_2, \ldots, x_l = x'\) such that the linear system contains the equation \(h^*(x_i) = h^*(x_{i+1})\) for every pair of adjacent points \(x_i\) and \(x_{i+1}\). For each connected component \(C \subseteq \bits^n\), there must exist some \(x_0 \in C\) such that both equations “\(-\delta^*(x_0) = g(x_0) - h^*(x_0)\)” and “\(g(x_0) - h^*(x_0) = \delta^*(x_0)\)” are in the linear system; otherwise, we may freely set the values \(\{h^*(x): x \in C\}\) to the same, arbitrary value, and then set each \(\delta^*(x)\) according to “\(-\delta^*(x) = g(x) - h^*(x)\)” or “\(g(x) - h^*(x) = \delta^*(x)\)”, depending on which of the two is in the linear system.

Therefore, for each connected component \(C \subseteq \bits^n\), we can find \(x_0 \in C\) such that the linear system enforces \(-\delta^*(x_0) = g(x_0) - h^*(x_0) = \delta^*(x_0)\). This implies that all variables \(\{h^*(x): x \in C\}\) are equal to \(g(x_0) \in \{0, \alpha\}\). It then follows that \(h^*\) is \(\{0, \alpha\}\)-valued. Since \(h^*\) is unate and \((2\eps)\)-close to \(g\), it gives the desired function \(g''\). ◻

Lemma 8. Suppose that algorithm \(\calA\) tests whether an unknown distribution \(\calD\) over \(\bits^n\) is unate or \(\eps\)-far from unate by drawing \(Q_1\) samples from \(\calD\) and making \(Q_2\) (possibly adaptive) subcube queries on subcubes of dimensions \(\le d\). Then, there is an algorithm that tests whether an unknown function \(f: \bits^n \to \zo\) is unate or \((2\eps)\)-far from unate with an expected query complexity of \[O\left(\frac{Q_1 + 1}{\eps} + Q_2 \cdot 2^d\right).\]

Proof. We construct a unateness tester \(\calA'\) for an unknown function \(f: \bits^n \to \zo\) by simulating the distribution tester \(\calA\) on distribution \(\calD_f\):

  • Sample \(m = \Theta(1/\eps)\) inputs \(\bx^{(1)}, \bx^{(2)}, \ldots, \bx^{(m)} \in \bits^n\) independently and uniformly at random. Query \(f\) on these \(m\) inputs and compute the empirical average \(\hat{\mu} = \frac{1}{m}\sum_{i=1}^{m}f(\bx^{(i)})\). If \(\hat{\mu} \le \eps\), output “Accept” and terminate.

  • Simulate tester \(\calA\) on distribution \(\calD_f\). Whenever \(\calA\) requests an unconditional sample from \(\calD_f\), keep sampling uniformly random inputs until an \(x \in \bits^n\) with \(f(x) = 1\) is encountered. Send \(x\) to \(\calA\).

  • Whenever \(\calA\) makes a subcube query on \(C \subseteq \bits^n\), query \(f\) at every \(x \in C\) and return an \(x\) sampled from \(\{x \in C: f(x) = 1\}\) uniformly at random.

  • When \(\calA\) terminates, make the same decision as \(\calA\).

Let \(\calE\) be the event that the following two conditions hold:

  • If \(f\) has a mean of \(\Ex_{\bx \sim \bits^n}\left[f(\bx)\right] \le \eps / 2\), \(\hat{\mu} \le \eps\) holds in the first step of \(\calA'\).

  • If \(\Ex_{\bx \sim \bits^n}\left[f(\bx)\right] \ge 2\eps\), \(\hat{\mu} > \eps\) holds in the first step of \(\calA'\).

By a Chernoff bound, we have \(\Pr_{}\left[\calE\right] \ge 1 - \delta\) if we set \(m = \Theta(\log(1/\delta)/\eps)\).

In the following, we analyze the query complexity, completeness, and soundness of \(\calA'\) conditioning on event \(\calE\). We will remove the conditioning at the end of the proof.

4.2.0.2 Query complexity.

Tester \(\calA'\) makes \(O(1/\eps)\) queries in the first step. Conditioning on event \(\calE\), if \(\calA'\) does not terminate in this step, it holds that \(\Ex_{\bx \sim \bits^n}\left[f(\bx)\right] > \eps/2\). Then, whenever \(\calA\) requests an unconditional sample from \(\calD\), \(\calA'\) makes \(1 / \Ex_{\bx \sim \bits^n}\left[f(\bx)\right] = O(1/\eps)\) queries to \(f\) in expectation. Whenever \(\calA\) requests a conditional sample from subcube \(C \subseteq \bits^n\), \(\calA'\) makes \(|C| \le 2^d\) queries. Therefore, the expected query complexity of \(\calA'\) conditioning on event \(\calE\) is \[O(1/\eps) + Q_1 \cdot O(1/\eps) + Q_2 \cdot 2^d = O\left(\frac{Q_1 + 1}{\eps} + Q_2 \cdot 2^d\right).\]

4.2.0.3 Completeness and soundness.

Suppose that \(f\) is a unate function. By the first part of 7, \(\calD_f\) is a unate distribution. From the perspective of tester \(\calA\) (simulated by \(\calA'\)), it tests the unateness of \(\calD_f\) and thus accepts with probability at least \(2/3\). It follows that \(\calA'\) also accepts with probability at least \(2/3\) (conditioning on event \(\calE\)) in this case.

Suppose that \(f\) is \((2\eps)\)-far from unate. In particular, \(f\) is \((2\eps)\)-far from the zero function, i.e., it holds that \(\Ex_{\bx \sim \bits^n}\left[f(\bx)\right] \ge 2\eps\). Conditioning on event \(\calE\), \(\hat{\mu} > \eps\) holds in the first step of \(\calA'\), and the tester would not accept by mistake. By the second part of 7, distribution \(\calD_f\) is \(\eps\)-far from unate, so the soundness of tester \(\calA\) guarantees that \(\calA'\) rejects with a conditional probability \(\ge 2/3\) in this case.

4.2.0.4 Put everything together.

We have showed that, conditioning on event \(\calE\) that happens with probability \(\ge 1 - \delta\), \(\calA'\) has an expected query complexity of \(Q \mathrel{\vcenter{:}}= O\left(\frac{Q_1 + 1}{\eps} + Q_2 \cdot 2^d\right)\) and succeeds with probability at least \(2/3\). Now, suppose that we terminate \(\calA'\) whenever it makes more than \(Q / \delta\) queries. By Markov’s inequality, we obtain a tester with a query complexity always bounded by \(Q / \delta\) and an unconditional success probability of at least \[\Pr_{}\left[\calE\right] \cdot \left(\frac{2}{3} - \delta\right) \ge (1 - \delta) \cdot \left(\frac{2}{3} - \delta\right) \ge \frac{2}{3} - 2\delta.\]

If we set \(\delta = 1/100\), we have \(2/3 - 2\delta > 1/2\). Thus, by repeating the truncated tester a constant number of times and taking the majority vote, we obtain a tester with a success probability \(\ge 2/3\) and the desired query complexity of \[O(Q / \delta) = O\left(\frac{Q_1 + 1}{\eps} + Q_2 \cdot 2^d\right). \qedhere\] ◻

Acknowledgements↩︎

D.L. is supported by the MIT Undergraduate Research Opportunities Program (UROP). S.N. is partially supported by Elchanan Mossel’s Vannevar Bush Faculty Fellowship ONR-N00014- 20-1-2826. R.R. is supported by the NSF TRIPODS program (award DMS-2022448) and CCF-2310818.

References↩︎

[1]
C. L. Canonne, “A survey on distribution testing: Your data is big. But is it blue?” Theory of Computing, pp. 1–100, 2020.
[2]
C. L. Canonne et al., “Topics and techniques in distribution testing: A biased but representative sample,” Foundations and Trends® in Communications and Information Theory, vol. 19, no. 6, pp. 1032–1198, 2022.
[3]
C. L. Canonne, I. Diakonikolas, D. M. Kane, and booktitle=Conference. on L. T. Stewart Alistair, “Testing bayesian networks,” 2017 , organization={PMLR}, pp. 370–448.
[4]
C. Daskalakis and booktitle=Conference. on L. T. Pan Qinxuan, “Square hellinger subadditivity for bayesian networks and its applications to identity testing,” 2017 , organization={PMLR}, pp. 697–703.
[5]
C. Daskalakis, N. Dikkala, and G. Kamath, “Testing ising models,” IEEE Transactions on Information Theory, vol. 65, no. 11, pp. 6829–6852, 2019.
[6]
I. Bezáková, A. Blanca, Z. Chen, D. Štefankovič, and E. Vigoda, “Lower bounds for testing graphical models: Colorings and antiferromagnetic ising models,” Journal of Machine Learning Research, vol. 21, no. 25, pp. 1–62, 2020.
[7]
A. De, H. Li, S. Nadimpalli, and booktitle=Proceedings. of the 56th. A. A. S. on T. of C. Servedio Rocco A, “Detecting low-degree truncation,” 2024, pp. 1027–1038.
[8]
A. De, S. Nadimpalli, and R. A. Servedio, “Testing convex truncation,” Mathematical Statistics and Learning, 2025, doi: 10.4171/MSL/50 , note = {Preliminary version in \emph{Proceedings of the 2023 ACM-SIAM Symposium on Discrete Algorithms (SODA)}.}.
[9]
N. Bshouty and C. Tamon, “On the Fourier spectrum of monotone functions,” Journal of the ACM, vol. 43, no. 4, pp. 747–770, 1996.
[10]
“Testing monotonicity,” Combinatorica, vol. 20, no. 3, pp. 301–337, 2000.
[11]
D. Chakrabarty and booktitle=Proceedings. of the F.-F. A. A. S. on T. of C. Seshadhri C, “A \(o(n)\) monotonicity tester for boolean functions over the hypercube,” 2013, pp. 411–418.
[12]
X. Chen, R. A. Servedio, and booktitle=2014. I. 55th. A. S. on F. of C. S. Tan Li-Yang, “New algorithms and lower bounds for monotonicity testing,” 2014 , organization={IEEE}, pp. 286–295.
[13]
S. Khot, D. Minzer, and M. Safra, “On monotonicity testing and boolean isoperimetric-type theorems,” SIAM Journal on Computing, vol. 47, no. 6, pp. 2238–2276, 2018.
[14]
J. Lange, R. Rubinfeld, and booktitle=2022. I. 63rd. A. S. on F. of C. S. (FOCS). Vasilyan Arsen, “Properly learning monotone functions via local correction,” 2022 , organization={IEEE}, pp. 75–86.
[15]
X. Chen, A. De, Y. Li, S. Nadimpalli, and booktitle=Proceedings. of the 2024. A. A.-S. S. on D. A. (SODA). Servedio Rocco A, “Mildly exponential lower bounds on tolerant testers for monotonicity, unateness, and juntas,” 2024 , organization={SIAM}, pp. 4321–4337.
[16]
H. Black, D. Chakrabarty, and C. Seshadhri, “A \(d^{1/2+o(1)}\) monotonicity tester for boolean functions on \(d\)-dimensional hypergrids,” SIAM Journal on Computing, no. 0, pp. FOCS23–147, 2025.
[17]
J. Lange and A. Vasilyan, “Agnostic proper learning of monotone functions: Beyond the black-box correction barrier,” SIAM Journal on Computing, no. 0, pp. FOCS23–1, 2025.
[18]
M. Chen, X. Chen, H. Cui, W. Pires, and eprinttype=arxiv. Stockwell Jonah, “Boolean function monotonicity testing requires (almost) \(n^{1/2}\) queries,” 2025.
[19]
T. Batu, R. Kumar, and booktitle=Proceedings. of the thirty annual A. symposium on T. of computing Rubinfeld Ronitt, “Sublinear algorithms for testing monotone and unimodal distributions,” 2004, pp. 381–390.
[20]
R. Rubinfeld and R. A. Servedio, “Testing monotone high-dimensional distributions,” Random Struct. Algorithms, vol. 34, no. 1, pp. 24–44, 2009.
[21]
M. Adamaszek, A. Czumaj, and booktitle=Proceedings. of the T.-F. A. A.-S. S. on D. A. Sohler Christian, “Testing monotone continuous distributions on high-dimensional real cubes,” 2010 , organization={SIAM}, pp. 56–65.
[22]
A. Bhattacharyya, E. Fischer, R. Rubinfeld, and booktitle=ICS. Valiant Paul, “Testing monotonicity of distributions over general partial orders.” 2011, pp. 239–252.
[23]
J. Acharya, C. Daskalakis, and G. Kamath, “Optimal testing for properties of distributions,” Advances in Neural Information Processing Systems, vol. 28, 2015.
[24]
M. Aliakbarpour, T. Gouleakis, J. Peebles, R. Rubinfeld, and booktitle=Conference. on L. T. Yodpinyanee Anak, “Towards testing monotonicity of distributions over general posets,” 2019 , organization={PMLR}, pp. 34–82.
[25]
R. Rubinfeld and A. Vasilyan, “Monotone probability distributions over the boolean cube can be learned with sublinear samples,” 11th Innovations in Theoretical Computer Science (ITCS 2020), 2020.
[26]
G. Blanc, J. Lange, A. Malik, and booktitle=Proceedings. of the 55th. A. A. S. on T. of C. Tan Li-Yang, “Lifting uniform learners via distributional decomposition,” 2023, pp. 1755–1767.
[27]
D. Chakrabarty, X. Chen, S. Ristic, C. Seshadhri, and booktitle=Symposium. on T. of C. (STOC). Waingarten Erik, “Monotonicity testing of high-dimensional distributions with subcube conditioning,” 2025, pp. 1019–1030.
[28]
S. Khot and booktitle=Approximation,. R. and C. Optimization. A. and T. (APPROX/RANDOM. 2016). Shinkar Igor, “An \(o(n)\) queries adaptive tester for unateness,” 2016 , organization={Schloss Dagstuhl--Leibniz-Zentrum f{\"u}r Informatik}, pp. 37–1.
[29]
D. Chakrabarty and eprint=1608. 06980. Seshadhri C, “A \({O}(n)\) non-adaptive tester for unateness,” 2016.
[30]
X. Chen, E. Waingarten, and J. Xie, “Beyond talagrand functions: New lower bounds for testing monotonicity and unateness , booktitle = Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing (STOC),” 2017, pp. 523–536.
[31]
X. Chen, E. Waingarten, and J. Xie, “Boolean unateness testing with \(\tilde{O}(n^{3/4})\) adaptive queries , booktitle = Proceedings of the 58th Annual IEEE Symposium on Foundations of Computer Science (FOCS),” 2017, pp. 868–879.
[32]
X. Chen and booktitle=Proceedings. of the 51st. A. A. S. S. on T. of C. Waingarten Erik, “Testing unateness nearly optimally,” 2019, pp. 547–558.
[33]
R. Baleshzar, D. Chakrabarty, R. K. S. Pallavoor, S. Raskhodnikova, and C. Seshadhri, “Optimal unateness testers for real-valued functions: Adaptivity helps,” Theory of Computing, vol. 16, no. 1, pp. 1–36, 2020.
[34]
C. L. Canonne, D. Ron, and R. A. Servedio, “Testing probability distributions using conditional samples,” SIAM Journal on Computing, vol. 44, no. 3, pp. 540–616, 2015.
[35]
S. Chakraborty, E. Fischer, Y. Goldhirsh, and A. Matsliah, “On the power of conditional samples in distribution testing,” SIAM Journal on Computing, vol. 45, no. 4, pp. 1261–1296, 2016.
[36]
C. L. Canonne, X. Chen, G. Kamath, A. Levi, and booktitle=Proceedings. of the 2021. A.-S. S. on D. A. (SODA). Waingarten Erik, “Random restrictions of high dimensional distributions and uniformity testing with subcube conditioning,” 2021 , organization={SIAM}, pp. 321–336.
[37]
A. Blanca, Z. Chen, D. Štefankovič, and E. Vigoda, “Complexity of high-dimensional identity testing with coordinate conditional sampling,” ACM Transactions on Algorithms, vol. 21, no. 1, pp. 1–58, 2024.
[38]
M. Talagrand, “Isoperimetry, logarithmic Sobolev inequalities on the discrete cube and Margulis’ graph connectivity theorem,” GAFA, vol. 3, no. 3, pp. 298–314, 1993.
[39]
W. He and eprint=2308. 13992. Nadimpalli Shivam, “Testing junta truncation,” 2023.
[40]
R. Bhattacharyya and S. Chakraborty, “Property testing of joint distributions using conditional samples,” ACM Transactions on Computation Theory (TOCT), vol. 10, no. 4, pp. 1–20, 2018.
[41]
X. Chen, R. Jayaram, A. Levi, and booktitle=Conference. on L. T. Waingarten Erik, “Learning and testing junta distributions with sub cube conditioning,” 2021 , organization={PMLR}, pp. 1060–1113.
[42]
booktitle=Proceedings. of the 2021. A.-S. S. on D. A. (SODA). Narayanan Shyam, “On tolerant distribution testing in the conditional sampling model,” 2021 , organization={SIAM}, pp. 357–373.
[43]
X. Chen and booktitle=Proceedings. of the 2024. A. A.-S. S. on D. A. (SODA). Marcussen Cassandra, “Uniformity testing over hypergrids with subcube conditioning,” 2024 , organization={SIAM}, pp. 4338–4370.
[44]
T. Adar, E. Fischer, and eprint=2408. 02347. Levi Amit, “Improved bounds for high-dimensional equivalence and product testing using subcube queries,” 2024.
[45]
K. S. Meel, Y. P. Pote, and S. Chakraborty, “On testing of samplers,” Advances in Neural Information Processing Systems, vol. 33, pp. 5753–5763, 2020.
[46]
Y. Pote and K. S. Meel, “On scalable testing of samplers,” Advances in Neural Information Processing Systems, vol. 35, pp. 28068–28079, 2022.
[47]
E. Grigorescu, A. Kumar, and K. Wimmer, “Flipping out with many flips: Hardness of testing \(k\)-monotonicity,” SIAM Journal on Discrete Mathematics, vol. 33, no. 4, pp. 2111–2125, 2019.
[48]
C. L. Canonne, E. Grigorescu, S. Guo, A. Kumar, and K. Wimmer, “Testing \(k\)-monotonicity: The rise and fall of boolean functions,” Theory of Computing, vol. 15, no. 1, pp. 1–55, 2019.
[49]
Z. Chen, S. Guo, Q. Li, C. Lin, and eprint=2203. 12246. Sun Xiaoming, “New distinguishers for negation-limited weak pseudorandom functions,” 2022.
[50]
V. Bentkus, “On the dependence of the berry-esseen bound on dimension,” Journal of Statistical Planning and Inference, vol. 113, pp. 385–402, 2003.
[51]
M. Qiao and booktitle=9th. I. in T. C. S. C. (ITCS. 2018). Valiant Gregory, “Learning discrete distributions from untrusted batches,” 2018 , organization={Schloss Dagstuhl--Leibniz-Zentrum f{\"u}r Informatik}, pp. 47–1.
[52]
D. B. Owen, “Tables for computing bivariate normal probabilities,” The Annals of Mathematical Statistics, vol. 27, no. 4, pp. 1075–1090, 1956.
[53]
T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, MIT press, 2009 , edition={3rd}.

  1. Formally, a distribution \(\calD\) over \(\bn\) is monotone if its probability mass function \(\calD : \bn\to[0,1]\) is monotone, i.e., \(\calD(x) \leq \calD(y)\) whenever \(x_i \leq y_i\) for all \(i\in[n]\).↩︎

  2. See also Adamaszek, Czumaj, and Sohler [21] who improved the sample complexity to \(O(n/\eps^2)\).↩︎

  3. In this section, we assume that the co-domain of the Boolean function is \(\zo\) (instead of \(\bits\)), which is more convenient when dealing with probability mass functions.↩︎