# A new graph-based two-sample test for multivariate and object data

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

## Key facts

- Cited by 24 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 24 Jul 2013.

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

- [SDF-StyleGAN: Implicit SDF-Based StyleGAN for 3D Shape Generation](https://mlsanity.com/paper/2206.12055/) (2022)
- [3D Shape Generation with Grid-based Implicit Functions](https://mlsanity.com/paper/2107.10607/) (2021)
- [Octree Transformer: Autoregressive 3D Shape Generation on Hierarchically Structured Sequences](https://mlsanity.com/paper/2111.12480/) (2021)
- [A Witness Two-Sample Test](https://mlsanity.com/paper/2102.05573/) (2021)
- [Meta Two-Sample Testing: Learning Kernels for Testing with Limited Data](https://mlsanity.com/paper/2106.07636/) (2021)
- [Boosting the Power of Kernel Two-Sample Tests](https://mlsanity.com/paper/2302.10687/) (2023)
- [Kernel Two-Sample Tests for Manifold Data](https://mlsanity.com/paper/2105.03425/) (2021)
- [Online Kernel CUSUM for Change-Point Detection](https://mlsanity.com/paper/2211.15070/) (2022)
- [A Unified Data Representation Learning for Non-parametric Two-sample Testing](https://mlsanity.com/paper/2412.00613/) (2024)
- [Kernel Two-Sample Tests in High Dimension: Interplay Between Moment Discrepancy and Dimension-and-Sample Orders](https://mlsanity.com/paper/2201.00073/) (2021)
- [A label-efficient two-sample test](https://mlsanity.com/paper/2111.08861/) (2021)
- [Self-Supervised Metric Learning in Multi-View Data: A Downstream Task Perspective](https://mlsanity.com/paper/2106.07138/) (2021)
- [Zero-Flow Two-Sample Tests](https://mlsanity.com/paper/2607.21542/) (2026)
- [A fast and effective kernel two-sample test for large-scale data](https://mlsanity.com/paper/2110.03118/) (2021)
- [Adversarial Attack and Defense for Non-Parametric Two-Sample Tests](https://mlsanity.com/paper/2202.03077/) (2022)
- [Advanced Tutorial: Label-Efficient Two-Sample Tests](https://mlsanity.com/paper/2501.03568/) (2025)
- [Kernel Embeddings and the Separation of Measure Phenomenon](https://mlsanity.com/paper/2505.04613/) (2025)
- [Likelihood Ratio Tests by Kernel Gaussian Embedding](https://mlsanity.com/paper/2508.07982/) (2025)
- [Inference for Similarity and Alignability between Noisy High-Dimensional Datasets](https://mlsanity.com/paper/2511.21074/) (2025)
- [Bootstrapped Edge Count Tests for Nonparametric Two-Sample Inference Under Heterogeneity](https://mlsanity.com/paper/2304.13848/) (2023)
- [Goodness-of-Fit and Clustering of Spherical Data: the QuadratiK package in R and Python](https://mlsanity.com/paper/2402.02290/) (2024)
- [Efficient and Stable Multi-Dimensional Kolmogorov-Smirnov Distance](https://mlsanity.com/paper/2504.11299/) (2025)
- [DRtool: An Interactive Tool for Analyzing High-Dimensional Clusterings](https://mlsanity.com/paper/2509.04603/) (2025)
- [What FID Hides: Detecting, Ranking, and Diagnosing Deviations in Generative Evaluation](https://mlsanity.com/paper/2608.24881/) (2026)

## Abstract (arXiv)

Two-sample tests for multivariate data and especially for non-Euclidean data are not well explored. This paper presents a novel test statistic based on a similarity graph constructed on the pooled observations from the two samples. It can be applied to multivariate data and non-Euclidean data as long as a dissimilarity measure on the sample space can be defined, which can usually be provided by domain experts. Existing tests based on a similarity graph lack power either for location or for scale alternatives. The new test utilizes a common pattern that was overlooked previously, and works for both types of alternatives. The test exhibits substantial power gains in simulation studies. Its asymptotic permutation null distribution is derived and shown to work well under finite samples, facilitating its application to large data sets. The new test is illustrated on two applications: The assessment of covariate balance in a matched observational study, and the comparison of network data under different conditions.
