Skip to content

Minimax-Optimal Kernel Two-sample Testing in Sub-quadratic Time

Ikjun Choi, Shourya Pandey, Purnamrita Sarkar

stat.ML

Abstract

Kernel two-sample tests based on Maximum Mean Discrepancy (MMD) are widely used, but the standard quadratic time MMD statistic requires evaluating Θ(N2)Θ(N^2) kernel pairs where NN is the pooled sample size. Several subquadratic-time approximated MMD tests have been proposed to alleviate this issue, but the existing methods either compromise the test power or assume additional distributional constraints to achieve power comparable to the quadratic-time MMD test. Motivated by this gap, we propose a sub-quadratic time computational method to approximate the MMD test, achieving minimax rate-optimal power with minimal distributional assumptions. Building on ideas in fast kernel density estimation and exponentially convergent trapezoidal rule in numerical analysis, our approximation reduces all-pairs kernel summation to fast Fenwick-tree prefix-sum queries. For fixed dimension, this yields subquadratic-time algorithms for product kernels on Rd\mathbb R^d constructed from common characteristic kernels, including Laplace, Matérn, Gaussian, and inverse multiquadric kernels. The approximation error is controlled tightly enough to have the same power as the minimax-optimal quadratic-time unapproximated MMD test. The same implementation remains subquadratic for the dimension d=o(log⁡N/log⁡log⁡N)d=o(\log N/\log\log N), and can be paired with dimensionality-reduction algorithms when the signal is low-dimensional.

Create a lesson

Metadata

Categories
stat.ML, cs.LG, math.ST, stat.TH
Comments
63 pages, 3 figures and 8 tables