Title: Network two-sample test for block models
Venue: NeurIPS 2025
Accepted: yes
Keywords: Stochastic block model

SBM

two-sample test

spectral graph matching
Abstract: We consider the two-sample testing problem for networks, where the goal is to determine whether two sets of networks originated from the same stochastic model. Assuming no vertex correspondence and allowing for different numbers of nodes, we address a fundamental network testing problem that goes beyond simple adjacency matrix comparisons. We adopt the stochastic block model (SBM) for network distributions, due to their interpretability and the potential to approximate more general models. The lack of meaningful node labels and vertex correspondence translate to a graph matching challenge when developing a test for SBMs.
We introduce an efficient algorithm to match estimated network parameters, allowing us to properly combine and contrast information within and across samples, leading to a powerful test. We show that the matching algorithm, and the overall test are consistent, under mild conditions on the sparsity of the networks and the sample sizes, and derive a chi-squared asymptotic null distribution for the test.
Through a mixture of theoretical insights and empirical validations, including experiments with both synthetic and real-world data, this study advances robust statistical inference for complex network data.


Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper proposes a hypothesis testing approach to determine whether two sequences of graphs are generated from an SBM with the same set of parameters. The approach consists of two separate modules: a spectral-based component to address the lack of labels, and a component of a statistical test. In general, the main ideas are clearly presented, which makes the approach convincing.\n\nSTRENGTHS AND WEAKNESSES:\nThe paper is well-organized, and key ideas are well-explained. Sufficient theoretical justifications are provided, and thus the proposed approach is convincing. However, I still have a few concerns.  \n1. Motivation: I think the authors should give a more convincing argument regarding why the problem itself (including the assumptions, such as using SBM to generate the graph sequences) is important in practice. Though the paper has studied the real dataset COLLAB, it serves to verify the effectiveness of the algorithm. It is unclear to me the practical use of testing whether two sequences of graphs from COLLAB are from the same distribution. The authors are not required to perform any additional numerical study, but they should describe scenarios where the problem is important. \n2. SBM: The paper focuses on graphs generated from SBM. It is indeed true that SBM can approximate graphs sampled from graphons, but provided the number of blocks becomes arbitrarily large. Therefore, I think considering SBM is somehow restricted. Please discuss.\n3. Spectral-based matching: Spectral-based matching is not a new idea (e.g., [1-3]), though it may not have been directly applied to the problem studied in the paper. The authors should thoroughly discuss existing works on spectral-based graph matching.  \n4. Theoretical results: I think the theoretical results are not particularly instructive in their current form. For example, quantities such as $\\gamma_n, \\xi_r$ seem to come from nowhere and are hard to understand. It is unclear how to verify the validity of the complicated conditions of the theorems, and assess whether those numerical bounds are useful or not. The $(\\theta, \\eta)$-friendly condition in Definition 2.1 should be a key condition. However, its motivation is unclear, and how should one verify the condition given a sequence of graphs?\n5. Proofreading: It seems that the authors haven't carefully proofread the paper. For example, eq. (60) in line 169 and eq. (59) in line 205 are missing. In line 230 (Remark 4.1), \"more details\" are not in C.3 (seems they are in D). \n\nBased on the above, I give a Rating of 3. However, I may change my assessment and the rating based on the rebuttal.\n\n[1] https://arxiv.org/pdf/1602.04181\n\n[2] http://www.stat.yale.edu/~yw562/teaching/684/GM-grampa.pdf  (presentation slides)\n\n[3] https://arxiv.org/pdf/2306.15747\n\nQUESTIONS:\nSee \"Strengths And Weaknesses\".\n\nLIMITATIONS:\nNo. There are some discussions of limitations in \"Conclusion\", however, the discussion is not thorough.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "CLARITY": 2, "IMPACT": 2, "ORIGINALITY": 3, "DATE": "2025-06-16"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper studies the two-sample test for the stochastic block model (SBM), where the goal is to determine whether two sets of networks come from the same SBM (i.e., the parameters of the SBM underlying the two sets of networks are the same) or not. The paper focuses on the scenario where nodes have no labels and therefore cannot be matched in different networks/sets. The paper proposes a novel test based on a spectral matching algorithm to recover the mapping between nodes in two networks from noisy observations from the same SBM (i.e., under the null hypothesis). The paper proves that the matching algorithm is consistent, and that under some assumptions the test statistic defined in the paper follows a chi-square distribution.  It also shows that the test correctly identifies two networks as coming from different SBMs under some conditions. The paper presents an experimental evaluation on synthetic and real data.\n\nSTRENGTHS AND WEAKNESSES:\nSTRENGHTS\nThe two-sample test for the stochastic block model without node labels is interesting and non-trivial.\n\nThe theoretical results in the paper are interesting and somehow comprehensive, addressing both the limiting distribution under the null hypothesis and the power of the proposed.\n\nThe paper is mostly well written.\n\nWEAKNESSES\n\nThe paper does not consider an arbitrary SBM, but an SMB where nodes are placed in communities i.i.d. according to some probability distribution, that somehow places some additional structure on the problem (compared to an arbitrary SBM).  Also, in the final formulation of the problem, the proportion of communities could be very different under the null hypothesis: when the proportions are very different, it seems strange to say that the underlying SBM is the same. \n\nThe method seems to require the number K of communities in the underlying SBM, or, equivalently, that the SBM inference algorithms used by the test detect the correct value of K. This seems very unrealistic.\n\nWhile the paper is mostly well written, in the technical part some quantities are not defined. For example, in the summary of results, N and n are used but not defined. Also, in 4.2, C_1 and C_2 are not defined, N is used before it is defined, and the same for some other symbols.\n\nThe restrictions required by the theoretical results seem stringent. For example, the fact that communities are “sparse” may be violated in practice. \n\nThe experimental results could be expanded.\n\nIn the supplement, there is a section “C.6 Sample graphs for real-world data “ with no content.\n\nQUESTIONS:\nIs the correct value of K required by the proposed method? If so, the experimental evaluation could explore the results (e.g., false positives, false negatives, etc.) when the incorrect value of K is used.\n\nHow does the method perform in practice when the proportions of nodes in the same community are extremely different?\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 3, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-06-24"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe author(s) propose a two sample testing problem for a number of networks where vertex correspondence is not needed and the number of nodes may vary. The proposed test statistic consists of two separate steps -(a). matching step which finds an approximate matching between a pair of connectivity matrices and (b) constructing a discrepancy measure between the two matched connectivity matrices. The theoretical results how the asymptotic distribution and the consistency of the test statistic. The proposed testing procedure shows superior performance over its competitors in the simulated and the real data examples.\n\nSTRENGTHS AND WEAKNESSES:\nstrengths:\n\n1. Rigorously explaining the fundamental difference between two sample network testing problem between labelled and unlabelled networks\n2. Clearly motivating and describing the importance of the problem along with the challenges\n3. The first step in the test-statistic construction i.e. estimating the permutation matrix $\\hat{P}$ via solving an LAP from noisy observations is clearly described and has lots of merits as this tries to solve a novel and difficult problem.\n4. Theoretical results on the asymptotic distribution of the test statistic and the consistency has been proved with careful arguments  and involve novel proof techniques.\n5. Sufficient evidence showing superior performance of the proposed test statistic on different types of simulated data and on the real world network data as well.\n\nweakness:\n\n1. Experiments do not show the scalability of the spectral matching algorithm 1 with the network size\n2. There were not much discussion in terms of how different community detection algorithms affect the final test statistic.\n3. The theoretical section lacked enough interpretation or explanation on the assumptions used in Theorem 1 and Theorem 2 respectively.\n\nQUESTIONS:\nOverall, I think the paper bring an important contribution to the network literature in terms of doing statistical inference therein. I think there are definitely some novel elements especially, the construction of the test statistic based on the matching step in algorithm . I have the following queries for the author(s).\n\n1. It would be good to see the scalability of Algorithm 1  in some experiments by varying the network size.\n2. Some explanation or interpretation of the assumptions used in Theorem 1 and Theorem 2 would be useful for the readers.\n3. It would be good to see the difficulty of the testing problem by varying the noise level $\\epsilon$.\n4.  Is it possible to improve R.H.S of equation (16) by having the minimum of the two Frobenius norms rather than the sum?\n5. As I mentioned in the weakness, some discussion about how different community detection algorithms affect the final test-statistic would be good.\n\nOne minor point I could not see section C.3 or F.5. I assume this is in the appendix but I could not see it when I downloaded your paper from the NeurIPS site.\n\nLIMITATIONS:\nyes", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 5, "CLARITY": 3, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-07-01"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper studies a 2-sample network testing problem: Each sample contains a few networks drawn from SBMs with the same $K\\times K$ matrix $B$ but possibly different number of nodes, and there is no node correspondence among these networks. The null hypothesis is that the matrices $B_1$ and $B_2$ for two samples are the same subject to a permutation. A chi-square test statistic is proposed. It first alines all networks within each sample by permutation, then searches for a community permutation to align the two samples, and finally constructs a chi-square test. Theoretical properties of the test statistic under both the null and alternative hypotheses are provided.\n\nSTRENGTHS AND WEAKNESSES:\nThis paper contains both theoretical results and numerical results. Writing is very clear and easy to digest.\n\nQUESTIONS:\nIf my understanding correctly, your proof of theory relies on that the permutation matrices find to aline the estimated communities within and between two samples need to be \"exactly correct\" with probability tending to $1$. There are $O(N_1+N_2)$ number of permutation matrices. Assuming all of them being correct is almost unrealistic in practice. Does your statistic work when a small number of these permutation matrices are incorrect?\n\nLIMITATIONS:\nWhile I appreciate the clear writing and the theoretical results in this paper, I think it has some significant limitation. \n\n1. It lacks evidence that this testing problem is practically meaningful: The authors assume that the networks are from SBM. But this model is too ideal to fit many real networks. In practice, the lack-of-fit effect of SBM will most likely dominate the two-sample difference, making the testing problem meaningless. Other models such as the degree-corrected SBM (DCSBM) will be more realistic, but the current test cannot be extended to DCSBM. \n\n2. I doubt that the method works in practice. The algorithm requires finding $O(N_1+N_2)$ number of $K\\times K$ permutation matrices. The theory is susceptible to getting the correct permutation matrices for all of them (or the majority of them). However, when this happens, it actually means that the individual network are dense enough (e.g., $n\\nu_n\\to\\infty$). This is a strong-signal case, making the testing problem less interesting. When we have multiple networks in one sample, we hope that only $Nn\\nu_n\\to\\infty$ is required. Under this conditions, it is impossible to guarantee that most of those $O(N_1+N_2)$ permutation matrices are correct. \n\n3. There is not much technical novelty in this work. The analysis is pretty straightforward given the existing works (such as [3,4]). \n\n4. The paper misses some relevant reference on 2-sample network testing, such as Jin et al. (2024) Optimal network pairwise comparison.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 5, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 2, "DATE": "2025-07-02"}