Definition
The stochastic block model (SBM) is a probabilistic generative model for random graphs that incorporates latent community (or block) structure. In an SBM, each vertex is assigned to one of $K$ latent groups (blocks). Conditional on these assignments, edges between pairs of vertices are generated independently, with probability determined solely by the groups to which the incident vertices belong. The model is defined by a block‑membership vector $\mathbf{z} = (z_1,\dots,z_n)$ and a $K \times K$ matrix of connection probabilities $\mathbf{P}$, where $P_{ab}$ is the probability of an edge between any vertex of group $a$ and any vertex of group $b$.
Mathematical formulation
For a graph with $n$ vertices:
- Assign each vertex $i$ a group label $z_i \in {1,\dots,K}$ according to a prior distribution $\pi = (\pi_1,\dots,\pi_K)$, where $\pi_a = \Pr(z_i = a)$.
- For each unordered pair $(i,j)$ ($i
eq j$), create an edge $A_{ij}$ with probability
$$ \Pr(A_{ij}=1 \mid z_i = a,, z_j = b) = P_{ab}, $$
independently of all other pairs.
The likelihood of an observed adjacency matrix $A$ given $\mathbf{z}$ and $\mathbf{P}$ is
$$
\mathcal{L}(A \mid \mathbf{z},\mathbf{P}) = \prod_{i<j} P_{z_i z_j}^{A_{ij}} (1-P_{z_i z_j})^{1-A_{ij}} .
$$
Historical background
The SBM was introduced in the social‑science literature as a “latent class model” for relational data (Holland, Laskey, & Leinhardt, 1983). Its formal use in network science for community detection emerged in the early 2000s, notably through work on likelihood‑based inference (Snijders, 2001) and later on algorithmic approaches (Karrer & Newman, 2011; Decelle et al., 2011).
Inference methods
| Approach | Description | Typical computational cost |
|---|---|---|
| Maximum‑likelihood (ML) | Directly maximizes $\mathcal{L}$ over $\mathbf{z},\mathbf{P}$; often uses Expectation‑Maximization (EM) or variational EM. | $O(nK^2)$ per iteration |
| Bayesian MCMC | Places priors on $\pi$ and $\mathbf{P}$; samples from the posterior via Markov chain Monte Carlo. | Variable; can be intensive for large $n$ |
| Spectral methods | Uses eigenvectors of the adjacency or modularity matrix to obtain an initial partition, then refines via likelihood. | $O(n^2)$ for dense graphs, $O(m)$ for sparse |
| Belief propagation | Implements message‑passing to approximate marginal probabilities of group assignments. | Near‑linear in the number of edges |
Software packages such as graph-tool, blockmodeling (R), and pySBM implement many of these algorithms.
Extensions and variants
- Degree‑corrected SBM – Introduces a vertex‑specific propensity parameter to capture heterogeneous degree distributions while preserving block structure (Karrer & Newman, 2011).
- Overlapping SBM – Allows vertices to belong to multiple blocks simultaneously (Airoldi et al., 2008).
- Hierarchical SBM – Models block structure at multiple scales, producing a dendrogram of communities (Peixoto, 2014).
- Dynamic SBM – Extends the model to temporal networks by allowing $\mathbf{z}$ and/or $\mathbf{P}$ to evolve over time (Matias & Miele, 2017).
Applications
- Community detection – SBM inference provides statistically principled partitions that avoid the resolution limit of modularity maximization.
- Social network analysis – Modeling affiliation, role equivalence, and homophily in sociograms.
- Biological networks – Identifying functional modules in protein‑protein interaction and gene regulatory networks.
- Recommendation systems – Capturing latent user/item groups in bipartite interaction graphs.
Theoretical properties
- Detectability threshold – In sparse graphs, there exists a phase transition below which community structure cannot be recovered better than chance (Decelle et al., 2011).
- Consistency – Under appropriate growth conditions on $n$ and edge probabilities, maximum‑likelihood and Bayesian estimators are consistent for the true block assignments (Bickel & Chen, 2009).
See also
- Community detection
- Random graph models
- Latent class analysis
References
- Holland, P. W., Laskey, K. B., & Leinhardt, S. (1983). Stochastic blockmodels: First steps. Social Networks, 5(2), 109‑137.
- Karrer, B., & Newman, M. E. (2011). Stochastic blockmodels and community structure in networks. Physical Review E, 83(1), 016107.
- Decelle, A., Krzakala, F., Moore, C., & Zdeborová, L. (2011). Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications. Physical Review E, 84(6), 066106.
- Peixoto, T. P. (2014). Hierarchical block structures and high-resolution model selection in large networks. Physical Review X, 4(1), 011047.
- Matias, C., & Miele, V. (2017). Statistical clustering of temporal networks through a dynamic stochastic block model. Journal of the Royal Statistical Society: Series B, 79(4), 1119‑1141.
- Bickel, P. J., & Chen, A. (2009). A nonparametric view of network models and Newman–Girvan and other modularities. Proceedings of the National Academy of Sciences, 106(50), 21068‑21073.