A Kernelised Stein Discrepancy for Assessing the Fit of Inhomogeneous Random Graph Models

Anum Fatima, Gesine Reinert · DOI

Introduction

In network science, Inhomogeneous Random Graph (IRG) models are frequently employed to represent complex systems like social networks or protein interactions. While IRGs offer flexibility by allowing varying connection probabilities between node pairs, assessing their "goodness-of-fit" remains a significant challenge. Traditional statistical tests often require multiple independent observations of a network or rely on asymptotic assumptions that fail for small-to-medium graphs.

To address this, researchers have developed IRG-gKSS (Inhomogeneous Random Graph - graph Kernel Stein Statistic), a novel hypothesis test based on Kernelised Stein Discrepancy (KSD). This approach enables the assessment of model fit using only a single observed network, effectively identifying structural anomalies—such as hidden cliques or hubs—that traditional tests like the Generalised Likelihood Ratio (GLR) often miss.

Methodology

The IRG-gKSS method integrates two advanced mathematical frameworks:

  1. Stein’s Method: A technique for comparing probability distributions. The authors define a Stein operator for IRGs based on Glauber dynamics, which simulates the flipping of edges to observe structural changes.
  2. Graph Kernels: Specifically, the Weisfeiler-Lehman (WL) kernel is used to create a "structural signature" of the network, capturing both local and global patterns like clusters and paths.

The test procedure involves a null hypothesis ($H_0$) stating that the observed network was generated by a specific IRG model. By simulating networks from the model and calculating the gKSS for each, a null distribution is constructed. If the observed network's gKSS is an outlier, the model is rejected.

Performance and Efficiency

The IRG-gKSS test demonstrates superior power in detecting model discrepancies compared to standard baselines. In synthetic experiments involving "planted" hubs and cliques, the test successfully identified the lack of fit even for small anomalies, whereas the GLR test failed to identify any discrepancy.

Proportion of rejected null hypotheses as a function of hub degree $R$ (left) and clique size $k$ (right). IRG-gKSS variants significantly outperform the GLR baseline.

To handle large-scale networks, the authors introduced an edge re-sampling variant. This version reduces computational overhead by evaluating only a fraction of possible edge flips. Results indicate that re-sampling just 25% of edge pairs (IRG-gKSS_25) yields accuracy nearly identical to the full test, maintaining high statistical power.

Power of the IRG-gKSS test with different re-sampling rates. The 25% re-sampling version (IRG-gKSS_25) maintains high power compared to the full test.

Real-World Applications

The method was validated on several classic benchmarks, including Zachary’s Karate Club and Lazega’s Lawyers network. Notably, for the Karate Club network, the IRG-gKSS rejected all standard models (ER, SBM, and DCSBM), suggesting that even degree-corrected models fail to capture the intricate social dependencies within that community.

Conclusion and Future Directions

The IRG-gKSS provides a robust, theoretically grounded tool for network model assessment. Its ability to work with a single observation makes it highly practical for real-world data. Future work aims to extend the test to "composite" hypotheses where model parameters are estimated from the data itself and to further optimize the computational cost for massive networks with millions of nodes.

Summary updated

BibTeX
@inproceedings{fatima2026kernelised,
  author = {Anum Fatima and Gesine Reinert},
  title = {{A Kernelised Stein Discrepancy for Assessing the Fit of Inhomogeneous Random Graph Models}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2026},
  url = {https://openreview.net/forum?id=xTDNeJVfXB},
}
Figure