Collision-Based Testers are Optimal for Uniformity and Closeness

Ilias Diakonikolas, Themis Gouleakis, John Peebles, Eric Price · OpenReview

Authors: Ilias Diakonikolas (USC), Themis Gouleakis (MIT), John Peebles (MIT), and Eric Price (UT Austin)
Date: November 14, 2016

Abstract

This paper provides a definitive theoretical answer to a long-standing question in distribution testing: are the simplest, most intuitive algorithms actually optimal? We analyze the "collision-based" testers originally proposed in 2000 for uniformity and closeness testing. By providing a tighter variance analysis, we prove these algorithms achieve the information-theoretically optimal sample complexity of $O(\sqrt{n}/\epsilon^2)$, matching more complex modern alternatives and resolving a 16-year-old gap in the literature.

1. Introduction

In the field of distribution property testing, the goal is to determine whether a discrete distribution $p$ over a domain of size $n$ satisfies a certain property (e.g., uniformity) or whether two distributions $p$ and $q$ are close, using as few samples as possible.

In 2000, Goldreich, Ron, and Batu introduced "collision-based" testers. These algorithms are remarkably simple: they count the number of times the same outcome is observed across multiple samples. Despite their elegance, subsequent research suggested these testers were sub-optimal, requiring $O(1/\epsilon^4)$ samples compared to the $O(1/\epsilon^2)$ achieved by more complex "chi-squared" type testers. This work demonstrates that the original algorithms were, in fact, optimal all along; it was the previous mathematical analysis that was loose.

2. Problem Formulation

We consider two primary testing problems:

  1. Uniformity Testing: Given samples from a distribution $p$ over $[n]$, distinguish between $p = U$ (the uniform distribution) and $||p - U||_1 \ge \epsilon$.
  2. Closeness Testing: Given samples from two distributions $p$ and $q$, distinguish between $p = q$ and $||p - q||_1 \ge \epsilon$.

The objective is to minimize the sample complexity $m$ as a function of the domain size $n$ and the error parameter $\epsilon$.

3. Methodology: Tighter Variance Analysis

The authors do not introduce new algorithms but rather provide a rigorous new analysis of the existing collision statistics.

The Uniformity Statistic

The tester counts the number of pairs $(i, j)$ in a sample of size $m$ that result in the same value. The key to the improved bound lies in a more precise treatment of the variance. Previous analyses often simplified or ignored a critical negative term, $-||p||_2^4$. The authors show that this term is essential for canceling out variance components when $\epsilon$ is small, allowing for the $1/\epsilon^2$ dependence.

The Closeness Statistic

For closeness testing, the algorithm uses a statistic $Z$ that incorporates both self-collisions (within samples from $p$ or $q$) and cross-collisions (between $p$ and $q$). Unlike earlier approaches that used disjoint sample sets to simplify the math, this work proves that reusing samples across the entire statistic is not only valid but leads to optimal performance, provided one handles the resulting complex covariance terms.

4. Key Results

The paper establishes the following optimal sample complexities:

  • Uniformity: $O(\sqrt{n}/\epsilon^2)$ samples are sufficient for the collision tester to succeed with high probability.
  • Closeness: A variant of the collision-based tester is also optimal, requiring $O(b^{1/2}/\epsilon^2)$ samples, where $b$ is an upper bound on the $\ell_2$-norm of the distributions.

These results show that collision-based testers are optimal up to constant factors. This "redemption" of natural algorithms suggests that practitioners can favor simplicity and ease of implementation without sacrificing theoretical performance.

5. Conclusion and Future Directions

This work closes a significant gap in distribution testing by proving the optimality of collision-based methods. While the bounds are now tight for discrete distributions under $\ell_1$ and $\ell_2$ distances, future work remains in extending these insights to continuous distributions and other distance metrics like KL-divergence. Additionally, while the $O(\cdot)$ notation is settled, further research could refine the absolute constant factors for practical applications.

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