Abstract
In this work, we revisit the problem of uniformity testing of discrete probability distributions. A fundamental problem in distribution testing, testing uniformity over a known domain has been addressed over a significant line of works, and is by now fully understood. The complexity of deciding whether an unknown distribution is uniform over its unknown (and arbitrary) support, however, is much less clear. Yet, this task arises as soon as no prior knowledge on the domain is available, or whenever the samples originate from an unknown and unstructured universe. In this work, we introduce and study this generalized uniformity testing question, and establish nearly tight upper and lower bound showing that - quite surprisingly - its sample complexity significantly differs from the known-domain case. Moreover, our algorithm is intrinsically adaptive, in contrast to the overwhelming majority of known distribution testing algorithms.
Introduction
Classical distribution testing typically addresses the question: "Is a given distribution $\mathbf{p}$ uniform over a known set $\mathcal{X}$ of size $n$?" In such scenarios, the domain size $n$ is a fixed parameter known to the tester. However, modern data analysis often encounters "unstructured" data—such as network traffic logs or genomic sequences—where the set of possible outcomes is not known a priori.
This paper introduces the Generalized Uniformity Testing problem. Given samples from an unknown distribution $\mathbf{p}$ over an arbitrary discrete domain, the goal is to distinguish whether $\mathbf{p}$ is uniform over some subset of the domain, or if it is $\epsilon$-far in total variation distance from every such uniform distribution. This work investigates whether the lack of domain knowledge fundamentally alters the complexity of the task.
Methodology
The authors propose a two-stage adaptive algorithm. Unlike standard non-adaptive testers that use a fixed sample size, this approach determines the necessary amount of data based on observed collisions.
Stage 1: $\ell_2$ Norm Estimation
The first stage involves estimating the $\ell_2$ norm of the distribution, $\|\mathbf{p}\|_2^2 = \sum p_i^2$. This is achieved by counting "2-collisions"—pairs of samples that result in the same value. The number of samples $m$ required to observe a fixed number of collisions $k$ provides a proxy for the support size of the distribution.
Stage 2: 3-Way Collision Testing
Using the estimate from the first stage, the algorithm sets a threshold for "3-way collisions" (triplets of identical samples). The core mathematical insight relies on a robust characterization: a distribution is close to uniform if and only if its $\ell_2$ and $\ell_3$ norms satisfy a specific relationship, namely $\|\mathbf{p}\|_2^4 \approx \|\mathbf{p}\|_3^3$. If the observed 3-way collisions exceed the calculated threshold, the distribution is rejected as non-uniform.
Key Insights and Results
The study reveals several fundamental properties of generalized uniformity testing:
- Mandatory Adaptivity: Because the domain size $n$ is unknown and potentially infinite, a non-adaptive algorithm cannot succeed. The tester must adaptively sample until it observes enough collisions to characterize the distribution's scale.
- The $2/3$ Power Law: A major finding is the shift in sample complexity. While testing over a known domain of size $n$ requires $\Theta(\sqrt{n})$ samples, testing over an unknown domain requires $\Theta(n^{2/3})$ samples. This $n^{1/6}$ gap represents the intrinsic cost of domain uncertainty.
- Upper and Lower Bounds: The authors provide an algorithm with sample complexity $O(n^{2/3}/\epsilon^6)$ for a uniform distribution on $n$ elements. They also establish a nearly matching lower bound of $\Omega(1/\|\mathbf{q}\|_3)$, confirming that the $n^{2/3}$ dependence is optimal.
Conclusion and Future Work
This work establishes that generalized uniformity testing is fundamentally harder than its known-domain counterpart. While the algorithm is computationally efficient (linear in the number of samples), the authors note a high dependence on the proximity parameter $\epsilon$ (specifically $\epsilon^{-6}$). Future research may aim to optimize this to a linear $1/\epsilon$ dependence. Additionally, extending this framework to "Generalized Identity Testing"—comparing an unknown distribution to a specific non-uniform reference—remains an open and promising direction.
Summary updated