Optimal Algorithms for Augmented Testing of Discrete Distributions

We consider the problem of hypothesis testing for discrete distributions. In the standard model, where we have sample access to an underlying distribution $p$, extensive research has established optimal bounds for uniformity testing, identity testing (goodness of fit), and closeness testing (equivalence or two-sample testing). We explore these problems in a setting where a predicted data distribution, possibly derived from historical data or predictive machine learning models, is available. We demonstrate that such a predictor can indeed reduce the number of samples required for all three property testing tasks. The reduction in sample complexity depends directly on the predictor's quality, measured by its total variation distance from $p$. A key advantage of our algorithms is their adaptability to the precision of the prediction. Specifically, our algorithms can self-adjust their sample complexity based on the accuracy of the available prediction, operating without any prior knowledge of the estimation's accuracy (i.e. they are consistent). Additionally, we never use more samples than the standard approaches require, even if the predictions provide no meaningful information (i.e. they are also robust). We provide lower bounds to indicate that the improvements in sample complexity achieved by our algorithms are information-theoretically optimal. Furthermore, experimental results show that the performance of our algorithms on real data significantly exceeds our worst-case guarantees for sample complexity, demonstrating the practicality of our approach.

Paper

References (79)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer qguF6/10 · confidence 2/52024-07-09

Summary

This paper consider the problem of hypothesis testing for discrete distributions, including identity testing, closeness testing and uniformity testing. The authors investigated these testing problems under the setting where a predicted data distribution is available. Utilizing this additional information, the authors propose "augmented tester", which can reduce the sample complexity when the given predicted distribution is accurate (when it is inaccurate, the proposed algorithm is still robust). Lower bounds are also provided for justifying the optimality of the proposed algorithm.

Strengths

The idea of augmenting hypothesis testing using additional information is interesting. The proposed algorithm can reduce the sample complexity when the given prediction is accurate enough, which is satisfactory. Lower bounds are also provided, making this paper comprehensive.

Weaknesses

A possible weakness is that, the structure of this paper is a little bit weird. You first give your theorems in the introduction when your proposed algorithm is not mentioned yet. Then you provide the proofs in section 2, and state the upper bound again in section 3. The algorithm has not been mentioned until the last.

Questions

I am curious about the intuition behind your algorithm, i.e., how to utilize the additional information. It will be good if the authors could provide more explanation of the proposed algorithm.

Rating

6

Confidence

2

Soundness

3

Presentation

2

Contribution

3

Limitations

no limitations are stated.

Reviewer bNNx7/10 · confidence 3/52024-07-12

Summary

The paper studies the problem of property testing (specifically uniformity, identity, and closeness testing) in the context of the learning-augmented algorithms framework. They show how a prediction about the underlying distribution could be harnessed to provably reduce the number of samples required when the prediction is of high quality. They give efficient algorithms and provide experimental evaluation with code.

Strengths

The problem is well-motivated and the paper is well written.

Weaknesses

I did not check the proofs in the appendix in detail but the intuition given for the approaches make sense.

Questions

- In the paragraph starting on Line 177: given "perfect predictors", why does one even need additional samples from the distribution? From my limited understanding, that paper talks about having additional access to other kinds of queries on the underlying distribution (apart from just drawing IID samples) and "samples" may refer to those other kinds of queries (for instance, one can query the probability mass of an element and get its true mass in $p$). I'm not sure how that directly compares with your setting where "samples" mean IID samples only. - How do you obtain an **upper bound** expression for the final big-O containment for the equation block between Lines 378-379? To be precise, we have $s_f \leq = \min\{\frac{n^{2/3} \alpha^{1/3}}{\varepsilon^{4/3}}, n\} \leq \frac{n^{2/3} \alpha^{1/3}}{\varepsilon^{4/3}}$ so $\frac{n}{\varepsilon^2} \cdot \sqrt{\frac{\alpha}{s_f}} \geq \frac{n^{2/3} \alpha^{1/3}}{\varepsilon^{4/3}}$, which is a **lower bound** right? Where did I mess up? Possible typos: - Line 266: "...strategy is put the..." should be "...strategy is **to** put the..."? - First line of the equation between Lines 328-329: Should the last equality be $\leq$? - Line 375: Should it be $\leq 100 s_f$ instead? - Line 376: Should it be $\leq 102 n$ instead?

Rating

7

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

Nil

Reviewer Zhut7/10 · confidence 1/52024-07-12

Summary

The paper looks at the problem of hypothesis testing for discrete distributions where a predicted data distribution is available. The paper gives algorithms (Algorithm 1; closeness testing, Algorithm 3; identity and uniform testing) which either reduces the number of samples required for testing, or do no worse than standard approaches. Lower bounds on samples are given, and experiments are done to validate the performance on real data.

Strengths

The paper is extremely thorough and detailed, giving an overview of the important results (including experiments), as well as a roadmap of the intuition required behind the proofs for the upper bound and lower bounds. The appendix also includes motivation and explanation for the numerous proofs involved. The main contributions of needing significantly fewer sample sizes for hypothesis testing compared to CRS'15 or [41] is also significant.

Weaknesses

I am not sure whether this is an appropriate venue mostly due to the heavy technical details in the paper, and with a lot of key details in the appendix ; but to be fair, the conference format makes it difficult to present detailed work like this. Unfortunately, this is not mostly in my area of speciality, so I am unable to give meaningful comments about potential weaknesses (or strengths).

Questions

These questions may be straightforward to those familiar with the relevant literature, but these are the questions I have: - Are there certain types of data where making weak assumptions about the predictor (compared to related works) might give bad results (or similar results to existing methods)? - Is there a reason why experiments for identity testing and uniformity testing are not given?

