[Paper Review] A Kernel Method for the Two-Sample Problem
This paper introduces the Maximum Mean Discrepancy (MMD), a kernel-based statistical test for the two-sample problem that measures the largest difference in expectations over functions in a unit ball of a reproducing kernel Hilbert space (RKHS). The method provides consistent, non-parametric tests with finite-sample guarantees and asymptotic approximations, achieving quadratic-time computation and linear-time approximations, and demonstrates strong performance on high-dimensional data including graphs and microarray datasets.
We propose a framework for analyzing and comparing distributions, allowing us to design statistical tests to determine if two samples are drawn from different distributions. Our test statistic is the largest difference in expectations over functions in the unit ball of a reproducing kernel Hilbert space (RKHS). We present two tests based on large deviation bounds for the test statistic, while a third is based on the asymptotic distribution of this statistic. The test statistic can be computed in quadratic time, although efficient linear time approximations are available. Several classical metrics on distributions are recovered when the function space used to compute the difference in expectations is allowed to be more general (eg. a Banach space). We apply our two-sample tests to a variety of problems, including attribute matching for databases using the Hungarian marriage method, where they perform strongly. Excellent performance is also obtained when comparing distributions over graphs, for which these are the first such tests.
Motivation & Objective
- To develop a non-parametric statistical test to determine if two samples are drawn from different probability distributions.
- To ensure the test is consistent and has finite-sample performance guarantees by using function classes from universal reproducing kernel Hilbert spaces (RKHS).
- To provide computationally efficient alternatives, including a linear-time approximation, for large-scale data.
- To apply the method to real-world problems such as bioinformatics, neural data analysis, and database attribute matching.
- To demonstrate that the MMD statistic is a valid metric on probability distributions when the function class is rich enough (e.g., universal RKHS).
Proposed method
- Define the Maximum Mean Discrepancy (MMD) as the largest difference in expected function values over the unit ball of a universal RKHS.
- Use uniform convergence bounds to derive two finite-sample hypothesis tests with guaranteed Type I error control.
- Derive a third asymptotic test based on the limiting distribution of the empirical MMD under the null hypothesis.
- Propose a linear-time approximation of the MMD using random Fourier features or other sketching techniques.
- Compute the MMD via a U-statistic estimator involving pairwise kernel evaluations between samples from the two distributions.
- Establish theoretical properties: MMD is zero if and only if the underlying distributions are equal when the RKHS is universal.
Experimental results
Research questions
- RQ1Can a kernel-based test statistic be constructed that consistently detects differences between two probability distributions?
- RQ2What function class ensures that the MMD vanishes if and only if the two distributions are identical?
- RQ3How can finite-sample performance guarantees be provided for the MMD test statistic?
- RQ4What is the asymptotic distribution of the empirical MMD under the null hypothesis?
- RQ5Can a computationally efficient linear-time approximation of the MMD be derived without sacrificing statistical power?
Key findings
- The MMD is a valid metric on probability distributions when the function class is the unit ball of a universal RKHS, ensuring that MMD = 0 iff p = q.
- The proposed finite-sample tests based on uniform convergence bounds provide non-asymptotic Type I error control, albeit with conservative power.
- The asymptotic test based on the limiting distribution of the MMD is more powerful at small sample sizes compared to the finite-sample bounds.
- The MMD can be computed in O((m+n)²) time for m and n samples, with a linear-time approximation available for large datasets.
- The method achieves strong performance in attribute matching using the Hungarian marriage method, outperforming baseline approaches.
- Empirical results show excellent performance on high-dimensional data, including microarray data and graph-structured distributions, where no prior two-sample tests existed.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.