[Paper Review] Comparing distributions: $\ell_1$ geometry improves kernel two-sample testing
This paper proposes an $ι_1$-geometry-based two-sample test that improves kernel two-sample testing by using the $\ell_1$ norm of differences in analytic function expectations at spatial or frequency locations. It achieves higher testing power and faster computation than state-of-the-art $\ell_2$-based methods, with interpretable feature selection and consistent performance on synthetic and real-world data.
Are two sets of observations drawn from the same distribution? This problem is a two-sample test. Kernel methods lead to many appealing properties. Indeed state-of-the-art approaches use the $L^2$ distance between kernel-based distribution representatives to derive their test statistics. Here, we show that $L^p$ distances (with $p\geq 1$) between these distribution representatives give metrics on the space of distributions that are well-behaved to detect differences between distributions as they metrize the weak convergence. Moreover, for analytic kernels, we show that the $L^1$ geometry gives improved testing power for scalable computational procedures. Specifically, we derive a finite dimensional approximation of the metric given as the $\ell_1$ norm of a vector which captures differences of expectations of analytic functions evaluated at spatial locations or frequencies (i.e, features). The features can be chosen to maximize the differences of the distributions and give interpretable indications of how they differs. Using an $\ell_1$ norm gives better detection because differences between representatives are dense as we use analytic kernels (non-zero almost everywhere). The tests are consistent, while much faster than state-of-the-art quadratic-time kernel-based tests. Experiments on artificial and real-world problems demonstrate improved power/time tradeoff than the state of the art, based on $\ell_2$ norms, and in some cases, better outright power than even the most expensive quadratic-time tests.
Motivation & Objective
- To address the limitations of existing kernel two-sample tests that rely on $\ell_2$-based metrics, which may underdetermine differences between distributions.
- To develop a more powerful and scalable two-sample test by leveraging $\ell_1$ geometry on kernel-based distribution representatives.
- To provide interpretable test locations that highlight where distributions differ, enhancing model interpretability.
- To demonstrate improved statistical power and computational efficiency compared to state-of-the-art $\ell_2$-based and quadratic-time kernel methods.
Proposed method
- Uses the $L^p$ distance ($p \geq 1$) between kernel-based distribution representatives (mean embeddings or smooth characteristic functions) as a metric that metrizes weak convergence.
- Proposes a finite-dimensional approximation of the $L^1$ distance as the $\ell_1$ norm of a vector capturing differences in expectations of analytic functions at $J$ locations.
- Employs analytic kernels to ensure that differences between distribution representatives are dense (non-zero almost everywhere), enhancing detectability via $\ell_1$.
- Optimizes test locations by maximizing the $\ell_1$-based test statistic, enabling interpretable and discriminative feature selection.
- Adapts the framework to the frequency domain using random Fourier features, enabling linear-time computation.
- Uses subsampling and random feature approximation to maintain scalability while preserving consistency and power.
Experimental results
Research questions
- RQ1Can $L^p$ distances for $p \geq 1$ between kernel-based distribution representatives serve as well-behaved metrics that metrize weak convergence?
- RQ2Does using the $\ell_1$ norm of feature differences improve testing power compared to $\ell_2$-based statistics in two-sample testing?
- RQ3Can the $\ell_1$-based test detect distribution differences more effectively due to the density of non-zero differences under analytic kernels?
- RQ4How does the performance of $\ell_1$-based tests compare to state-of-the-art $\ell_2$-based and quadratic-time kernel methods in terms of power and speed?
- RQ5Can the selected test locations be interpreted meaningfully to reveal where distributions differ?
Key findings
- The $\ell_1$-based test achieves higher statistical power than state-of-the-art $\ell_2$-based methods on both synthetic and real-world datasets, including the 20 newsgroups text dataset.
- On the 20 newsgroups dataset, the $\ell_1$-optimized mean embedding test achieved a Type-II error of 0.00 when distinguishing 'sci' from 'comp' and 0.064 for 'sci' vs 'alt', outperforming $\ell_2$ counterparts.
- In the fast-food restaurant distribution task, $\ell_1$-optimized tests maintained Type-I error rates near the nominal $\alpha = 0.01$ level, while other methods were more conservative.
- Visualizations of learned test locations showed that $\ell_1$-optimized features concentrated in regions of low overlap between distributions, confirming their discriminative power.
- The $\ell_1$-based method achieved consistent performance across diverse data types, including text and spatial data, with significant speedups over quadratic-time MMD.
- The method's non-convex optimization landscape captured multimodal, informative configurations of test locations, indicating rich detection capabilities beyond convex alternatives.
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.