Collision-based Testers are Optimal for Uniformity and Closeness

Ilias Diakonikolas, Themis Gouleakis, John Peebles, Eric Price

TL;DR

This paper proves that simple, existing "collision-based" algorithms for testing if a discrete distribution is uniform or if two distributions are close are actually optimal in terms of sample complexity. This is a significant theoretical result, as it validates these practical algorithms and closes a gap in our understanding of their efficiency.

What Problem Does This Paper Address?

Imagine you have a black box that generates random numbers according to some probability distribution over a set of items (say, numbers from 1 to n). Two fundamental questions arise in the field of "distribution testing":

  1. Uniformity Testing: Is this distribution "uniform," meaning each item has an equal chance of being picked? Or is it "far" from uniform, meaning some items are significantly more likely than others?
  2. Closeness Testing: Given two such black boxes, are the distributions they generate very similar, or are they significantly different?

These problems are crucial for many applications, including statistical analysis, machine learning, and cryptography. Researchers have developed algorithms to tackle these questions, often relying on drawing samples from the distributions. A key metric for evaluating these algorithms is their "sample complexity" – how many samples they need to get the right answer with high probability.

For a long time, researchers knew that certain algorithms, called "collision-based testers," could solve these problems. They also knew that these algorithms were "optimal" in terms of how their sample complexity depended on the size of the domain (n). However, their dependence on the "error parameter" (ε), which defines what "far" or "close" means, was not as good as theoretically possible. It was unclear if the collision-based testers themselves could be analyzed more tightly to achieve this optimal dependence on ε, or if better algorithms were needed.

Methods

The paper focuses on analyzing the existing collision-based testers. The core idea behind these testers is to look for "collisions" – instances where two independently drawn samples are identical.

  • Uniformity Testing: The intuition is that a uniform distribution has the minimum possible collision probability. If an unknown distribution has a significantly higher collision probability than expected for a uniform distribution, it's likely not uniform. The paper provides a new, tighter analysis of the variance of the collision statistic. This improved variance analysis, combined with Chebyshev's inequality, allows them to prove that the collision-based tester achieves an optimal sample complexity of $O(n^{1/2}/\epsilon^2)$. This is a significant improvement over previous analyses that yielded $O(n^{1/2}/\epsilon^4)$.
  • Closeness Testing: For testing if two distributions p and q are close (given they both have small l₂-norm), the collision-based tester involves counting self-collisions within samples from p and q, and cross-collisions between samples from p and q. The previous analysis in [BFR+00] used separate sample sets for these counts, leading to a suboptimal sample complexity. The key innovation here is showing that by reusing samples for the cross-collision count, one can achieve a much tighter variance bound. This refined analysis demonstrates that the collision-based tester is optimal with a sample complexity of $O(b^{1/2}/\epsilon^2)$, where b is an upper bound on the l₂-norm of the distributions.

The analysis relies heavily on bounding the expectation and variance of specific statistics derived from the samples. The novelty lies in the careful and tight calculation of these variances, particularly in the "soundness" cases (when the distributions are indeed far apart or not uniform).

Datasets

Not discussed in the paper. The paper deals with theoretical analysis of algorithms for abstract probability distributions, not empirical evaluation on specific datasets.

Key Insights and Ideas

  • Validation of Simple Algorithms: The paper demonstrates that the straightforward, intuitive collision-based testers, which have been around for a while, are indeed theoretically optimal for uniformity and closeness testing. This is a strong endorsement of their practical utility.
  • The Importance of Variance Analysis: The core technical contribution is a much tighter analysis of the variance of the collision statistics. This highlights how subtle improvements in variance bounding can lead to significant gains in sample complexity.
  • Sample Reuse is Key: For closeness testing, the paper shows that reusing samples for different parts of the collision counting (self vs. cross-collisions) is crucial for achieving optimal sample complexity, even though it complicates the analysis.
  • l₂-Norm Matters: The analysis for closeness testing critically relies on the assumption that the distributions have a small l₂-norm. This constraint is essential for the collision-based approach to be efficient.

Key Results

  • Uniformity Testing: The collision-based tester is shown to be sample-optimal, achieving $O(n^{1/2}/\epsilon^2)$ samples. This matches the information-theoretic lower bound.
  • Closeness Testing: The collision-based tester for distributions with bounded l₂-norm is also shown to be sample-optimal, requiring $O(b^{1/2}/\epsilon^2)$ samples. This also matches known lower bounds.

Limitations and Future Work

  • Bounded l₂-Norm Assumption: The optimality result for closeness testing is contingent on the distributions having a small l₂-norm. The paper doesn't address the case where this assumption is violated.
  • Constant Factors: While the paper proves optimality "up to constant factors," the exact constants in the sample complexity bounds can be large, as seen in the proof details. Future work might focus on reducing these constants for practical implementations.
  • Structured Distributions: The paper focuses on general discrete distributions. Extending these optimal collision-based testing results to more structured settings (e.g., testing properties of specific families of distributions) could be a direction for future research.

Summary updated

BibTeX
@article{diakonikolas2016collision,
  author = {Ilias Diakonikolas and Themis Gouleakis and John Peebles and Eric Price},
  title = {{Collision-based Testers are Optimal for Uniformity and Closeness}},
  journal = {Electron. Colloquium Comput. Complex.},
  year = {2016},
  url = {https://openreview.net/forum?id=0XQeTLQ83Clg},
}
Figure