Dutta, Upasana and Aaron Clauset

The configuration model is a standard tool for generating random graphs with a specified degree sequence, and is often used as a null model to evaluate how much of an observed network’s struc- ture is explained by its degrees alone. Except for networks with both self-loops and multi-edges, we lack a direct sampling algorithm for the configuration model, e.g., for simple graphs. A Markov chain Monte Carlo (MCMC) algorithm, based on a degree-preserving double-edge swap, provides an asymptotic solution to sample from the configuration model without bias. However, accurately de-tecting convergence of this Markov chain on its stationary distribution remains an unsolved problem. Here, we provide a concrete solution to detect convergence and sample from the configuration model without bias. We first develop an algorithm for estimating a sufficient gap between sampled MCMC states for them to be effectively independent. Applying this algorithm to a corpus of 509 empirical networks, we derive a set of computationally efficient heuristics, based on scaling laws, for choosing this sampling gap automatically. We then construct a convergence detection method that applies a Kolmogorov–Smirnov test to sequences of network assortativity values derived from the Markov chain’s sampled states. Comparing this test to three generic Markov chain convergence diagnostics, we find that our method is both more accurate and more efficient at detecting convergence.