Matching Algorithms in the Sparse Stochastic Block Model
Anna Brandenberger, Byron Chin, Nathan S. Sheffield, Divya Shyamal
TL;DR
This work extends the classical Karp–Sipser analysis from sparse Erdős–Rényi graphs to the stochastic block model, focusing on the sparse regime $p_{ij}=\Theta(1/n)$ and distinguishing regimes where simple offline and online matching algorithms remain near-optimal. The authors show that the Karp–Sipser algorithm achieves near-optimal offline matchings in equitable SBMs, the sub-critical regime, and certain bipartite ER-like cases, but can fail on more general block structures; they develop a blocked configuration model and a differential-equation framework (via Wormald’s theorem) to formalize these results. For online matching, they analyze four linear-time heuristics, proving GREEDY is optimal in the equitable case and BRUTE-FORCE is asymptotically optimal in general, with the others lacking universal optimality; they provide counterexamples and discuss potential label-aware improvements. Overall, the paper advances understanding of matching in structured random graphs, clarifying when simple algorithms suffice and when more sophisticated strategies are necessary, with implications for scalable online allocation in networks with community structure. The results bridge offline and online perspectives and offer a foundation for further refinement of algorithms tailored to stochastic block models.
Abstract
The stochastic block model (SBM) is a generalization of the Erdős--Rényi model of random graphs that describes the interaction of a finite number of distinct communities. In sparse Erdős--Rényi graphs, it is known that a linear-time algorithm of Karp and Sipser achieves near-optimal matching sizes asymptotically almost surely, giving a law-of-large numbers for the matching sizes of such graphs in terms of solutions to an ODE. We provide an extension of this analysis, identifying broad ranges of stochastic block model parameters for which the Karp--Sipser algorithm achieves near-optimal matching sizes, but demonstrating that it cannot perform optimally on general SBM instances. We also consider the problem of constructing a matching online, in which the vertices of one half of a bipartite stochastic block model arrive one-at-a-time, and must be matched as they arrive. We show that the competitive ratio lower bound of 0.837 found by Mastin and Jaillet for the Erdős--Rényi case is tight whenever the expected degrees in all communities are equal. We propose several linear-time algorithms for online matching in the general stochastic block model, but prove that despite very good experimental performance, none of these achieve online asymptotic optimality.
