arXiv:2610.05684stat.MLOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.05684

Two-Sample Testing via Path-based Inference

Eshant English, Wei-Cheng Lai, Yanfeng Yang, Kenji Fukumizu, Taiji Suzuki, Christoph Lippert

Abstract

Modern deep generative models are primarily studied for their ability to generate realistic samples, yet the generative dynamics they learn can also serve as objects of statistical inference. We develop this idea for two-sample testing, the problem of deciding whether the same distribution generated two finite datasets. Using stochastic interpolants, we connect both distributions to a shared Gaussian bottleneck, so that each half of the resulting path is a Gaussian channel acting on a single population. We prove that the null hypothesis holds if and only if the population denoiser, or equivalently, the velocity fields of the two halves, coincide at any single noise level, which amounts to a reflection symmetry of the path about the bottleneck. Deviations from this symmetry yield a continuum of two-sample witnesses, which we estimate via held-out regression risks on learned denoisers and velocities and aggregate along the path; under an information-theoretic weighting, the aggregated discrepancy equals the Jeffreys divergence between the noise-smoothed distributions. Calibrating the resulting statistics by permutation yields tests that are valid in finite samples for any trained networks and consistent when the fields are learned accurately. On a synthetic benchmark and three image benchmarks, the proposed tests improve power over the strongest baseline by up to 33 percentage points at an equal total sample budget, with the best choice of regression representation and path weighting depending on the data modality. These results show that generative paths provide a principled representation for statistical testing, extending stochastic-interpolant models beyond generation.

Keywords: Two-Sample Testing, Generative Modelling, Dynamic Transport

*. Equal contribution, sorted in alphabetical order. Contact email: eshant.english@outlook.co.nz, weicheng.lai@hpi.de

Contents

1 Introduction 3

2 Preliminaries 5
2.1 Stochastic Interpolants 5
2.2 Two-Sample Testing 7

3 Path-Based Two-Sample Testing 7
3.1 A Gaussian-Bottleneck Interpolant 7
3.2 Denoiser and Velocity Fields 9
3.3 Path Invariance Characterises the Null 10
3.4 Held-Out Risk Witnesses 11
3.5 Path Aggregation 12
3.6 Held-Out Permutation Calibration 15
3.7 Consistency 17
3.8 Relationship between the Four Variants 20
3.9 Monte Carlo Approximation over the Path 21

4 Experiments 23
4.1 High-Dimensional Gaussian Mixtures 24
4.2 MNIST 26
4.3 OrganAMNIST 27
4.4 Fashion-MNIST 27
4.5 Type-I Error 28
4.6 Samples from the Fitted Models 29
4.7 Ablation on Model Architecture 29

5 Observation-Level Asymmetry under Corruption 34

6 Related Work 36

7 Discussion and Limitations 38

A Experimental Details and Notations 40

B Per-Benchmark Power and Type-I Error Curves 41

References (59)