A Martingale Kernel Two-Sample Test
Anirban Chatterjee, Aaditya Ramdas
TL;DR
The paper introduces the martingale MMD (mMMD) test for two-sample problems, defining a quadratic-time statistic that, under the null, converges to a standard normal distribution without resampling. By constructing a martingale difference sequence through past observations to estimate the witness function, the authors achieve a calibration-free test with strong theoretical guarantees including asymptotic normality under varying kernels, dimensions, and data distributions, plus consistency against fixed and broad classes of alternatives. They demonstrate competitive empirical performance against the classic quadratic-time MMD and other scalable methods on simulated and real data (e.g., MNIST), while maintaining a favorable computational profile of $O(n^2)$. Extensions include a multi-kernel version (mmMMD) with a $\chi^2$ null and a generalized family $T_{n,\gamma}$ that interpolates between MMD and mMMD, with partial minimax optimality results. Overall, the work provides a practical, theoretically solid, resampling-free approach to kernel two-sample testing with scalable accuracy and broad applicability.
Abstract
The Maximum Mean Discrepancy (MMD) is a widely used multivariate distance metric for two-sample testing. The standard MMD test statistic has an intractable null distribution typically requiring costly resampling or permutation approaches for calibration. In this work we leverage a martingale interpretation of the estimated squared MMD to propose martingale MMD (mMMD), a quadratic-time statistic which has a limiting standard Gaussian distribution under the null. Moreover we show that the test is consistent against any fixed alternative and for large sample sizes, mMMD offers substantial computational savings over the standard MMD test, with only a minor loss in power.
