In likelihood-free hypothesis testing (LFHT), given samples from two unknown distributions P,Q on [n] with dTV(P,Q)⩾ε, and from a third distribution D∈{P,Q}, the goal is to identify whether D=P or D=Q. We study asymmetric likelihood-free hypothesis testing, where the sample budgets sP and sQ for P and Q may differ, and characterize the feasible triples (sP,sQ,sD) up to logarithmic factors. We establish that unequal reference budgets can give a polynomial saving. For instance, for constant separation, n samples from P and n3/4 from Q allow testing with O(n1/4) samples from D, whereas both existing baselines—symmetric LFHT and unequal-sample closeness testing—require Ω(n) samples from D.
We further apply our results to non-adaptive distribution 2-clustering, where the sample allocation among k distributions must be fixed before observing any data. We obtain matching upper and lower bounds for this problem up to logarithmic factors in terms of the domain size, number of distributions, smaller cluster size, and separation, both with one cluster distribution known and with both unknown. Comparing with known bounds for adaptive sample allocation gives a worst-case adaptivity gap of Θ(k1/4).
1 Introduction
Likelihood-free inference arises when data can be simulated from a model, but its likelihood cannot be evaluated. In likelihood-free hypothesis testing (LFHT) (Gerber and Polyanskiy, 2024; Gerber et al., 2023), we observe samples from two unknown reference distributions P,Q on [n]={1,…,n} at total variation distance dTV(P,Q)⩾ε, and from a target distribution D∈{P,Q}. The goal is to identify D with probability at least 2/3. We write sP,sQ,sD for the three sample budgets.
While prior work gives tight bounds in the symmetric case sP=sQ (Gerber and Polyanskiy, 2024; Gerber et al., 2023), the asymmetric case sP=sQ is also of significant interest. For instance, an existing model may have many simulated samples available, while a new model has only a few. We ask how the extra samples from the first model reduce the number needed from the target distribution.
In this paper, we characterize the feasible triples (sP,sQ,sD) up to logarithmic factors. To exemplify the benefit of considering unequal samples, suppose that the separation ε is constant, and consider sP=n and sQ=n3/4. Discarding excess P-samples to use symmetric LFHT requires sD=Ω(n). Ignoring Q and testing closeness between P and D also requires sD=Ω(n). In contrast, using both reference batches, our bound gives sD=Θ(n1/4) (Section 3), thus providing a polynomial saving. The characterization also extends to more than two hypotheses (Appendix D). Here and below, O and Θ hide polylogarithmic factors in n and, for clustering, the number of distributions k.
1.1 Application to Non-Adaptive Clustering
In distribution 2-clustering, each of k input distributions equals one of two distributions P,Q with dTV(P,Q)⩾ε, and the goal is to recover their partition using as few total samples as possible. Prior work (Kumar et al., 2026) allows adaptive sampling, i.e., earlier sample outcomes can be used to decide which distribution to sample from next. We determine the sample complexity under non-adaptive sampling, i.e., the allocation must be fixed before observing any samples. If the smaller cluster has known size r, and both cluster distributions are unknown, the optimal total budget is
Tna(n,k,r,ε)=Θ(r1/3ε4/3k2/3n2/3+rε2kn+ε2k).
We also obtain matching upper and lower bounds up to logarithmic factors when one cluster distribution is known (Section 6). Comparing with the adaptive bounds of Kumar et al. (2026) gives a worst-case adaptivity gap of Θ(k1/4), resolving their open question. For example, when n=k, r≍k, and ε is constant, the adaptive and non-adaptive budgets are Θ(k) and Θ(k5/4), respectively.
The connection to LFHT comes from the observation that, once an exemplar from each cluster is identified, classifying the remaining distributions reduces to asymmetric LFHT, since the two exemplars may come with unequal sample budgets.
2 Preliminaries and Background
For the problem setup in Section 1, let RLF(ε) be the set of nonnegative integer triples (sP,sQ,sD) for which a test using these sample budgets has error at most 1/3 for every pair P,Q with dTV(P,Q)⩾ε and either choice D∈{P,Q}. Assume without loss of generality that sP⩾sQ, and set
α:=max{1,max{sP,sD}n}.(1)
The factor α equals one once either P or D has at least n samples.
For a distribution P on [n], let ∥P∥jj=∑iP(i)j and ∥P∥∞=maxiP(i). For distributions P,Q, let χ2(P∥Q)=∑xQ(x)(P(x)−Q(x))2. We will use the inequality dTV(P,Q)⩽21χ2(P∥Q), which follows from Cauchy–Schwarz. We write Poi(λ) for the Poisson distribution with mean λ⩾0 and poiλ(m)=e−λλm/m! for its probability at a nonnegative integer m.
The notation ≍logn hides constant and polylogarithmic factors in n in the sample budgets, and the symbols ≲,≳, and ≍ hide constant factors that are independent of all problem parameters. The hidden terms are often required to be sufficiently large without explicitly stating so.
Symmetric LFHT. Let RLFsym(ε) be the restriction of RLF(ε) to sP=sQ. Gerber and Polyanskiy (2024, Theorem 2) show that
The three conditions roughly correspond to (i) enough target samples for testing even if P and Q were known, (ii) enough reference samples such that P and Q are not too poorly sampled, and (iii) sufficient “joint information” through the product of sample counts.
2.1 Related Work
Distribution testing. Distribution testing refers to the task of testing whether a distribution has a given property using samples (Canonne, 2022). In identity testing, one must distinguish between dTV(P,Q)=0 and dTV(P,Q)⩾ε for a known distribution P and an unknown distribution Q. Uniformity testing is a special case where P is uniform. If both distributions are unknown, the problem is called closeness testing (Batu et al., 2000; Chan et al., 2014). Our test uses ingredients similar to those of these closeness testers, such as estimators of squared ℓ2 distances and sample-based flattening of Diakonikolas and Kane (2016).
LFHT. In information theory, classification with empirically observed statistics is a generalization of the Neyman–Pearson framework to situations where the candidate hypotheses are completely unknown but we instead have a set of training samples from them. This line of work was initiated by Ziv (1988) and Gutman (1989). Their work considered a fixed alphabet and studied the error exponents in terms of the size of the training and test sample sets. Kelly et al. (2013) and Huang and Meyn (2012) let the alphabet grow with the sample size, under equal training lengths and the assumption that no symbol has probability much larger than under the uniform distribution, and ask when consistent classification is possible at all. Gerber and Polyanskiy (2024) revisited the problem under the name likelihood-free hypothesis testing (LFHT), and shifted the focus from asymptotic exponents to finite-sample guarantees. For a fixed error probability and equal reference budgets, they characterize the sample complexity in terms of the domain size and the TV separation, for several classes of distributions including the discrete distributions considered here. Gerber et al. (2023) show that tests based on classification achieve near-optimal sample complexity, including the dependence on the error probability, and give the lower-bound construction that we adapt in Section 5. These works already trade off the target budget sD against a common reference budget. We determine the tradeoff when the two reference budgets sP and sQ themselves differ.
Clustering of distributions. Kumar et al. (2026) study the clustering problem from Section 1.1 with adaptive strategies and obtain matching upper and lower bounds up to logarithmic factors. Their algorithms first find an exemplar from each cluster and then classify the remaining distributions. In the non-adaptive setting, the allocation must be fixed before observing any samples, so the budgets for classification cannot depend on which exemplars are found. Kumar et al. (2026) ask whether this constraint makes non-adaptive sampling require strictly more samples. We answer this positively with a worst-case gap of Θ(k1/4) where k is the number of distributions. Clustering from bandit feedback (with adaptive sampling) was also studied by Yavas et al. (2025), but it is less directly related since it focuses on the sample complexity as the error probability tends to zero with the instance fixed, leaving the dependence on n, k, and r in lower-order terms.
3 Main Result
Our main result characterizes the feasible sample budgets for asymmetric LFHT; see also Appendix D for the extension to more than two hypotheses.
Theorem 1. For n⩾10 and ε∈(0,1/8], under the convention sP⩾sQ, we have
The three conditions share a similar interpretation to the symmetric case. The first condition is necessary even when both reference distributions are known. The second establishes that we require sufficiently many samples from at least one reference distribution. The third allows additional D-samples to compensate for fewer Q-samples.
The feasible region is a set in three dimensions. Figure 1 shows four slices of it at fixed values of sP, with ε constant. The lower boundary of each slice has up to three parts. On the horizontal part, the required sD does not depend on sQ. On the diagonal part, sQsD≍nα, so additional Q-samples lower the required sD. The vertical part comes from the convention sP⩾sQ. As sP grows, the lower boundary moves down until sP=n, and stays the same for larger sP, so additional P-samples no longer help. The diagonal part appears only when sP>n2/3. For smaller sP, the horizontal part already lies at sD⩾sP, and additional Q-samples do not reduce the required sD.
The dot in Figure 1 marks the example from the introduction, with ε constant, sP=n, and sQ=n3/4. Here α=1, and the third condition sD(n3/4+sD)≳n gives sD=Θ(n1/4). Both baselines need sD≳n, shown by the open circle.
Figure 1: Slices of the feasible region of Theorem 1 at four values of sP, with ε constant. Constant and logarithmic factors are suppressed, and both axes are logarithmic.
3.1 Proof Ideas
We summarize some of the main ideas here, and defer the details to Sections 4 and 5.
Our upper bound adapts the quadratic statistic used for symmetric LFHT (Gerber and Polyanskiy, 2024). First, the distributions P,Q are transformed into flattened distributions p~,q~ on a common expanded domain, preserving their TV distance while ensuring ∥p~∥∞=O((logn)/sP) and ∥q~∥∞=O((logn)/sQ) with high probability. After flattening, our algorithm estimates the difference between the squared ℓ2 distances from d~ to p~ and q~. Having more samples from P helps control not only the variance terms involving P, but also those involving Q. Specifically, the inequality
∥q~∥22⩽2∥p~∥22+2∥p~−q~∥22
allows us to control the terms involving Q in the variance of our test statistic using the better-sampled reference P and the squared separation between P and Q. Although larger separation may increase the variance, it also provides a distinguishing signal, which grows faster than the standard deviation.
The lower bound adapts the heavy/light construction of Gerber et al. (2023). On light pairs of domain elements, P has equal O(1/n) mass while Q has a random hidden deviation from uniformity. A single sample from such a pair is uninformative for distinguishing these two cases, so collisions are required in the sense of having either two D-samples or one D-sample and one Q-sample from the same pair. The collision requirements lead to an sD(sQ+sD) factor in the lower bound. On heavy pairs, all of P, Q, D coincide and have equal O(1/sP) mass; these pairs hide which collisions are informative, yielding an additional dependence on sP when it is below the domain size n.
4 Upper Bound
In this section, we prove the upper bound in Theorem 1. Recall the assumption sP⩾sQ, and let (sP,sQ,sD) satisfy the three conditions in (3), allowing polylogarithmic factors in n as indicated. We construct a test that distinguishes D=P from D=Q with error probability at most 31.
We specifically consider a triplet on the right-hand side of (3) and multiply all three budgets by Clogn for sufficiently large C, then relabel the resulting budgets as (sP,sQ,sD). This can only decrease α, and the condition on sD(sQ+sD) in (3) gains an additional factor of (logn)2, as required by the variance analysis in Section 4.1.2. We then proceed via three cases:
If sD≳ε2nα, run the closeness tester of Diakonikolas and Kane (2016) on P and D.
Otherwise, if sQ>n, run symmetric LFHT using sQ samples from each reference distribution.
Otherwise, run Algorithm 1 below with the number of P-samples truncated to n (discarding any beyond that if sP>n).
We proceed to show that the test succeeds in each case.
Case 1: In this case, sD≳ε2nα. By (3), the same lower bound holds for sP. We apply the closeness tester of Diakonikolas and Kane (2016, Proposition 2.11) to P and D. This tester succeeds provided
The first condition follows immediately from (3) and α⩾1. For the second condition, the case condition and (3) give min(sP,sD)2≳ε4nα. Multiplying by max(sP,sD) and using αmax(sP,sD)⩾n, we obtain
Case 2: In this case we have sP⩾sQ>n, and hence α=1. We use sQ samples from each reference distribution and apply the symmetric LFHT guarantee (2). Since the reference budget exceeds n, this test succeeds provided sD≳ε21, sQ≳ε2n, and sQsD≳ε4n. The first condition is already part of (3). Moreover, since case 1 was already ruled out, we have sD2≲ε4n, whereas the strengthened condition on sD(sQ+sD) gives sD(sQ+sD)≳(logn)2ε4n. Hence, the sD2 contribution can be absorbed in the hidden constants, and we obtain sQsD≳(logn)2ε4n. Dividing by sD≲ε2n yields sQ≳(logn)2ε2n (thus implying the same for sP). Hence, all the requirements of symmetric LFHT are met.
Case 3: In this case, we have sQ⩽n, and also sP⩽n by the above discarding rule. Note that the value of α is unchanged under such discarding: if we originally had sP⩽n then α≍n/sP, whereas if we originally had sP>n, then α=1, and after truncation sP=n, so again α=n/sP=1. The quantities sQ and sD, as well as the lower bound on sQsD, are unaffected.
Since case 1 was ruled out, we have sD2≲ε4nα. On the other hand, the above-mentioned strengthened condition on sD(sQ+sD) gives
sD(sQ+sD)≳(logn)2ε4nα.
Hence, the sD2 contribution can be absorbed in the hidden constants, and we obtain sQsD≳(logn)2ε4nα. Again using sD≲ε2nα, it follows that
sQ≳(logn)2ε2nα≳sD.
In particular, since sP⩾sQ, we have sP⩾sQ≳sD.
In summary, in case 3 we may assume the following conditions:
n⩾sP⩾sQ≳sD,α≍sPn,sQsD≳(logn)2ε4nα.(5)
It remains to specify the test (Algorithm 1 below) and show that it succeeds whenever (5) holds.
4.1 Our Algorithm
Our algorithm is described in Algorithm 1. As stated, it uses a random number of samples, but we later convert it to fixed sample budgets with only a constant-factor increase in sample complexity. It first uses independent samples from P and Q to flatten all three distributions on a common expanded domain, by splitting each element into several copies and distributing its probability mass uniformly among them (see Section 4.1.1). We let p~,q~,d~ denote the flattened distributions. We will see that flattening preserves total variation distances while controlling their largest probabilities.
The main quantity underlying our test is ∥p~−d~∥22−∥q~−d~∥22. Its sign identifies D: if D=Q, the quantity equals ∥p~−q~∥22>0, whereas if D=P, it equals −∥p~−q~∥22<0. Our algorithm constructs an unbiased estimator of this quantity. Expanding the squares, the ∥d~∥22 terms cancel, leaving
∥p~∥22−∥q~∥22−2j∑p~jd~j+2j∑q~jd~j.
The four terms comprising TLF in Algorithm 1 are unbiased estimators of ∥p~∥22, ∥q~∥22, ∑jp~jd~j, and ∑jq~jd~j, respectively. Thus, TLF is an unbiased estimator of the desired quantity, and its sign determines the output of the test.
Algorithm 1: Asymmetric LFHT in the regime n⩾sP⩾sQ≳sD
Input: Sample access to P,Q,D with dTV(P,Q)⩾ε and D∈{P,Q}, budgets sP,sQ,sD.
Output: D=P or D=Q.
1 Draw ⌈sP/2⌉ samples from P and ⌈sQ/2⌉ from Q for flattening.
2 Construct the common split domain [K] as in Section 4.1.1.
3 Independently draw testing batches of sizes Poi(sP), Poi(sQ), and Poi(sD) from P,Q,D, and map their samples to [K] as in Section 4.1.1. The mapped batches are samples from p~,q~,d~.
4 Let NjP,NjQ,NjD be the numbers of mapped testing samples taking value j∈[K].
We use the sample-based flattening of Diakonikolas and Kane (2016, Definition 2.4) (also used by Gerber and Polyanskiy (2024)). Let S be the multiset of the ⌈sP/2⌉ and ⌈sQ/2⌉ flattening samples. For each i∈[n], let Bi be one plus its number of occurrences in S, and split i into Bi elements. Since sQ⩽sP⩽n, the expanded domain has size
K=i=1∑nBi=n+⌈sP/2⌉+⌈sQ/2⌉⩽2n+2.
Identify [K] with {(i,a):i∈[n],a∈[Bi]}. For any distribution r on [n], its flattened version is r~(i,a)=Bir(i). To sample from r~, take a sample i from r and independently choose a uniformly from [Bi]. We apply this same transformation to all three testing batches, so d~∈{p~,q~}. By Diakonikolas and Kane (2016, Fact 2.5(ii)), splitting preserves total variation, so dTV(p~,q~)=dTV(P,Q)⩾ε. Moreover, we have the following ℓ∞-norm guarantees.
Lemma 2. With probability at least 1−1/n over S,
∥p~∥∞⩽sP32logn,∥q~∥∞⩽sQ32logn.
The proof is given in Appendix A.
4.1.2 Expectation, Variance, and Correctness
Fix any realization of the flattening samples S for which the bounds in Lemma 2 hold. This also determines p~,q~,d~. The testing batches are then independent samples from these three distributions. Let Δ2=∥p~−q~∥22. The vector p~−q~ has size K⩽2n+2⩽3n, so Cauchy–Schwarz gives ∥p~−q~∥1⩽K∥p~−q~∥2. Since ∥p~−q~∥1=2dTV(p~,q~)⩾2ε, it follows that
Δ2⩾K∥p~−q~∥12⩾3n4ε2.(6)
The following lemma states the expectation and variance needed for Chebyshev's inequality, and is proved in Appendix A.3.
Lemma 3. Suppose sP⩾sQ≳sD. Conditional on any S satisfying Lemma 2, the statistic in Algorithm 1 satisfies
By Lemma 3, TLF has mean −Δ2 if D=P and Δ2 if D=Q, so it suffices to show that its variance is small compared with Δ4. To do so, we write the condition on sD(sQ+sD) in (5) as
sQsD⩾C(logn)2ε4nα≳C(logn)2sPε4n2,
where C is a sufficiently large constant. Substituting into Lemma 3, we have
We choose C such that this is at most Δ4/6. Under either hypothesis, an incorrect answer requires a deviation of at least Δ2 from its mean, and hence
Pr[incorrectsign∣S]⩽Δ4Var[TLF]⩽61.
We proceed to summarize the other possible sources of error. The event of Lemma 2 fails with probability at most 1/n⩽1/10. To implement the Poissonized testing batches using fixed sample budgets, draw 2sP, 2sQ, and 2sD samples from P, Q, and D, respectively, and use only the first Poi(sR) samples from each source R∈{P,Q,D}. If any Poisson draw exceeds the corresponding available budget, an arbitrary output is produced and this is considered an error. Since Pr[Poi(s)>2s]⩽e−s/3 and every testing budget is ≳sD≳ε21, this happens with probability at most 301. The total error is therefore at most 1/6+1/10+1/30=3/10<1/3, completing the upper bound.
5 Lower Bound
We prove that the three conditions in Theorem 1 are necessary up to constant factors for every ε∈(0,1/8]. Recall that α=max(1,max(sP,sD)n). When sQ=0, the problem is closeness testing between P and D, and the required lower bound follows from Bhattacharya and Valiant (2015). Henceforth, we assume that sQ⩾1
(and thus sP⩾1 under our convention sP⩾sQ). We also assume that sD⩾1, since a tester with no D-samples has the same output distribution under both hypotheses, and hence errs with probability at least 21 under one of them.
The first two conditions follow by a reduction from the symmetric case, where the lower bounds of Gerber and Polyanskiy (2024, Propositions 13–15) hold up to constant factors. Suppose an asymmetric tester succeeds with sample sizes (sP,sQ,sD), where sP⩾sQ. Given sP samples from each of P and Q, and sD samples from D, we can run this tester using all the P- and D-samples and only the first sQ of the Q-samples. This gives a symmetric tester with budgets (sP,sP,sD) and the same success probability. Since α depends only on sP and sD, it is unchanged, so these lower bounds give sD≳1/ε2 and sP≳nα/ε2.
We prove the third condition sD(sQ+sD)≳ε4nα in three cases:
Case sP<sD. In this case the second condition gives sD>sP≳ε2nα, which immediately yields sD(sQ+sD)⩾sD2≳ε4nα.
Case sD⩽sP, sP>100n. In this case α⩽100, so it suffices to show that sD(sQ+sD)≳ε4n.
Give the tester P explicitly and increase its Q-budget to sQ+sD. Both changes make the problem easier. A successful asymmetric tester would therefore solve one-distribution-known LFHT with sQ+sD samples from Q and sD from D. Raising the Q-budget to sQ+sD makes it at least the D-budget, which Kumar et al. (2026, Remark 8) requires. The lower bound of Kumar et al. (2026, Lemma 7 and Remark 8), using the construction in Gerber and Polyanskiy (2024, Proposition 13), gives sD(sQ+sD)≳ε4n.
Case sD⩽sP⩽100n. Here α=sPn. It suffices to show
sPsD(sQ+sD)≳ε4n2,(7)
which we do in the next section.
5.1 Proof for the Case sD⩽sP⩽100n
Overview. To prove (7), we construct two priors Λ0 and Λ1 over asymmetric LFHT instances (P,Q,D), with D=P under Λ0 and D=Q under Λ1. With high probability, an instance drawn from either prior satisfies dTV(P,Q)⩾ε. We show that, when sPSD(sQ+sD) is sufficiently small, the sample distributions induced by Λ0 and Λ1 are close in total variation. On the other hand, any tester for RLF(ε) must distinguish D=P from D=Q, and hence must distinguish the two induced sample distributions with high probability. The contradiction yields the desired lower bound.
We adapt the heavy/light construction of Gerber et al. (2023, Appendix D.4). In that construction, perturbations are independent across light elements and cancel only in expectation. To simplify the calculations, we use the paired perturbations of Paninski (2008). Within each light pair, the weight added to one element is removed from the other, so the weight vectors wP,wQ,wD defined below have the same total weight in every realization. The domain is divided into independent pairs, each of which is either heavy or light. On a heavy pair, P, Q, and D assign the same masses to the two elements, and hence samples from such a pair contain no information about whether D=P or D=Q. Their role is instead to generate many uninformative within-pair collisions and thereby hide the informative collisions occurring on light pairs. On a light pair, P is uniform, whereas Q is tilted according to a hidden random sign η∈{±1}, assigning masses proportional to (1+8εη,1−8εη). Since η is chosen uniformly at random, after averaging over η the distribution of a single sample from a light pair is the same under the two hypotheses. Thus, useful information is revealed only when we get at least two samples from the same light pair. The main informative signals are a D−D collision, which reveals whether D itself is tilted, and a D−Q collision, which reveals whether D and Q share the same hidden tilt. A D−P collision is uninformative because P is uniform on every light pair. At a high level, the factor sD(sQ+sD) in the condition sD(sQ+sD)≳n2/(sPε4) captures the total D−D and D−Q collision signal, while the additional factor sP reflects the masking effect created by the heavy pairs.
1That bound assumes error probability 101 rather than 31, which costs a constant factor in every budget by majority vote.
Construction. Let
tP:=100sP,tQ:=100sQ,tD:=100sD,
and observe that 100⩽min(tQ,tD)⩽max(tQ,tD)⩽tP⩽n.
We construct two priors Λ0 and Λ1 on triples of probability distributions (P,Q,D). The construction first generates nonnegative weight vectors wP,wQ,wD and then normalizes them.
Let N:=⌊n/2⌋. Split [2N]⊆[n] into the pairs (2j−1,2j), j∈[N]. Each pair is independently declared heavy with probability γ:=4ntP and light otherwise. For every light pair, independently draw ηj∼Unif{±1}. We assign the weights on each pair as follows:
Pair
(wP(2j−1),wP(2j))
(wQ(2j−1),wQ(2j))
Heavy
(tP1,tP1)
(tP1,tP1)
Light
(2n1,2n1)
(2n1+8εηj,2n1−8εηj)
Since ε⩽81, these weights are nonnegative. Under Λ0, set wD:=wP, whereas under Λ1, set wD:=wQ. The total weight of a pair is the same under wP,wQ,wD. Consequently, if h denotes the number of heavy pairs, then all three weight vectors have the same total weight M:=tP2h+nN−h. Normalizing these weight vectors gives us the distributions
P:=MwP,Q:=MwQ,D:=MwD,
and we have D=P under Λ0 and D=Q under Λ1.
We define E:={h⩽2nNtP}, and show in the following lemma that this event has high probability and ensures valid instances.
Lemma 4. The event E satisfies Pr[Ec]⩽251. Moreover, on E, M⩾51 and dTV(P,Q)⩾ε.
In addition, we provide the following lemma stating that a successful tester can be transferred from fixed samples to Poissonized samples.
Lemma 5. Suppose there exists an algorithm A with sample sizes (sP,sQ,sD) satisfying sQ⩾1 and 1⩽sD⩽sP⩽100n, and success probability at least 32. Then there exists an algorithm which, when an instance (P,Q,D) is generated according to either prior Λβ, β∈{0,1}, and is given independent Poi(MtP), Poi(MtQ), and Poi(MtD) samples from P, Q, and D, respectively, determines whether D=P or D=Q with error probability less than 52.
The proofs of Lemma 4 and Lemma 5 are deferred to Appendix B.
Let Xi,Yi, and Zi denote the number of times element i∈[n] is observed among the Poi(MtP), Poi(MtQ), and Poi(MtD) samples drawn from P, Q, and D, respectively. Without loss of generality, any testing algorithm may be assumed to depend on the samples only through the counts (Xi,Yi,Zi)i∈[n], since, conditional on these counts, the ordering of the samples is independent of the underlying distributions. For each β∈{0,1}, let Pβ denote the distribution of (Xi,Yi,Zi)i∈[n] when the instance is generated according to the prior Λβ.
By the well-known Poisson thinning property, for any generated instance and every i∈[n],
Since the heavy/light choices and the signs are generated independently across the N pairs, the sample vectors associated with distinct pairs are independent under both priors Λ0 and Λ1.
For each j∈[N], let Vj:=(X2j−1,X2j,Y2j−1,Y2j,Z2j−1,Z2j) be the counts associated with the pair (2j−1,2j). As noted above, the vectors V1,…,VN are independent and identically distributed. We thus suppress j in the notation and use Pβpair, for β∈{0,1}, for the distribution of Vj under Λβ. Hence Pβ=(Pβpair)⊗N. The divergence associated with a single pair is bounded via the following lemma, proved in Appendix B.1.
If an asymmetric LFHT tester succeeds, Lemma 5 gives a test ψ distinguishing P0 and P1 with error less than 52 under either hypothesis. By Le Cam's testing inequality, its two error probabilities satisfy
1−dTV(P0,P1)⩽P0Pr[ψ=1]+P1Pr[ψ=0]<54,
so dTV(P0,P1)>51. We now show that this is impossible when the sample budget is too small.
For the N independent pairs, tensorization gives the identity
Consequently, if sPSD(sQ+sD)⩽ε4cn2 for a sufficiently small constant c, then χ2(P0∥P1)<254. Hence dTV(P0,P1)⩽21χ2(P0∥P1)<51, contradicting the bound above.
This proves (7), completing the case sD⩽sP⩽100n of the third condition, and with it the lower-bound direction of Theorem 1.
6 Application: Non-Adaptive Distribution 2-Clustering
We now apply the asymmetric bounds to distribution clustering. Throughout this section and Appendix C, we assume that n⩾10. The formal problem formulation is as follows:
The Non-Adaptive Distribution 2-Clustering Problem
Input: Sample access to k distributions {Di}i=1k over domain [n], parameter ε∈(0,1]. The distributions are queried non-adaptively. The per-distribution sample allocation (T1,…,Tk) is chosen as a (possibly random) function of n,k,ε, and the minority cluster size r alone, and all Ti samples are drawn from Di and simultaneously revealed to the learner.
Promise: Each input distribution equals either P or Q, where dTV(P,Q)⩾ε, and both occur at least once among the k distributions (i.e., non-empty clusters).
Goal: With probability at least 32, recover the partition into the P- and Q-clusters.
Variants: Either one cluster distribution is known, or both are unknown.
We write P,Q for the two clusters' distributions and {IP,IQ} for the corresponding partition. When one distribution is known, we take it to be P. As noted in Kumar et al. (2026), it can then be taken to be the uniform distribution U, so the partition is {IU,IQ}. 2 Throughout, r denotes the size of the smaller of the two clusters, so r∈[1,2k], and we focus on the case that r is known. We note that this knowledge is only used to fix the sample allocation, but not to classify the distributions once the samples are drawn. Moreover,
2The transformation of Goldreich (2020) maps a known distribution P on [n] to the uniform distribution on [6n], and maps any Q with dTV(P,Q)⩾ε to a distribution at distance at least 3ε from uniform. Applying it to every input changes our bounds only by constant factors.
Regime
One known distribution
Both distributions unknown
n≳rε4k2
Θ(rε2kn)
Θ(r1/3ε4/3k2/3n2/3)
rlogk≲n≲rε4k2
Θ(rε2kn)
Θ(rε2kn)
n≲rlogk
Θ(ε2k)
Θ(ε2k)
Table 1: Non-adaptive sample complexity Tna for k⩾200 and ε∈(0,1/8]. The notation Θ hides polylogarithmic factors. The bounds follow from Theorems 14, 16, 19 and 20.
instead of exact knowledge of r, any lower bound r0⩽r suffices, with the upper bounds then holding with r0 in place of r. Let T denote the total sample budget, so that ∑iTi⩽T always, and Tna(n,k,r,ε) is the minimum T for which some such algorithm returns the correct partition with probability ⩾32.
Our results, summarized in Table 1, establish nearly tight upper and lower bounds on Tna. We outline the algorithm and its analysis here, and defer the details to Appendix C. As in the adaptive case of Kumar et al. (2026), the complexity of our algorithms is the sum of the costs of two stages (here “stages” only refer to algorithmic steps rather than adaptive sampling steps):
Stage 1. Find one distribution from each cluster, called an exemplar.
Stage 2. Classify every distribution via LFHT, using the two exemplars as the hypotheses.
Stage 1 uses a random subset of Θ(rk) distributions, which contains a member of each cluster with constant probability. Because the allocation is fixed before the exemplars are identified, every distribution in this subset must receive enough samples to become an exemplar. When both distributions are unknown, one distribution of the subset, which we call the pivot, can receive more samples than the others. Stage 2 is then an instance of asymmetric LFHT, with the pivot as P, the other exemplar as Q, and each distribution being classified as D. We proceed to outline the analysis.
One known distribution. A random subset of Θ(rk) distributions contains at least one member of IQ with constant probability. The algorithm finds an exemplar of IQ by running a uniformity test on every member of the subset, then uses the exemplar’s samples as sample access to Q to classify all k distributions against (U,Q) with asymmetric LFHT at per-test error 9k1.
For the lower bound, we provide a reduction in Lemma 17, used for both variants, that turns a clustering algorithm into a tester for D=Q vs. D=U. After sorting the distributions by expected allocation, an averaging argument finds a lightly sampled index j such that the algorithm is unlikely to output the candidate partition formed by j together with the r−1 least-sampled indices. Planting D at position j, with these other r−1 distributions simulating Q, turns the clustering algorithm into a tester whose two sample sizes are an O(kr)- and an O(k1)-fraction of the budget respectively, thus allowing us to invoke a known lower bound for testing.
By formalizing the above outlines, for k⩾200 and ε∈(0,1/8], Theorems 14 and 19 give the following sample complexity with one known distribution:
Tna(n,k,r,ε)=Θ(rε2kn+ε2k).
Both distributions unknown. The upper bound keeps the two-stage structure. Stage 1 draws a sketch from a pivot iA and runs the unequal-samples closeness test of Diakonikolas and Kane (2016) against every other member of a random size-Θ(rk) subset, which yields an exemplar iB of the other cluster. Stage 2 classifies all k distributions against (DiA,DiB) by asymmetric LFHT.
The lower bound with one known distribution also applies when both are unknown, and this is combined with a separate argument specific to the both-unknown case. That argument again applies the reduction of Lemma 17, this time into a tester for D=P vs. D=Q. After ordering the indices by expected allocation, the reduction places Q at the r−1 least-sampled indices, the planted distribution D at another lightly sampled index j, and P at all remaining indices. With T samples total, the number of queries is O(Tr/k) to the Q-oracle, O(T/k) to the D-oracle, and (trivially) at most T to the P-oracle. The three-way tradeoff sPSD(sQ+sD)≳ε4n2 then translates into k2T3r≳ε4n2, thus giving an Ω(r1/3ε4/3k2/3n2/3) lower bound.
We note that the three-way tradeoff is essential. In particular, planting a pair from the unequal-samples closeness-testing lower bound of Bhattacharya and Valiant (2015) yields only Ω(r2/3ε4/3k2/3n2/3), which is worse by a factor of r1/3.
By formalizing the above outlines, under the same assumptions as the one-known setting, Theorems 16 and 20 give the following characterization with both distributions unknown:
Tna(n,k,r,ε)=Θ(r1/3ε4/3k2/3n2/3+rε2kn+ε2k).
Observe that at r=1 the first term is ε4/3k2/3n2/3, and at r=2k it is the LFHT-derived rate ε4/3k1/3n2/3 of Kumar et al. (2026).
Adaptivity gap. Let Ta denote the adaptive sample complexity when both cluster distributions are unknown and r is known. Comparing our bounds with those of Kumar et al. (2026) gives Tna/Ta=O(k1/4) throughout the above parameter range. As a specific example, the upper limit is attained (up to logarithmic factors) when n=k, r≍k, and ε is constant:
Ta=Θ(k),Tna=Θ(k5/4).
The details are given in Appendix C.4.
7 Conclusion
In this paper, we characterized the sample budgets (sP,sQ,sD) for which asymmetric likelihood-free hypothesis testing is possible, up to logarithmic factors. From this characterization, we were able to derive tight sample complexity bounds for non-adaptive distribution 2-clustering. Among other things, we demonstrated that allowing unequal samples in (sP,sQ) can polynomially reduce the required sD; for instance, with n samples from one reference distribution and n3/4 from the other, O(n1/4) target samples suffice, whereas prior work required Ω(n). Moreover, using asymmetric LFHT as a stepping stone, we established the optimal sample complexity of non-adaptive 2-clustering up to logarithmic factors, revealing an adaptivity gap of up to O(k1/4).
Acknowledgements
This work is supported by the National Research Foundation (NRF) Singapore and the Ministry of Digital Development and Information (MDDI) under the AI Visiting Professorship (Award AIVP-2024-003).
AI Disclosure
The lower bound in Section 5 was developed with substantial help from an AI model (Claude). We reworked the argument ourselves to make it readable and to give intuition. The model also helped us check the proofs in most other parts of the paper. We take full responsibility for the correctness, presentation, and communication of the results.
References
Tugkan Batu, Lance Fortnow, Ronitt Rubinfeld, Warren D. Smith, and Patrick White. Testing that distributions are close. In Symposium on Foundations of Computer Science (FOCS). IEEE, 2000. ↑2
Bhaswar Bhattacharya and Gregory Valiant. Testing closeness with unequal sized samples. In Advances in Neural Information Processing Systems, 2015. ↑7, 12
Clément L. Canonne. Topics and techniques in distribution testing: A biased but representative sample. Foundations and Trends in Communications and Information Theory, 19(6):1032–1198, 2022. ↑2
Siu-On Chan, Ilias Diakonikolas, Gregory Valiant, and Paul Valiant. Optimal algorithms for testing closeness of discrete distributions. In ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM, 2014. ↑2, 23
Ilias Diakonikolas and Daniel M. Kane. A new approach for testing properties of discrete distributions. In Symposium on Foundations of Computer Science (FOCS), 2016. Full version available as arXiv:1601.05557. ↑2, 5, 6, 11, 22, 23
Patrik R. Gerber, Yanjun Han, and Yury Polyanskiy. Minimax optimal testing by classification. In Conference on Learning Theory (COLT). PMLR, 2023. ↑1, 3, 4, 8
Patrik Róbert Gerber and Yury Polyanskiy. Likelihood-free hypothesis testing. IEEE Transactions on Information Theory, 70(11):7971–8000, 2024. ↑1, 2, 3, 4, 6, 8, 14, 27
Oded Goldreich. The uniform distribution is complete with respect to testing identity to a fixed distribution. In Computational Complexity and Property Testing: On the Interplay Between Randomness and Computation. Springer International Publishing, 2020. ↑10
Michael Gutman. Asymptotically optimal classification for multiple tests with empirically observed statistics. IEEE Transactions on Information Theory, 35(2):401–408, 1989. ↑3
Dayu Huang and Sean Meyn. Classification with high-dimensional sparse samples. In IEEE International Symposium on Information Theory, 2012. doi: 10.1109/ISIT.2012.6283985. ↑3
Benjamin G. Kelly, Aaron B. Wagner, Thitidej Tularak, and Pramod Viswanath. Classification of homogeneous data with large alphabets. IEEE Transactions on Information Theory, 59(2):782–795, 2013. ↑3
Gunjan Kumar, Yash Pote, and Jonathan Scarlett. A distribution testing approach to clustering distributions. In Conference on Learning Theory. PMLR, 2026. ↑1, 2, 3, 8, 10, 11, 12, 22, 25, 26, 28
Liam Paninski. A coincidence-based test for uniformity given very sparsely sampled discrete data. IEEE Transactions on Information Theory, 54(10):4750–4755, 2008. ↑8, 22
Recep Can Yavas, Yuqi Huang, Vincent Y. F. Tan, and Jonathan Scarlett. A general framework for clustering and distribution matching with bandit feedback. IEEE Transactions on Information Theory, 2025. ↑3
Jacob Ziv. On classification with empirically observed statistics and universal data compression. IEEE Transactions on Information Theory, 34(2):278–286, 1988. ↑3
A Proofs for the Upper Bound
A.1 Flattening
We restate and prove the flattening lemma from Section 4.1.1.
Lemma 2. With probability at least 1−1/n over S,
∥p~∥∞⩽sP32logn,∥q~∥∞⩽sQ32logn.
Proof. We first prove the bound for P. Let N(i) count the copies of i in S, so Bi=1+N(i). The count N(i) is a sum of independent indicators from the two flattening batches, so
E[N(i)]=⌈sP/2⌉p(i)+⌈sQ/2⌉q(i)⩾sPp(i)/2.
Each of the Bi pieces created from i has mass p(i)/Bi, so we bound this ratio for every i.
If sPP(i)<32logn, the original mass is already small enough:
Bip(i)⩽p(i)<sP32logn.
Otherwise, we use concentration to ensure that i is split into enough pieces. Since E[N(i)]⩾sPP(i)/2⩾16logn, the Chernoff bound gives
Pr[N(i)<8sPp(i)]⩽exp(−649sPp(i))⩽n−4.
Whenever N(i)⩾sPP(i)/8, the mass of each piece satisfies
Bip(i)⩽sP8⩽sP32logn.
The same argument applies to Q. A union bound over the n elements for both distributions gives total failure probability at most 2n⋅n−4⩽1/n, proving the lemma.
A.2 Poisson Moments and Variance
This subsection proves a general variance bound for TLF. We adapt the quadratic-statistic analysis of Gerber and Polyanskiy (2024, Proposition 5 and Appendix D) to independent Poisson batches with unequal sizes.
Lemma 7. Let N∼Poi(λ) and, where stated, N′∼Poi(μ) independent of N. Then
Proof. Throughout the proof, we shorten ∑i∈[K] to ∑i.
Expectation. For the statistic in Algorithm 1, (8) gives sP2E[NiP(NiP−1)]=p~i2 and similarly q~i2 for the Q-term. By independence, sPsDE[NiPNiD]=p~id~i and sQsDE[NiQNiD]=q~id~i. Summing over i gives
Variance. Counts for distinct i values are independent, so the variance of each of the four components below is the sum of individual variances across i. We bound Var[TLF] using the decomposition
The bounds on ∥p~∥∞ and ∥q~∥∞ are from Lemma 2, and the bound on ∥p~∥22 follows from ∥p~∥22⩽∥p~∥∞∑ip~i=∥p~∥∞. For q~, the triangle inequality and (a+b)2⩽2a2+2b2 give
∥q~∥22=∥p~+(q~−p~)∥22⩽2∥p~∥22+2Δ2.
Since d~∈{p~,q~} and sQ⩽sP, the bounds on d~ follow from those on p~ and q~.
We bound each term of the variance bound (13) of Proposition 8 using (16) and the following elementary inequalities:
(N1) ∥r~∥33⩽∥r~∥∞∥r~∥22.
(N2) ∑iuivi2⩽∥u∥∞∥v∥22 and ∑iui2vi⩽∥v∥∞∥u∥22.
Since sP⩾sQ≳sD, the denominators satisfy sP3, sPsQ2, sP2sD≳sPsQsD and sP2⩾sQ2≳sQsD, so summing the bounds gives the lemma.
B Proofs for the Lower Bound
We restate and prove the lemmas deferred from Section 5.1, using the construction and notation from that section.
Lemma 4. The event E satisfies Pr[Ec]⩽251. Moreover, on E, M⩾51 and dTV(P,Q)⩾ε.
Proof. The number of heavy pairs satisfies
h∼Bin(N,4ntP),E[h]=4nNtP.
The complement Ec is the event h>2E[h]. By a Chernoff bound,
Pr[Ec]⩽exp(−3E[h]).
Recalling that 100⩽tP⩽n and N=⌊n/2⌋, we have
E[h]=4nNtP⩾899.
Consequently,
Pr[Ec]⩽e−33/8<251.
Since tP⩽n, the total mass satisfies M⩾N/n⩾1/5. On E, we have 2h/tP⩽N/n and h⩽N/2, which gives
M=tP2h+nN−h⩽nN+nN−h⩽n3(N−h).
The weights coincide on heavy pairs, and each light pair contributes 8ε/n to their ℓ1 distance. Hence,
dTV(P,Q)=nM4(N−h)ε⩾34ε⩾ε.
Lemma 5. Suppose there exists an algorithm A with sample sizes (sP,sQ,sD) satisfying sQ⩾1 and 1⩽sD⩽sP⩽100n, and success probability at least 32. Then there exists an algorithm which, when an instance (P,Q,D) is generated according to either prior Λβ, β∈{0,1}, and is given independent Poi(MtP), Poi(MtQ), and Poi(MtD) samples from P, Q, and D, respectively, determines whether D=P or D=Q with error probability less than 52.
Proof. Let KP, KQ, and KD denote the numbers of available samples from P, Q, and D, so that, conditional on the generated instance, KR∼Poi(MtR) independently for R∈{P,Q,D}. Let F be the event that KR⩾sR for every R. The new algorithm B retains the first sR samples from each R and runs A on them if F occurs, and outputs an arbitrary answer otherwise.
The construction gives M⩾N/n⩾51, so MtR⩾20sR for every R. The Poisson lower-tail bound Pr[K⩽(1−δ)λ]⩽e−δ2λ/2 for K∼Poi(λ), applied with δ=2019, gives
Pr[KR<sR]⩽Pr[KR⩽20MtR]⩽e−9sR⩽e−9,
so by a union bound Pr[Fc]⩽3e−9<10−3.
Conditional on a fixed generated instance and on F, the retained observations are exactly sP, sQ, and sD independent samples from P, Q, and D. On E∩F, the retained samples form a valid LFHT instance, so A fails with probability at most 31. Under either prior, we therefore have
Pr[Bfails]⩽31+Pr[Ec]+Pr[Fc]⩽31+251+10−3<52.
B.1 Proof of Lemma 6
We restate the lemma as follows, and then prove it via three supporting lemmas.
Recall from Section 5.1 that 100⩽tQ,tD⩽tP⩽n. For R∈{P,Q,D}, define
λR:=2ntR,μR:=tPtR.
Hence, a heavy element of weight 1/tP has expected count μR among the R-samples. For light elements, the weights 1/(2n) and (1±8ε)/(2n) give expected counts λR and λR(1±8ε), respectively. In particular, μP=1.
Fix a pair (2j−1,2j) of domain elements from the construction. Let x=(x1,x2) record how often these two elements appear among the P-samples, and define y=(y1,y2) and z=(z1,z2) similarly for the Q- and D-samples. For x,y,z∈N2, define
Observe that H(x,y,z) equals the probability of observing these counts for a heavy pair, and the function L gives the corresponding probability when wP,wQ,wD all assign weight 1/(2n) to each element of the pair.
On a light pair, wQ instead assigns weights (1+8ε)/(2n) and (1−8ε)/(2n) in a random order. We account for both possible orders with the function g, defined for a,b∈N by
Proof. We first consider a light pair. Recall that L(x,y,z) is the probability of the counts when all three weight vectors give the two elements equal weight 1/(2n). Suppose that the first element has the larger Q-weight. The tilt preserves the total weight of the pair and multiplies the first and second Q-weights by 1+8ε and 1−8ε, respectively. The probability of observing counts y1,y2 is therefore multiplied by
(1+8ε)y1(1−8ε)y2.
If the second element has the larger Q-weight, we interchange 1+8ε and 1−8ε.
Recall the priors Λ0 and Λ1 defined in Section 5.1. Under Λ0, both wP and wD give each element weight 1/(2n). Averaging over the two possible orders of the Q-weights gives the count probability L(x,y,z)g(y1,y2). Under Λ1, we have D=Q, so the D-samples use the same orientation as the Q-samples. The first element is observed y1+z1 times across these two batches, and the second is observed y2+z2 times. The same argument therefore gives L(x,y,z)g(y1+z1,y2+z2).
A heavy pair has count distribution H under both priors. Combining the heavy and light cases, which occur with probabilities γ and 1−γ, gives the stated formulas.
For y=(y1,y2) and z=(z1,z2), let
∣y∣:=y1+y2,∣z∣:=z1+z2.
To compare the two light-pair probabilities, let B be the difference between the two values of g:
B(y,z):=g(y1,y2)−g(y1+z1,y2+z2).
Lemma 10. For every y,z∈N2,
(1) B(y,z)=0 unless ∣z∣⩾1 and ∣y∣+∣z∣⩾2.
(2) ∣B(y,z)∣≲ε22∣y∣+∣z∣.
Proof. If ∣z∣=0, the two terms defining B(y,z) coincide. If ∣y∣+∣z∣⩽1, both values of g equal one, since g(a,b)=1 for a+b⩽1. This proves the first claim.
For the second claim, view B(y,z) as a polynomial in v=8ε. Its constant terms cancel, and averaging over the two signs removes all odd powers, so every surviving term has degree at least two. By the binomial theorem, the sum of the absolute coefficients of (1+v)a(1−v)b is at most
r=0∑as=0∑b(ra)(sb)=2a+b.
Averaging over the signs cannot increase this sum. Hence, the sum of the absolute coefficients of B(y,z) is at most 2∣y∣+2∣y∣+∣z∣. Since v⩽1 and all surviving powers are at least two,
By Lemma 10, B(y,z)=0 unless ∣z∣⩾1 and ∣y∣+∣z∣⩾2. Hence, if ∣z∣⩾2, there is no restriction on y. If ∣z∣=1, we need ∣y∣⩾1. The same lemma gives B(y,z)2≲ε44∣y∣4∣z∣. After this substitution, the summand is a product of a function of y and a function of z, so the two sums can be evaluated separately. For ∣z∣⩾2, Lemma 11 gives
For ∣z∣=1 and ∣y∣⩾1, every term is nonnegative, so enlarging the D-sum from ∣z∣=1 to ∣z∣⩾1 can only increase it. We can then apply Lemma 11 with m=1 to both sums:
Remark 12 (Average-case form of (7)). We claim that the lower bound (7) also holds if the tester is required to have error probability at most 31 on average under each conditional prior Λβ(⋅∣E), where β∈{0,1}, E is the high-probability event in Lemma 4, and Λβ are the priors specified in Section 5.1. The analysis is unchanged except for the Poissonization step in Lemma 5. For that step, let e(I) be the error probability of the tester on a fixed instance I, and let F be the sufficient-samples event from the proof of Lemma 5. Conditional on I, the sample counts are independent of the retained sample values, and hence the contribution to the conditional error probability on the event F satisfies
EI∼Λβ(⋅∣E)[e(I)Pr(F∣I)]⩽EI∼Λβ(⋅∣E)[e(I)]⩽31.
Adding Pr(Ec)⩽1/25 and Pr(Fc∣E)<10−3 then gives the same error bound as before, namely 1/3+1/25+10−3<2/5, under each unconditioned prior. The rest of the proof in Section 5.1 is unchanged.
C Non-Adaptive Distribution Clustering
This appendix gives the algorithms and proofs for the 2-clustering results in Section 6.
C.1 Upper Bounds with One Known Distribution
This subsection proves the upper bounds with one known distribution summarized in Section 6, using the model and quantities r, T, Tna defined therein. The matching lower bound is proved in Section C.3.2. Recall from Section 6 and (Kumar et al., 2026) that it suffices to consider the case that the known distribution is uniform, and accordingly denoted by U.
C.1.1 Baseline
Uniformity testing in the sparse regime was studied by Paninski (2008). We use the identity tester of Diakonikolas and Kane (2016, Proposition 2.7), specialized to uniformity, which applies throughout our parameter range.
Theorem 13. Tna(n,k,r,ε)=O(ε2knlogk) when one distribution is known.
Proof. Since the known distribution is U, each input distribution satisfies Di=U or dTV(Di,U)⩾ε. Run this uniformity test on each input distribution at per-test error 9k1, costing O(ε2nlogk) samples per input distribution, and assign i to IU or IQ by the outcome. A union bound over the k input distributions gives success ⩾98, for a total of O(ε2knlogk).
C.1.2 Improved Upper Bound
With the known distribution being U, the task is to find the hidden partition {IU,IQ}. Algorithm 2 implements the two stages sketched in Section 6.
Algorithm 2: Non-adaptive 2-clustering with one known distribution.
Input: Parameters s0,s1,s2∈N.
Output: Partition of [k].
1 Set ℓ=⌈18log(9k)⌉
2 Pick a uniformly random subset S⊂[k] with ∣S∣=min{k,⌈r3k⌉}
3 Draw s0+ℓ(s1+s2) samples from each i∈S and ℓs2 samples from each i∈[k]∖S
4 for i∈S do
5 Run a uniformity test on the first s0 samples from i, with per-test error 9∣S∣1
6 Let i∗ be any rejected distribution if one exists. Otherwise, return an arbitrary size-(r,k−r) partition (or alternatively declare failure)
7 for i∈[k] do
8 Run asymmetric LFHT for (U,Di∗) in ℓ independent repetitions, each using samples generated from U and disjoint batches of s1 samples from i∗ and s2 from Di, and classify Di by majority vote
9 return the partition
Theorem 14. For r∈[1,2k], Algorithm 2 solves 2-clustering with success probability ⩾2/3 using
T=⎩⎨⎧O(rε2kn)O(ε2klogk)ifn≳rlogk,ifn≲rlogk
samples.
Proof. Stage 1 uses s0=O(nlogk/ε2) samples per member of S, for a total of O(kn/(rε2)). With probability at least 7/9, the subset contains a member of IQ and all its uniformity tests are correct, so i∗∈IQ.
For Stage 2, use U as the more heavily sampled reference in Theorem 1. Since U is known, its samples can be generated directly without using the input-distribution budget. Generating enough of them makes α=1 and satisfies the condition on the larger reference budget. By Theorem 1, it suffices to take any pair (s1,s2) satisfying the following and inflate it by a polylogarithmic factor:
s2≳ε21,s2(s1+s2)≳ε4n.
Accordingly, we choose
s2=Θ(max{ε21,rε2n}),s1=rs2.
The two terms in the maximum ensure the conditions s2≳1/ε2 and s1s2=rs22≳n/ε4 prior to the polylogarithmic increase, and the Θ notation captures the required increase.
The ℓs1 samples must be reserved for every member of S, since i∗ is selected only after sampling. Since ℓ=Θ(logk), Stage 2 costs
This also covers Stage 1 since r⩾1, and gives the two stated regimes. The Stage 2 batches are independent of the samples used to choose i∗. For each classification, the ℓ repetitions use disjoint samples and independent internal randomness. Hoeffding's inequality bounds the majority-vote error by e−ℓ/18⩽1/(9k). The reference batches may be reused across classifications. A union bound over the k classifications gives Stage 2 failure at most 1/9, and total failure at most 2/9+1/9=1/3.
C.2 Upper Bounds with Both Distributions Unknown
The non-adaptive setting is as in Section 6. Here both cluster distributions P, Q are unknown, and the task is to find the hidden partition {IP,IQ}. We prove the upper bounds here and the matching lower bound in Section C.3.3.
C.2.1 Baseline
Here the analog of Theorem 13 is given as follows.
Theorem 15. Tna(n,k,r,ε)=O(klogk⋅max(ε4/3n2/3,ε2n)) when both distributions are unknown.
Proof. Fix an arbitrary index iA∈[k], and let its distribution DiA be the one given more samples, recalling that we refer to iA as the pivot. By assumption in the problem formulation, the other k−1 distributions all satisfy Di=DiA or dTV(Di,DiA)⩾ε. Run a closeness test between DiA and each Di (Chan et al., 2014) at per-test error 9k1, costing O(max(ε4/3n2/3,ε2n)logk) samples per test (the pivot's samples are drawn once and reused), and cluster [k] according to the outcomes. A union bound over the k−1 tests gives success ⩾98, for a total of O(klogkmax(ε4/3n2/3,ε2n)).
C.2.2 Improved Upper Bounds
We improve on the baseline bound with Algorithm 3, which implements the two stages sketched in Section 6. A random size- Θ(rk) subset S supplies an exemplar of each cluster, an element iA of S serving as the pivot, and asymmetric LFHT then classifies all k distributions against the two exemplars.
Stage 1 uses the closeness tester of Diakonikolas and Kane (2016) with unequal sample sizes, which we denote by UST. Given m samples from one distribution and m′⩽m from another, it decides whether the two are equal or at total variation distance at least ε, with error at most 31, provided that
m′≳ε2nandm′2m≳ε4n2.
These are the conditions in (4). Taking the majority of O(logk) independent runs reduces the error to 9∣S∣1, and we will use this guarantee in the proof below.
Algorithm 3: Non-adaptive 2-clustering with both distributions unknown.
Input: Parameters sa,sb,sP,sQ,sD∈N.
Output: Partition of [k].
1 Set ℓ=⌈18log(9k)⌉
2 Pick a uniformly random subset S⊂[k] with ∣S∣=min{k,⌈r3k⌉}, and let iA be any element of S
3 Draw sa+ℓ(sP+sD) samples from iA, sb+ℓ(sQ+sD) samples from each i∈S∖{iA}, and ℓsD samples from each i∈[k]∖S
4 for i∈S∖{iA} do
5 Run UST for (DiA,Di) using the sa samples from iA as sketch and the sb samples from i as test,
at per-test error 9∣S∣1
6 Let iB be any i∈S∖{iA} whose test rejected if one exists. Otherwise return an arbitrary size-(r,k−r) partition (or alternatively declare failure)
7 for i∈[k] do
8 Run asymmetric LFHT for (DiA,DiB) in ℓ independent repetitions, each using disjoint batches of sP samples from iA, sQ from iB, and sD from Di, and classify Di by majority vote
9 return the partition
Theorem 16. For r∈[1,2k], Algorithm 3 solves 2-clustering with success probability ⩾2/3 using
where the logarithmic factor covers the repetitions needed for error 9∣S∣1. Since sa⩾sb, the guarantee of UST requires sb≳ε2n and sb2sa=rksb3≳ε4n2, which both hold. The Stage 1 cost is
sa+∣S∣sb≍rksb=O(max((rε2nk)2/3,rε2kn)).
Unless S=[k], we have ∣S∣⩾r3k, and each cluster has at least r members, so a given cluster has no member in S with probability at most (1−kr)∣S∣⩽e−3<181. Hence S contains a member of each cluster except with probability 91, and a union bound over the ∣S∣−1 tests, each at error 9∣S∣1, gives total Stage 1 failure ⩽92. On Stage 1 success, some i∈S∖{iA} lies in the cluster opposite iA and its test rejects, while every same-cluster test accepts, so iB is defined and lies in the opposite cluster.
In Stage 2, apply Theorem 1 with the pivot iA as the more heavily sampled reference, so one run uses sample sizes (sP,sQ,sD). Choose
where the polylogarithmic factor in Θ is the one required by Theorem 1. The second and third terms in the maximum give the following conditions (before the required logarithmic increase):
sQsD=rsD2≳ε4n,sPsQsD=krsD3≳ε4n2,
which together imply sQsD≳nα/ε4 for α=max{1,n/sP}. Moreover, sP⩾sQ⩾sD gives sP2⩾sQsD≳nα/ε4, and the first term ensures sD≳1/ε2. The LFHT test analyzed in Section 4 therefore has error probability at most 1/3 with these budgets.
Fix the choices and samples from Stage 1, and suppose it succeeds. Then iA and iB belong to different clusters. The reserved Stage 2 samples are independent of the Stage 1 samples. For each input Di, the ℓ LFHT runs use disjoint batches and independent internal randomness. Hoeffding's inequality therefore bounds the majority-vote error by e−ℓ/18⩽1/(9k). We use the same reference samples for all k inputs. By a union bound, the probability of any wrong classification is at most k⋅1/(9k)=1/9.
We must allocate samples before choosing iB, so we reserve ℓsQ reference samples for every candidate in S∖{iA}. Since ℓ=Θ(logk), the Stage 2 cost is
Thus Stage 1 is covered by the same bound. Comparing the first two terms gives the threshold n=k2/(rε4). For n≲rlogk, all three terms are O(k/ε2). This gives the stated regimes. The total failure probability is at most 2/9+1/9=1/3.
C.3 Lower Bounds
The two lower bounds use a common reduction, Lemma 17, from a clustering algorithm to an LFHT tester. A clustering algorithm with total budget T gives an LFHT tester with sP=T, sQ=O(kTr), and sD=O(kT). We then apply the LFHT lower bounds with one known distribution and with both unknown.
We may assume that the clustering algorithm succeeds with probability at least 10099. For instance, repeating it a constant number of times and taking the majority output achieves this, multiplies T by a constant, and keeps the algorithm non-adaptive.
C.3.1 The Reduction from LFHT
To turn a clustering algorithm into an LFHT tester, we place the unknown distribution D at a lightly sampled index and use the output partition to distinguish D = P from D = Q. This follows the ideas of Kumar et al. (2026, Appendix E.2, Lemmas 22–23).
We order the indices by expected number of samples. The tester places copies of Q at the first r−1 indices, the unknown distribution D at one more index j with few expected samples, and copies of P everywhere else. If D = Q, the small cluster is the first r−1 indices together with j, and the algorithm returns this partition with high probability. If D = P, the instance has only r−1 copies of Q and need not satisfy the clustering promise. We do not assume correctness on this instance. Instead, an averaging argument lets us choose j so that the algorithm rarely returns that same candidate partition. The output therefore reliably reveals whether D = Q or D = P.
Non-adaptivity lets us control the Q-budget as well. Since the allocation is fixed before observing any samples, the copies of Q at the least-sampled indices have total expected sample count at most kT(r−1) under either LFHT hypothesis. Capping their sample count at a constant multiple of this bound gives a Q-budget of O(kTr), with only a small probability of aborting. Together with the lightly sampled index j, this gives budgets (T,O(kTr),O(kT)), whereas the reduction of Kumar et al. (2026) allows T samples from each reference. The smaller Q-budget lets us apply the asymmetric lower bounds of Section 5.
The formal reduction is stated as follows.
Lemma 17. Let k⩾200 and 1⩽r⩽k/2, and let A be a non-adaptive algorithm for 2-clustering, with one known distribution or with both unknown. Suppose its (possibly random) allocation (T1,…,Tk) satisfies ∑iTi⩽T, and it returns the correct size- (r,k−r) partition with probability at least 10099 on every valid instance. Let Λ be a distribution over pairs (P,Q) with dTV(P,Q)⩾ε, where P is fixed and known in the first variant. Then there exists an algorithm A′ that decides whether D=P or D=Q using
sP=T,sQ=min(⌈k40Tr⌉,T),sD=min(⌈k160T⌉,T)
samples from P, Q, and D, respectively. Under each hypothesis, its error averaged over (P,Q)∼Λ is at most 101. Moreover, sD⩽4sQ and T⩾k/5, and hence
sP=T,sQ=O(Tr/k),sD=O(T/k).(17)
Proof. Let I^ be the output of A. Relabel the indices so that E[T1]⩽⋯⩽E[Tk]. The allocation is non-adaptive, so its distribution does not depend on the instance.
Choice of j. For each j∈{r,…,k}, let Sj:={1,…,r−1}∪{j} and Πj:={Sj,[k]∖Sj}. These candidate partitions are distinct, including when r=k/2. Consider the random instance (P,Q)∼Λ, Di=Q for i<r, Di=P for i⩾r. This comparison instance has only r−1 copies of Q and need not satisfy the clustering promise. We use only the distribution of the algorithm's output on it, without assuming correctness. We show that there exists j∈{r,…,k} such that:
• Pr[I^=Πj]⩽k4, and
• E[Tj]⩽k4T.
The events {I^=Πj}j⩾r are mutually exclusive, so ∑j⩾rPr[I^=Πj]⩽1, and by averaging, more than half of the j⩾r satisfy Pr[I^=Πj]⩽k−r+12⩽k4 (using r⩽2k). Likewise ∑j⩾rE[Tj]⩽T, so more than half satisfy E[Tj]⩽k4T. Fix any j satisfying both.
Algorithm A′. A′ requests sP, sQ, and sD samples from the P-, Q-, and D-oracles, and runs A on the simulated instance
Di:=Q(i<r),Dj:=D,Di:=P(i∈/Sj),
forwarding its sample requests to the requested samples. If A requests more than sQ samples in total from {Di}i<r, or more than sD samples from Dj, then A′ aborts and returns D=P. Otherwise it returns D=Q if I^=Πj, and D=P otherwise. The requests to the P-oracle never exceed sP=T.
Recall that sQ and sD take the form min(…,T). Whenever T achieves the minimum, an abort is impossible. Otherwise, the two respective abort probabilities are bounded via Markov's inequality:
using ∑i<rE[Ti]⩽kT(r−1) (the smallest r−1 of the sorted expectations sum to at most that much, since ∑iE[Ti]⩽T) and the choice of j.
Case D=P. An abort returns D=P, which is correct, and otherwise the simulated instance is the one used to pick j, so the error probability is at most Pr[I^=Πj]⩽k4⩽501 (for k⩾200).
Case D=Q. The instance is valid for A with true partition Πj, so by its success guarantee and the two abort bounds, the error is at most 1001+402<101.
Finally, ⌈k160T⌉⩽4⌈k40Tr⌉ since r⩾1, and sD⩽T, so sD⩽4sQ in each case of the two minima.
To control rounding in the budgets, couple the two hypotheses using the same pair (P,Q), allocation, internal randomness, and reference samples. If Tj=0, the simulated observations and the tester's answer coincide under both hypotheses, so at least one of the two answers is wrong. Since each error probability is at most 1/10, we must have Pr[Tj⩾1]⩾4/5. Hence 4T/k⩾E[Tj]⩾4/5, giving T⩾k/5. The ceilings in sQ, sD can therefore be absorbed into the bounds in (17).
C.3.2 Application with One Known Distribution
Here we take the large-cluster distribution to be U and use the following existing average-case LFHT lower bound.
Lemma 18. (Gerber and Polyanskiy (2024, Proposition 13)) For ε∈(0,1/8], there exists a distribution Λalt over pairs (U,Q) with dTV(U,Q)⩾ε satisfying the following. Any tester deciding D=Q vs. D=U with average error at most 1/10 under each hypothesis, using sQ samples from Q and sD from D with sQ≳sD, must satisfy
sQ≳ε2n,sQsD≳ε4n,sD≳ε21.
Theorem 19. For every r∈[1,2k], k⩾200, and ε∈(0,1/8], with one distribution known,
Tna(n,k,r,ε)=Ω(rε2kn+ε2k).
Proof. Apply Lemma 17 with P=U and (U,Q)∼Λalt, and generate the U-samples directly. Since sD⩽4sQ, Lemma 18 applies. The two required bounds follow by substituting (17):
ε4n≲sQsD≲k2T2r,ε21≲sD≲kT.
☐
Together with Theorem 14, this proves the characterization with one known distribution in Section 6.
C.3.3 Application with Both Distributions Unknown
The known-distribution lower bound still applies when both distributions are unknown. To obtain the additional term, we apply the same reduction to the hard pairs from Section 5.1.
Theorem 20. For every r∈[1,2k], k⩾200, and ε∈(0,1/8], with both distributions unknown,
Tna(n,k,r,ε)=Ω(rε2kn+ε2k),
and, when additionally n≳rε4k2,
Tna(n,k,r,ε)=Ω(r1/3ε4/3k2/3n2/3).
Proof. The first bound is Theorem 19, since a clustering algorithm for two unknown distributions can also be used when one is known. For the additional bound, suppose n≳k2/(rε4) and set
T∗:=r1/3ε4/3k2/3n2/3.
This regime gives T∗≲n, so T>n/100 already implies T≳T∗. We henceforth assume that T⩽n/100.
Apply Lemma 17 with Λ the common distribution of (P,Q) under Λ0(⋅∣E) and Λ1(⋅∣E). The resulting tester has average error at most 1/10 under each hypothesis and budgets 1⩽sQ,sD⩽sP=T⩽n/100. The average-case lower bound in Remark 12 therefore applies; using (17) and r⩾1, it gives
ε4n2≲sPsD(sQ+sD)≲T⋅kT⋅kTr=k2T3r.
Rearranging yields T≳T∗.
☐
Together with Theorem 16, this proves the characterization with both distributions unknown in Section 6.
C.4 Proof of the Adaptivity Gap
Kumar et al. (2026, Table 1 and Appendix F) give the adaptive complexity
Hence, Tna/Ta=O(k1/4). The example in Section 6 attains this bound up to logarithmic factors.
D Extension to Multiple Hypotheses
The problem extends naturally to d⩾2 candidates. Let P1,…,Pd be distributions on [n], and let D=Pj∗ for an unknown j∗∈[d] with dTV(D,Pi)⩾ε for every i=j∗. Given si samples from each Pi and sD samples from D, the task is to output j∗. Let s(1)⩽s(2) be the two smallest of s1,…,sd.
Proposition 21. Let n⩾11, ε∈(0,1/8] and 2⩽d⩽n. The set RLF(d)(ε) of feasible sample budgets satisfies
We observe that all but one candidate must be sampled at the rate ε2nα, resembling identity testing, and only the least-sampled candidate trades against sD in the way Q does in Theorem 1. Up to the logarithmic factors in Proposition 21, the least-sampled candidate needs no samples when sD≳ε2nα and is identified by elimination. The upper bound loses a factor O(logd) in each sample size. Since d⩽n, this factor is hidden by ≍logn.
Proof. For the upper bound, we separately apply Theorem 1 to every pair (Pi,Pj), with suitable amplification described below, and output the candidate that wins all of its comparisons. (If no such candidate exists, an error is declared.) The amplification modification is that we use O(logd) independent repetitions to reduce the error probability from 1/3 to at most 3d1, with the repetitions reused across all pairwise comparisons. Candidate j∗ satisfies the promise of every comparison it takes part in, so by a union bound over these d−1 comparisons it wins all of them, and every other candidate loses its comparison against j∗. Comparisons between two wrong candidates are inconsequential, so they need not be included in the union bound. Since
RLF(ε) is closed under increasing any sample size, every pair is feasible once the pair with sizes (s(2),s(1)) is, and the amplification costs a factor O(logd) in each sample size.
For the lower bound, we reduce from the pairwise problem with sizes (s(2),s(1),sD) on the domain [n−1]. Given such an instance (P,Q,D), place P in the slot with s(2) samples and Q in the slot with s(1) samples, and fill each of the remaining d−2 slots with the point mass δn, whose samples we can generate ourselves. Since D is supported on [n−1], we have dTV(D,δn)=1. Together with dTV(P,Q)⩾ε, this makes the result a valid instance whose correct answer is the slot of D. The d-candidate tester therefore decides whether D=P or D=Q, which gives a pairwise tester on [n−1] with sizes (s(2),s(1),sD). The lower-bound direction of Theorem 1 on [n−1] gives the three conditions with n−1 in place of n, and since n−1⩾2n, this changes them only by constant factors.