stat.MLOct 5, 2026

Two-Sample Testing for Random Graphs without Vertex Correspondence

Authors: Soham Dan

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−3m\asymp t^{-3} graphs per group are necessary and sufficient when the per-graph signal-to-noise ratio is t<1t<1. Signed triangle counts attain this rate, and the lower bound holds for every graph size. With aligned vertices m≍t−1m\asymp t^{-1} graphs suffice, so misalignment costs a factor of order t−2t^{-2}. When the triangle signal cancels, the rate becomes t−4t^{-4} and 44-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 6565 graphs.

Figures & tables

Appendix figures & tables8 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Sep 27, 2026stat.ML

Two-Sample Testing for Inhomogeneous Random Graphs in Non-Integral LrL_r Norms

Testing whether two populations of networks share the same edge probabilities is a basic problem in network inference. How hard it is depends on the norm used to measure the difference. For the inhomogeneous Erdős--Rényi (IER) model, the optimal sample complexity is known for every integer LrL_r norm and for 1≤r<21\le r<2. For non-integral r>2r>2, however, the known upper and lower bounds do not match, and the lower bound was conjectured to be tight. We study this gap for two-sample testing on aligned vertices. We propose a test that runs two published statistics, of orders 22 and ⌈r⌉\lceil r\rceil, on the same data and rejects if either one rejects. Its thresholds come from Hölder interpolation, so that both statistics have the same sample cost. We prove that this test attains the conjectured rate. Combined with earlier results, this shows that for every fixed r≥1r\ge1 the minimax sample complexity is of order nmax⁡{4/r−1, 2/r}/ε2n^{\max\{4/r-1,\,2/r\}}/ε^2, even when the separation changes with nn. In simulations with nn between 32 and 256, the number of graphs needed for 80% power at level 0.050.05 grows with nn at a rate consistent with the theory. For r=2.5r=2.5, for example, the fitted exponent is 0.780.78, against the theoretical value 0.80.8. Interestingly, the two statistics split the work as the interpolation argument suggests: the higher-order statistic is more powerful when only a few edges change, and the L2L_2 statistic when many edges change.
Sep 19, 2026stat.AP

Auditing Bayesian Graph Alignment: Diagnostic Comparisons and Reference Failure

Bayesian graph alignment estimates correspondence probabilities, but convergence of an alignment-score trace need not imply accurate correspondence marginals. We audit this gap on 240 new exact graph pairs from four source families, 240 larger pairs with 20-100 vertices, and a separate 60-case exact implementation check. Under an explicit edge-flip likelihood, we compare three samplers and score, marginal, indicator, categorical, and classifier-based diagnostics. Marginal disagreement improves error discrimination over score R-hat for the exact informed sampler, but its improvement for vanilla local sampling is uncertain. Assignment-based R* and short indicator panels are competitive; no diagnostic dominates across samplers and endpoints. At larger sizes, diagnostics predict subsequent marginal changes, not posterior error, and classification performance depends on the drift threshold. Disjoint-window and held-out-chain checks attenuate but preserve positive associations. Only 22 of 240 original reference sets pass an agreement screen. On forty failure-selected cases, eightfold SMC particle escalation does not resolve disagreement, whereas additional rejuvenation helps. Longer informed runs remain unstable. An elementary feasible-alignment bound demonstrates severely unrepresentative SMC and informed-chain scores in concentrated 100-vertex cases, independently of approximate reference consensus. We also exhibit common-start chains with near-zero disagreement despite exact marginal error near .967. These results support assignment-sensitive auditing while identifying limits of finite budgets, diagnostic rankings, and reference agreement as evidence of accuracy.
Nov 21, 2025cs.IT

A Fast Binary Splitting Approach for Non-Adaptive Learning of Erdős--Rényi Graphs

We study the problem of learning an unknown graph via group queries on node subsets, where each query reports whether at least one edge is present among the queried nodes. In general, learning arbitrary graphs with nn nodes and kk edges is hard in the non-adaptive setting, requiring Ω(min⁡{k2log⁡n, n2})Ω\big(\min\{k^2\log n,\,n^2\}\big) tests even when a small error probability is allowed. We focus on learning Erdős--Rényi (ER) graphs G∼ER(n,q)G\sim\mathrm{ER}(n,q) in the non-adaptive setting, where the expected number of edges is kˉ=q(n2)\bar{k}=q\binom{n}{2}, and we aim to design an efficient testing--decoding scheme, namely, a non-adaptive test design together with a decoding algorithm, achieving asymptotically vanishing error probability. Prior work (Li--Fresacher--Scarlett, NeurIPS 2019) presents a testing--decoding scheme that attains an order-optimal number of tests O(kˉlog⁡n)O(\bar{k}\log n) but incurs Ω(n2)Ω(n^2) decoding time, whereas their proposed sublinear-time algorithm incurs an extra (log⁡kˉ)(log⁡n)(\log \bar{k})(\log n) factor in the number of tests. We extend the binary splitting approach, recently developed for non-adaptive group testing, to the ER graph learning setting, and prove that the edge set can be recovered with high probability using O(kˉlog⁡n)O(\bar{k}\log n) tests while attaining decoding time O(kˉ1+δlog⁡n)O(\bar{k}^{1+δ}\log n) for any fixed δ>0δ>0.