Two-Sample Testing for Random Graphs without Vertex Correspondence
stat.ML, cs.LG
Submitted: 2026-10-05
Updated: 2026-10-05
License: http://creativecommons.org/licenses/by/4.0/
The gist: Two populations of graphs often have to be compared without any correspondence between their vertices, for instance when networks come from different communities, or when a graph generative model is
Abstract
Two populations of graphs often have to be compared without any correspondence between their vertices, for instance when networks come from different communities, or when a graph generative model is evaluated against held-out graphs. We study how many graphs such an unaligned two-sample test needs, and which graph statistics can detect which differences. For an Erdős--Rényi null and a planted two-block difference that leaves every expected degree unchanged, we show that m t-3 graphs per group are necessary and sufficient when the per-graph signal-to-noise ratio is t<1. Signed triangle counts attain this rate, and the lower bound holds for every graph size. With aligned vertices m t-1 graphs suffice, so misalignment costs a factor of order t-2. When the triangle signal cancels, the rate becomes t-4 and 4-cycles are needed. Statistics built from trees have exactly the same expectation under both hypotheses, and tests based on finitely many of them have asymptotically no power. In the graphon limit, this class includes degree distributions and message-passing graph neural network features. For a non-constant null, a generic difference is visible at first order, and a simple motif test attains the aligned order of sample size, suggesting that misalignment is costly mainly for differences that are invisible at low orders. We also give an exactly valid test for one or two graphs per group, at a cost in power. In our simulations, the fitted exponents are close to the predicted ones, and degree-based and random-GNN evaluation metrics stay at their level in a setting where signed triangles need about 65 graphs.
Sources
- Sharp Detection Threshold for Correlation among Multiple Unlabeled Gaussian Networks
- Optimal hypothesis testing for stochastic block models with growing degrees
- Low-degree lower bounds via almost orthonormal bases
- Detecting Planted Partition in Sparse Multi-Layer Networks
- Hypothesis testing for populations of networks
- Vertex misalignment and changepoint localization in network time series
- Lov'asz Meets Weisfeiler and Leman
- Detecting Arbitrary Planted Subgraphs in Random Graphs
- Testing Network Structure Using Relations Between Small Subgraph Probabilities
- Two-sample Testing Using Deep Learning
- PolyGraph Discrepancy: a classifier-based metric for graph generation
- Notes on Computational Hardness of Hypothesis Testing: Predictions using the Low-Degree Likelihood Ratio
- TUDataset: A collection of benchmark datasets for learning with graphs
- Multivariate Inference of Network Moments by Subsampling
- Graphon based Clustering and Testing of Networks: Algorithms and Theory
- Sharp Low-Degree Thresholds for Planted-vs-Planted Testing
Related papers
- Behavior of prediction performance metrics with rare events
- Optimal Estimation of Generic Dynamics by Path-Dependent Neural Jump ODEs
- A Posterior-Dynamics Framework for Imaging Inverse Problems with Pretrained Diffusion Priors
- Efficient quadratic entropy with distance sketches
- Embedding-Bias in Conditional Independence Testing
- From Log-Odds to Shapley Values: An Explanatory Geometry for the Weighted Naive Bayes Classifier