Rating

7

Confidence

1

Soundness

3

Presentation

4

Contribution

4

Limitations

N/A

Reviewer BZRn7/10 · confidence 4/52024-07-12

Summary

This paper studies the task of identity/closeness testing when the tester is augmented with predictions of the unknown distribution involved apriori. In particular, in identity testing, in addition to sample access to the unknown distribution $p$, the algorithm is also given some $\hat p$ that may or may not satisfy the guarantee $ \text{TV}(p, \hat p) \leq \alpha$. If the guarantee does not hold, the algorithm is allowed to answer **inaccurate**. Otherwise, the algorithm is asked to perform the standard testing task: return YES if $p$ equals to some known distribution $q$, and NO if $p$ is at least $\epsilon$-far from $q$ in total variation distance. For closeness testing, though both $p$ and $q$ are unknown, the authors assume that such prior prediction $\hat p$ is only available for one of the distributions. For identity testing, the sample complexity goes through a phase transition depending on the relative size of the prediction error tolerance parameter $\alpha$ and $d = \text{TV}(q, \hat p )$, the TV distance between the prediction distribution and the known distribution. When $d<\alpha$, the sample complexity is the same as the usual identity testing. When $d > \alpha$, the sample complexity is $\min\left( \frac{1}{ (d - \alpha)^2 }, \frac{\sqrt{n}}{\epsilon^2} \right)$. Intuitively, this is saying that the prediction could potentially help a lot if it predicts that the test is in the soundness case (as $\hat p$ is indeed far from $q$) but not so much if it predicts the test is in the completeness case. This intuition is clear from their upper bound approach. They leverages the Scheffé set $S$ (the set that realizes the maximum discrepancy between $\hat p$ and $q$), and test for discrepancy between $p(S)$, $q(S)$ and $\hat p(S)$. This will either invalidate the prediction or lead to rejection. Furthermore, since this is simply a 1-dimensional bias estimation problem, they could avoid any dependency on the doamin size (when $d$ is sufficiently separated from $\alpha$). The above strategy is not so helpful when there is no significant discrepancy between $p(S)$, $q(S)$ and $\hat p(S)$, and therefore their algorithm fall back to the standard identity tester when the prediction says that the test is in the completeness case. For closeness testing, they show that the sample complexity is given by $\sqrt{n} \alpha^{1/3} / \epsilon^{4/3} + \sqrt{n} / \epsilon^2$. Here the Scheffé set strategy no longer applies as $q$ is also unknown to us. However, the authors show that the prior $\hat p$ is still very useful in an important closeness testing sub-routine (commonly referred as **flattening**). At a high level, when the unknown distributions have large $\ell_2$ norm, standard collision-based test statistics may have large variance. Flattening techniques could then be used to transform the distributions to reduce their $\ell_2$ norms, and hence also the variance of the test statistics. The authors show that such a routine can be implemented in a more sample-efficient way if the algorithm is equipped with a prediction $\hat p$.

Strengths

Identity/closeness testings are fundamental problems in many different areas. In the standard setting, the sample complexity scales polynomially with respect to the domain size, making the tests prohibitively expensive for distributions with large supports. The authors demonstrated that the sample complexity may be significantly improved if the tester is augmented with a prediction of the unknown distribution. The surprising part is that the prediction need not to be an accurate one. While the tester draws significantly fewer samples if the prediction is accurate, even if the prediction is not, the tester is guaranteed not to be misguided. In particular, it can identify inaccuracies in the prediction, and simply fall back to the standard testing approach in that case. Lastly, the bounds are optimal up to constant factors and technically solid.

Weaknesses

The authors mention that the potential application is when the unknown distribution evolves over time. In that case, the ``unknown'' distribution is not completely unknown to us as we may extract information from past data. It will be more compelling if the authors could provide more detailed mathematical setup of this. For example, it will be interesting to see analysis of the behavior of augmented testers when we face a sequence of tests where the unknown distribution may go through random distribution shifts from one task to another.

Questions

Have the authors considered situation when we have prior knowledge about both of the unknown distributions in closeness testing? Then it seems like the Scheffé set may again become useful, and could lead to huge sample complexity improvements. Comment: The setup bears some similarities to the notion of testable learning, where the algorithm is given some prior distribution assumption that may or may not hold. In particular, the algorithm is also given the ability to output ``reject'' when this prior knowledge is false.

Rating

7

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

Yes, they have.

Reviewer Zhut2024-08-07

Thank you for the detailed rebuttal. My score remains unchanged.

Reviewer bNNx2024-08-09

Thank you very much for clearing up my confusion about the sample complexity! I did read Section 1.3 and I understand that [29] considers a different query model where one can perform stronger queries such as asking for element probabilities $p(i)$. However, from what I understand and what you mentioned, [29] does not get any additional predictor as part of the input. As such, I think it is highly confusing to say that [29] uses "perfect predictors" and I do not think they are directly comparable... In the learning-augmented setup, one can always make a decision by just looking the given predictor without doing any additional work: if the predictor is arbitrarily bad, the answer will just be wrong. Thus, I find it strange to say that an algorithm given perfect predictor even needs any to take any sample. This is still a good piece of work overall and I stick to my positive review. However, as per my response above, I would recommend the authors to reconsider the rephrasing the comparison of [29] in their revision.

Authorsrebuttal2024-08-10

Thank you for your comment. In our future version, we will add the necessary clarification to provide a more comprehensive comparison with [29].

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC