arXiv:2610.11145cs.DSOct 2026

Manuscript Offprint

arXiv:2610.11145

Tight Bounds for Equivalence Testing with Non-Adaptive Conditional Samples

Gautam Kamath

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study distribution testing with access to non-adaptive conditional samples. Specifically, we give tight bounds for equivalence testing, determining whether two unknown distributions are equal to or ε\varepsilon-far from each other in total variation distance. Our algorithm and lower bound show that Θ~(log⁡nε2)\tilde{\Theta}\left(\frac{\log n}{\varepsilon^2}\right) queries are necessary and sufficient for this problem. These results demonstrate that the complexity of uniformity, identity, and equivalence testing with non-adaptive conditional samples are all Θ~(log⁡n)\tilde{\Theta}(\log n).

1 Introduction

Hypothesis testing is a classic problem in statistics: given samples from a distribution, determine whether or not it satisfies some property. Within the field of theoretical computer science, it has been studied under the name of distribution testing, as a subproblem within the broader area of property testing [Gol17]. Study of distribution testing was initiated by seminal works of Goldreich, Goldwasser, and Ron [GGR96], Goldreich and Ron [GR00], and Batu, Fortnow, Rubinfeld, Smith, and White [BFR+00]. The problem has since received extensive attention (see, e.g., [BFF+01, BKR04, Pan08, ADJ+11, BFRV11, Val11, VV11, ILR12, DDS+13, CDVV14, VV17, Wag15, AD15, ADK15, BV15, DKN15, DK16, Can16, BCG17, BC17, CDKS17, DDK18, DKW18, DGPP18, DGK+21, CJKL22], and [Rub12, BW18, Kam18, Can20, Can22] for surveys).

We now have a rich understanding of many core problems in this area. For example, the most classic question is uniformity testing: given samples from a discrete distribution pp over [n][n], test whether it is uniform over the domain versus ε\varepsilon-far from the uniform distribution in statistical distance. We have tight upper and lower bounds for this problem, demonstrating that the sample complexity of uniformity testing is Θ(n/ε2)\Theta(\sqrt{n}/\varepsilon^2) [GR00, Pan08, VV14, DKN15, ADK15, DGPP18]. In this work, we are concerned with equivalence testing (sometimes called two-sample testing or closeness testing): given samples from two discrete distributions pp and qq over [n][n], test whether they are equal versus ε\varepsilon-far from each other in statistical distance. The sample complexity for this problem is the more complex expression Θ(max⁡{nε2,n2/3ε4/3})\Theta\left(\max\left\{\frac{\sqrt{n}}{\varepsilon^2}, \frac{n^{2/3}}{\varepsilon^{4/3}}\right\}\right) [Val11, CDVV14].

Observe that the sample complexity for both these problems (and many others in distribution testing) is (strongly) sublinear in the domain size nn: ignoring dependence on ε\varepsilon, they are both Θ(nc)\Theta(n^c) for some 0<c<10 < c < 1. However, these bounds are tight, which can be problematic when the domain size nn is extremely large and thus any polynomial in nn is intractable. For example,

*New York University. g@csail.mit.edu. Supported by an NSERC Discovery Grant and an Ontario Early Researcher Award.

testing uniformity on the dd-dimensional Boolean hypercube requires Θ(2d/2)\Theta(2^{d/2}) samples, which remains exponential in the dimension. Motivated by testing over extremely large domains, Canonne, Ron, and Servedio [CRS14, CRS15] and Chakraborty, Fischer, Goldhirsh, and Matsliah [CFGM13, CFGM16] introduced the conditional sampling model. This model gives the algorithm stronger query access to the distributions being tested: rather than passively sampling from the distribution, the algorithm queries the distribution by specifying a query set S⊆[n]S \subseteq [n] and receiving a sample from the distribution conditional on being from SS. We use COND to denote this type of conditional sampling access; in contrast, we use SAMP to denote the standard sampling oracle.

COND can significantly reduce the complexity of many distribution testing problems. For example, uniformity testing (and the more general problem of identity testing, which tests whether pp is equal to a specific distribution on [n][n]) requires only Θ~(1/ε2)\tilde{\Theta}(1/\varepsilon^2) conditional samples [CRS14, FJO+^{+}15], entirely independent of the domain size, compared to Θ(n/ε2)\Theta(\sqrt{n}/\varepsilon^2) samples under SAMP. Equivalence testing also enjoys dramatic savings: under COND, equivalence testing needs only Θ~(log⁡log⁡n)\tilde{\Theta}(\log \log n) samples [FJO+^{+}15, ACK15b, CCK24, AFL26], doubly logarithmic in the domain size, compared to Θ(max⁡{nε2,n2/3ε4/3})\Theta\left(\max\left\{\frac{\sqrt{n}}{\varepsilon^2}, \frac{n^{2/3}}{\varepsilon^{4/3}}\right\}\right) samples under SAMP. Motivated by the power of COND, there has been significant investigation into its implications on distribution testing [Can15, FJO+^{+}15, ACK15b, RT16, FLV17, SSJ17, BCG17, KT19, Nar21, CKM23, CCKM24, AFL26, BBCS26], in particular under the more restrictive subcube conditioning model [BC18, CCK+^{+}21, CJLW21, BCSV23, AFL24, CM24, MKP25, CCR+^{+}25, GHKO26, LNQR26], as well as for adjacent problems such as group testing [ACK15a], sublinear algorithms [GTZ17], and crowdsourcing [GTZ18].

However, most algorithms in the conditional sampling model are adaptive: they assume that the results of a query can be observed before the algorithm specifies the next query set. One can thus naturally consider a non-adaptive variant, where the algorithm must specify all query sets in advance of observing their results. We use NACOND to denote the non-adaptive conditional sampling model. What is the difference between these models – how powerful is adaptivity? Prior work by Acharya, Canonne, and Kamath [ACK15b] showed that NACOND can be exponentially weaker than COND: they showed that even testing uniformity under NACOND requires Ω(log⁡n)\Omega(\log n) samples, whereas the harder problem of testing equivalence requires only O(log⁡log⁡n)O(\log \log n) samples [FJO +^{+}15]. However, later work of Kamath and Tzamos showed that NACOND remains exponentially stronger than SAMP: they give O(polylog⁡n)O(\text{poly}\log n) sample algorithms for uniformity, identity, and equivalence testing under NACOND, whereas even uniformity testing under SAMP requires Ω(n)\Omega(\sqrt{n}) samples [Pan08].

Thus, prior work has established exponential (or greater) separations between SAMP, COND, and NACOND for these testing problems. However, a significant algorithmic gap was left by Kamath and Tzamos [KT19]. Under NACOND, they gave an O~(log⁡n)\tilde{O}(\log n)-sample algorithm for uniformity testing, which nearly matches the Ω(log⁡n)\Omega(\log n) lower bound of Acharya, Canonne, and Kamath [ACK15b]. However, their algorithms for identity and equivalence testing were significantly worse, at O(log⁡2n)O(\log^2 n) and O(log⁡12n)O(\log^{12} n) samples respectively, significantly greater than the Ω(log⁡n)\Omega(\log n) lower bound (inherited from the easier problem of uniformity). This quantitative gap is in sharp contrast to both SAMP and COND, where we now have an essentially tight understanding of all three testing problems. A recent work of Chakraborty, Chakraborty, Kumar, and Meel (CCKM) [CCKM24] provided an algorithm for equivalence testing that requires O~(log⁡n)\tilde{O}(\log n) COND samples with only one round of adaptivity.

References (59)