# Global and Local Two-Sample Tests via Regression

arXiv: https://arxiv.org/abs/1812.08927 · HTML: https://mlsanity.com/paper/1812.08927/

## Key facts

- Cited by 11 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 21 Dec 2018.

## Built on by (most cited first, 11 of 11)

- [Sequential Predictive Two-Sample and Independence Testing](https://mlsanity.com/paper/2305.00143/) (2023)
- [L-C2ST: Local Diagnostics for Posterior Approximations in Simulation-Based Inference](https://mlsanity.com/paper/2306.03580/) (2023)
- [A Practical Guide to Sample-based Statistical Distances for Evaluating Generative Models in Science](https://mlsanity.com/paper/2403.12636/) (2024)
- [Validation Diagnostics for SBI algorithms based on Normalizing Flows](https://mlsanity.com/paper/2211.09602/) (2022)
- [Distance and Kernel-Based Measures for Global and Local Two-Sample Conditional Distribution Testing](https://mlsanity.com/paper/2210.08149/) (2022)
- [Variable Selection in Maximum Mean Discrepancy for Interpretable Distribution Comparison](https://mlsanity.com/paper/2311.01537/) (2023)
- [General Frameworks for Conditional Two-Sample Testing](https://mlsanity.com/paper/2410.16636/) (2024)
- [Detecting Distributional Differences in Labeled Sequence Data with Application to Tropical Cyclone Satellite Imagery](https://mlsanity.com/paper/2202.02253/) (2022)
- [Conformal C2ST: Turning weak classifiers into strong two-sample tests](https://mlsanity.com/paper/2507.17026/) (2025)
- [Identifying Distributional Differences in Convective Evolution Prior to Rapid Intensification in Tropical Cyclones](https://mlsanity.com/paper/2109.12029/) (2021)
- [Boosting Statistic Learning with Synthetic Data from Pretrained Large Models](https://mlsanity.com/paper/2505.04992/) (2025)

## Abstract (arXiv)

Two-sample testing is a fundamental problem in statistics. Despite its long history, there has been renewed interest in this problem with the advent of high-dimensional and complex data. Specifically, in the machine learning literature, there have been recent methodological developments such as classification accuracy tests. The goal of this work is to present a regression approach to comparing multivariate distributions of complex data. Depending on the chosen regression model, our framework can efficiently handle different types of variables and various structures in the data, with competitive power under many practical scenarios. Whereas previous work has been largely limited to global tests which conceal much of the local information, our approach naturally leads to a local two-sample testing framework in which we identify local differences between multivariate distributions with statistical confidence. We demonstrate the efficacy of our approach both theoretically and empirically, under some well-known parametric and nonparametric regression methods. Our proposed methods are applied to simulated data as well as a challenging astronomy data set to assess their practical usefulness.
