TL;DR
This paper introduces a novel two-sample test that leverages the symmetry of generative stochastic interpolants. By measuring the Jensen–Shannon divergence between "mirrored" time-frames of a path connecting two datasets, the authors create a test that requires no model training, achieves minimax optimal separation rates, and outperforms state-of-the-art kernel methods on standard benchmarks.
What Problem Does This Paper Address?
Deciding whether two sets of data come from the same underlying distribution—the two-sample problem—is a cornerstone of statistics. While classical methods like the Kolmogorov-Smirnov test work in 1D, modern high-dimensional data often requires kernel-based methods like Maximum Mean Discrepancy (MMD).
However, kernel methods face a "bandwidth" problem: their power depends heavily on choosing the right kernel and scale, often requiring data splitting or complex heuristics. This paper approaches the problem through the lens of generative transport. Instead of just looking at the endpoints (the samples), it looks at the dynamics of a process that moves one distribution toward the other.
Methods
The authors build a bridge between two samples using stochastic interpolants. A stochastic interpolant $x_t$ is a process that evolves from a sample $x_0$ (from distribution $\rho_0$) to a sample $x_1$ (from $\rho_1$) over time $t \in [0, 1]$, typically defined as: $$x_t = \alpha_t x_0 + \beta_t x_1 + \gamma_t z$$ where $z$ is noise.
The "aha!" moment of the paper is a reflection symmetry: if the two distributions are identical ($\rho_0 = \rho_1$), then for a symmetric schedule, the law of the process is invariant under the time reflection $t \mapsto 1-t$. In other words, the distribution of the "film" played forward should look exactly like the film played backward.
To turn this into a test, they:
- Compare Marginals: They compute the Jensen–Shannon (JS) divergence between the empirical marginals at time $t$ and $1-t$.
- No Learning Required: Because the marginals are explicit mixtures over all $n_0 \times n_1$ cross-pairs of observations, the test statistic is calculated directly without training a neural network.
- Permutation Calibration: They use standard permutation testing to provide exact finite-sample significance levels (p-values).
- Rank Fusion: To avoid picking a single "best" noise scale (bandwidth), they compute the test across a grid of scales and fuse the results using a soft-maximum of their permutation ranks.
Datasets
The authors evaluated their method on two standard benchmarks:
- Blob: A synthetic 2D dataset consisting of a grid of Gaussian mixtures where the difference between distributions is subtle (changes in local correlation).
- MNIST: The classic handwritten digit dataset, downsampled to $7 \times 7$. They tested various alternatives where certain digit classes were withheld or reweighted to create distribution shifts.
Key Insights and Ideas
- Dynamics over Endpoints: By integrating over the path, the test captures transport dynamics. For Gaussian noise, the divergence is shown to be a time integral pairing the "reflection defects" of the velocity field and the score function.
- The "Narrow-Plus-Broad" Noise: To prove theoretical optimality, the authors designed a specific noise law that combines a narrow component (to resolve fine details) with a broad component (to ensure a density floor). This allows the test to handle densities that might have zero support in some regions.
- Minimax Optimality: The test is proven to attain the minimax separation rate $n^{-2s/(4s+d)}$ for Sobolev smoothness $s$. This means it is as sensitive as any possible test can be for this class of distributions.
- Adaptivity without Splitting: Using "Rank Fusion," the test adapts to unknown smoothness levels without needing to split the data into training and testing sets, which is a common drawback of other adaptive tests.
Key Results
The proposed test, referred to as "Ours" in the benchmarks, consistently matched or exceeded the power of state-of-the-art kernel tests like MMDAgg and MMD-FUSE.
- Blob Dataset: At a sample size of $n=180$, the test achieved a power of 0.526, significantly higher than MMDAgg (0.405) and MMD-FUSE (0.403). At $n=270$, it even outperformed "Oracle" MMD tests that were given extra data for parameter tuning.
- MNIST Dataset: The test was at least as powerful as every competitor across all tested alternatives. On intermediate-difficulty tasks (Q3), it achieved a power of 0.77 compared to 0.62 for MMD-FUSE.
Limitations and Future Work
- Computational Cost: The test involves calculating a divergence between mixtures of $n^2$ kernels. While the authors use importance sampling to estimate this, the cost is still $O(J \cdot n^2)$ per channel, where $J$ is the number of Monte Carlo points. This is more expensive than a standard $O(n^2)$ MMD implementation.
- High Dimensions: While the test performed well on $7 \times 7$ MNIST (49 dimensions), the authors note that a broader empirical study in even higher dimensions is a task for future work.
- Monte Carlo Uncertainty: The use of importance sampling introduces some numerical error, though the authors provide theoretical bounds showing this error can be controlled.
Overall, the paper provides a beautiful bridge between the modern world of generative modeling and the classical world of non-parametric hypothesis testing.
Summary updated