NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Faster Algorithms for Testing under Conditional Sampling.

Moein Falahatgar, Ashkan Jafarpour, Alon Orlitsky, Venkatadheeraj Pichapati, Ananda Theertha Suresh

Abstract

There has been considerable recent interest in distribution-tests whose run-time and sample requirements are sublinear in the domain-size $k$. We study two of the most important tests—identity and closeness—under the conditional sampling model, where researchers can query specific subsets of a domain. This paper introduces algorithms that achieve the information-theoretic optimal speed for identity testing and reduce the complexity of closeness testing from a logarithmic to a sub-logarithmic dependence on the domain size.

Introduction

In fields like genomics, linguistics, and cybersecurity, determining whether two data sources follow the same underlying probability distribution is a critical task. This is typically categorized into two problems:

  1. Identity Testing: Determining if an unknown distribution $q$ matches a known "reference" distribution $p$.
  2. Closeness Testing: Determining if two unknown distributions, $p$ and $q$, are the same.

In the standard sampling model, the number of samples required grows with the domain size $k$. For massive domains, such as the space of all possible DNA sequences, testing becomes computationally impractical. The conditional sampling model addresses this by allowing for adaptive queries: instead of random samples, an algorithm can request a sample from a specific subset $S$ of the domain. This work aims to find the absolute minimum number of queries needed to test distributions in this more powerful model.

Methodology

The proposed approach centers on identifying "distinguishing sets"—specific parts of the domain where the two distributions behave differently. As a theoretical study, these methods are validated through mathematical proofs of sample complexity rather than empirical datasets.

Identity Testing

The authors developed an algorithm called FIND-ELEMENT to identify "heavy" elements where the unknown distribution $q$ likely deviates from the known $p$. They then partition the domain into groups and use a chi-squared distance-based test (TEST-EQUAL) to compare the distributions on these specific subsets.

Closeness Testing

Closeness testing is more complex because neither distribution is known. The authors utilize a binary search strategy to estimate the relative "weight" of elements. They also introduce a PRUNE-SET technique to filter out outlier elements that would otherwise ruin the statistical concentration of their samples. By iteratively narrowing the sampling frequency, they can find a subset that highlights the difference between $p$ and $q$.

Key Insights and Results

Breaking the $\epsilon$ Barrier

Previous algorithms for identity testing required queries proportional to $\epsilon^{-4}$ (where $\epsilon$ is the distance between distributions). This paper achieves a complexity of $\tilde{O}(\epsilon^{-2})$, which matches the information-theoretic lower bound—effectively "solving" the problem for this model.

Sub-Logarithmic Complexity

For closeness testing, the authors reduced the dependence on domain size $k$ from $(\log k)^5$ to $\tilde{O}(\epsilon^{-5} \log \log k)$. In practical terms, $\log \log k$ is so small it is almost a constant, suggesting that with conditional sampling, the "size" of the domain barely impacts the testing difficulty.

The Power of Adaptivity

The core innovation is the use of adaptive querying. By using the results of one query to inform the next (such as the binary search for weights), the algorithms can "zoom in" on discrepancies much faster than by looking at the whole domain at once.

Conclusion and Future Work

This work provides the first known algorithm to achieve sub-logarithmic growth relative to the alphabet size $k$ for closeness testing. While the dependence on $k$ is significantly improved, the dependence on the error parameter $\epsilon$ increased slightly (from $\epsilon^{-4}$ to $\epsilon^{-5}$), presenting an opportunity for future optimization. Additionally, while these algorithms are theoretically efficient, implementing them to handle noisy, real-world data remains a challenge for practitioners. Future research may also explore non-label-invariant properties, such as testing if a distribution is monotone or convex under the conditional sampling model.

Summary updated

BibTeX
@inproceedings{falahatgar2015faster,
  author = {Moein Falahatgar and Ashkan Jafarpour and Alon Orlitsky and Venkatadheeraj Pichapati and Ananda Theertha Suresh},
  title = {{Faster Algorithms for Testing under Conditional Sampling.}},
  booktitle = {COLT},
  year = {2015},
  url = {https://openreview.net/forum?id=tYRD-QM1-w},
}
Figure