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

Instance-Optimal Uniformity Testing and Tracking

Guy Blanc, Clément L. Canonne, Erik Waingarten

Introduction

Distribution testing is a fundamental task in statistics and computer science, traditionally framed as a "gap problem." In this setting, a tester must decide whether a distribution $p$ is uniform or at least $\epsilon$-far from uniform in Total Variation (TV) distance. However, this framework faces two significant practical hurdles: the requirement to pre-specify the distance parameter $\epsilon$ and the reliance on "worst-case" analysis, which often ignores the specific structure of the distribution being tested.

This paper introduces the framework of Uniformity Tracking, which treats detection as a continuous process. Instead of a fixed $\epsilon$, the goal is to detect non-uniformity as quickly as possible, achieving "instance-optimality." An instance-optimal algorithm performs nearly as well as an oracle algorithm specifically designed for the distribution at hand.

The Problem: Beyond Fixed Gaps

In many real-world scenarios, such as monitoring sensor arrays or network traffic, we do not know how much a signal might deviate from the norm. If a researcher chooses an $\epsilon$ that is too small, the algorithm requires excessive samples. If $\epsilon$ is too large, the algorithm may fail to detect a subtle but important signal.

Furthermore, standard testers—such as those based on counting collisions—are optimized for the worst-case distribution. The authors demonstrate that for certain "easy" distributions, these worst-case testers can be quadratically slower than simpler frequency-based approaches. Uniformity tracking seeks to bridge this gap by being competitive against the best possible algorithm for any given distribution profile.

Methodology and Technical Innovations

The authors' approach relies on several key technical insights to move from static testing to dynamic tracking:

1. Poissonization and Interval Testing

By treating the number of samples as a Poisson random variable, the counts of different elements in the domain become independent. The authors show that the evidence for non-uniformity can be effectively captured by examining specific intervals of sample frequencies.

2. The Convexity of Poisson Mixtures

A central discovery of the paper is the PMF Ratio Convexity. The authors prove that the ratio of a Poisson mixture's probability mass function (PMF) to a standard Poisson PMF is always convex. This is a significant structural result: it implies that the "Scheffé set"—the set of outcomes that best distinguishes a non-uniform distribution from a uniform one—will always form an interval. This reduces the search space for the algorithm from all possible subsets of outcomes to a polynomial number of intervals, enabling computational efficiency.

3. Label Invariance and Hellinger Distance

Because the uniform distribution is symmetric (label-invariant), a competitive algorithm only needs to be competitive against the profile of the distribution (the set of probabilities, regardless of their labels). To manage the dependencies inherent in this symmetry, the authors utilize a randomized subsampling reduction and apply a recent "approximate chain rule" for squared Hellinger distance.

Key Results

The primary contribution is an efficient uniformity tracking algorithm that is polylog(opt)-competitive. If an optimal algorithm (with prior knowledge of the distribution's profile) requires $k$ samples to detect non-uniformity, the proposed algorithm will succeed in approximately $k \cdot \text{polylog}(k)$ samples.

Crucially, this algorithm is distance-agnostic. It does not require prior knowledge of TV distance or Hellinger distance. It monitors the data stream and rejects the null hypothesis of uniformity as soon as the accumulated statistical evidence becomes overwhelming.

Discussion and Future Work

While the polylogarithmic competitive ratio is a major theoretical milestone, it leaves open the question of whether a constant-competitive algorithm exists. Additionally, the current work is specialized for the uniform distribution. Future research could extend this instance-optimal tracking framework to other properties, such as testing for high entropy or uniformity over unknown subspaces—problems with direct applications in cryptography and coding theory.

Finally, while the algorithm is polynomial-time, practical implementation on high-speed streams may require further optimization to handle the overhead of union-bounding over multiple intervals.

Summary updated

BibTeX
@misc{blanc2025instance,
  author = {Guy Blanc and Clément L. Canonne and Erik Waingarten},
  title = {{Instance-Optimal Uniformity Testing and Tracking}},
  year = {2025},
  eprint = {2508.02637},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.02637},
}
Figure