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

Efficient Aggregated Kernel Tests using Incomplete $U$-statistics

Antonin Schrab, Ilmun Kim, Benjamin Guedj, Arthur Gretton

Introduction Nonparametric hypothesis testing is a cornerstone of modern statistics and machine learning, allowing researchers to answer fundamental questions about data without relying on strict parametric assumptions. Common applications include two-sample testing (Maximum Mean Discrepancy, or MMD), independence testing (Hilbert Schmidt Independence Criterion, or HSIC), and goodness-of-fit testing (Kernel Stein Discrepancy, or KSD). However, the "gold standard" methods for these tests rely on complete $U$-statistics, which require comparing every pair of data points. This results in a quadratic computational cost of $O(N^2)$, rendering them impractical for large-scale datasets.

This paper introduces a novel family of nonparametric hypothesis tests—MMDAggInc, HSICAggInc, and KSDAggInc—that bridge the gap between slow, high-power quadratic-time tests and fast, lower-power linear-time tests. By leveraging "incomplete $U$-statistics" and aggregating across multiple kernel bandwidths, the authors provide a highly efficient testing framework that eliminates the need for manual kernel selection.

The Challenge: Efficiency vs. Power When dealing with massive datasets, researchers often turn to linear-time $O(N)$ alternatives to bypass the $O(N^2)$ bottleneck. Unfortunately, these faster methods typically require the user to select a single, "perfect" kernel bandwidth. This selection process is notoriously difficult; choosing the wrong bandwidth can lead to a massive loss in statistical power, causing the test to miss subtle but important differences in the data. The core challenge is finding a method that scales gracefully with data size without sacrificing the sensitivity of traditional quadratic-time tests.

Methodology: The "AggInc" Approach To resolve the efficiency-power trade-off, the authors propose three primary innovations:

  1. Incomplete $U$-statistics: Instead of computing all $N(N-1)/2$ pairs of data points, the proposed tests sum over a strategically chosen subset of pairs (a "design"). This allows practitioners to set a computational budget, $L$, that interpolates smoothly between linear time ($L \approx N$) and quadratic time ($L \approx N^2$).
  2. Bandwidth Aggregation: Rather than gambling on a single kernel bandwidth, the tests evaluate a collection of different bandwidths simultaneously. A sophisticated weighting and correction scheme ensures the overall test remains statistically valid—strictly controlling the Type I error—while remaining sensitive to distributional differences at multiple scales.
  3. Wild Bootstrap Quantiles: Determining the threshold for rejecting the null hypothesis requires computing a quantile. The authors derive new theoretical bounds for a "wild bootstrap" approach, which is significantly more computationally efficient than standard permutation methods when applied to incomplete statistics.

Key Findings and Performance The researchers evaluated the AggInc tests across several benchmarks, including Perturbed Uniform Densities (to test sensitivity to fine-grained differences), Gaussian-Bernoulli Restricted Boltzmann Machines (for goodness-of-fit), and the classic MNIST dataset.

The results demonstrate that incomplete aggregated tests can achieve nearly the same statistical power as full $O(N^2)$ quadratic tests while operating significantly faster. For instance, using a moderate number of pairs (e.g., $R=200$ sub-diagonals) was often sufficient to match quadratic power. Furthermore, the linear-time configurations of MMDAggInc, HSICAggInc, and KSDAggInc consistently outperformed existing linear-time state-of-the-art tests (such as ME, SCF, and FSSD), which typically rely on optimizing test locations on a held-out validation set.

Theoretical Insights Beyond empirical success, the paper provides rigorous theoretical guarantees. The authors quantify exactly how much statistical power is lost as the computational budget moves from quadratic to linear time. They prove that as long as the number of pairs $L$ grows faster than $N$, the test is guaranteed to eventually detect any difference between distributions. Additionally, a major theoretical contribution is the proof that for independence testing (HSIC), the wild bootstrap is "minimax optimal," matching the performance of the more common but computationally heavier permutation test.

Limitations and Future Directions While the AggInc family offers a robust solution for scalable testing, the authors note a theoretical caveat: when the design size $L$ is strictly linear ($L \propto N$), there is no absolute guarantee that the "separation rate" (the minimum detectable difference) converges to zero. In practice, using a design that grows slightly faster than linear, such as $N \log \log N$, maintains theoretical consistency without a noticeable performance hit.

Future work may explore more complex or randomized designs for the incomplete $U$-statistics, as the current study primarily focused on deterministic "sub-diagonal" designs. Additionally, integrating these efficient aggregated tests with learned "deep kernels" represents a promising frontier for analyzing highly complex, high-dimensional data.

Summary updated

BibTeX
@inproceedings{schrab2022efficient,
  author = {Antonin Schrab and Ilmun Kim and Benjamin Guedj and Arthur Gretton},
  title = {{Efficient Aggregated Kernel Tests using Incomplete $U$-statistics}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=5RNGDk3CHW},
}
Figure