- Year
- 1983
- Type
- Probabilistic generative graph model
What does it do?
The Stochastic Block Model (SBM), introduced by Holland, Laskey and Leinhardt (1983), is a probabilistic generative model for graphs.
It assigns each node to a latent block and estimates the connection probabilities between blocks. It is used for community detection, core-periphery identification and hierarchical structure discovery in networks.
The intuition behind the method
Consider a social network in which people form groups, such as colleagues, families or sports teams, and ties within a group are more common than ties across groups. The SBM formalises this by assuming that each node has a hidden group label and that the probability of an edge between two nodes depends only on the labels of those two nodes. Fitting the model means finding the labels and block-level probabilities that best explain the observed edges. Because the matrix of connection probabilities is not forced to be diagonal, the same framework can describe core-periphery arrangements and patterns in which ties between groups are more common than ties within them, not only dense communities.
History
The Stochastic Block Model was introduced by Holland, Laskey and Leinhardt in their 1983 Social Networks paper, "Stochastic Blockmodels: First Steps", as a probabilistic treatment of blockmodelling in social network analysis. The review by Lee and Wilkinson (2019) in Applied Network Science surveys the subsequent family of models, including extensions for different graph types, different inference approaches, and models in which the number of groups is estimated rather than fixed. The SBM family is now widely used as a reference probabilistic framework for community detection and graph clustering.
When to use it
Use the SBM when you have a network of at least 50 nodes, the minimum specified for reliable inference, and you want to find latent group structure without assuming that groups must be dense cliques. The basic model as described here concerns a single graph; weighted, directed or otherwise typed graphs usually require extensions, which the review by Lee and Wilkinson surveys. Prefer the DCSBM when node degrees vary substantially, for example because a few hubs account for many edges. Do not use the SBM for graphs far below the minimum size, where community structure cannot be reliably estimated and simpler descriptive network measures are more appropriate. The method assumes that block memberships are latent rather than observed, that connection probabilities are homogeneous within each pair of blocks, and that K is chosen by BIC or Bayes factor rather than fixed in advance.
Limitations and considerations
- Reliable block estimation requires at least 50 nodes, the minimum specified for this method; for smaller graphs the solutions are unstable.
- Exact maximisation over all block assignments is intractable, so results depend on approximate inference (variational EM or MCMC), and convergence is not guaranteed.
- The homogeneity assumption within block pairs is violated when connection rates vary inside a block. The DCSBM addresses variation in degree but not every form of within-block heterogeneity.
- Selection by BIC or Bayes factor can under- or over-segment the network when communities are weakly separated.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Provides a probabilistic model with explicit assumptions, so the number of blocks can be chosen by BIC or Bayes factor instead of a heuristic objective.
- The matrix of block connection probabilities is not constrained to be diagonal, so the model can represent core-periphery and disassortative patterns as well as communities.
- The DCSBM variant separates degree from structural position, which limits the influence of hubs on block assignments.
- Inference can return posterior membership probabilities, so uncertain assignments can be reported rather than forced into a single group.
Applications
- Detecting research communities in citation and collaboration networks in the social and natural sciences.
- Identifying functional modules in biological networks such as protein-protein interaction and gene co-expression graphs.
- Discovering customer segments or fraud rings in transactional and financial networks.
- Characterising core-periphery structure in inter-organisational or inter-country trade networks.
- Benchmarking and evaluating other community detection algorithms using SBM-generated synthetic graphs as ground truth.
How it works
How it works
The analyst defines a candidate range for the number of blocks K and chooses a model variant. In the basic SBM each node i has a latent block label z_i in {1,...,K}. For an undirected simple graph, the edges A_ij are conditionally independent given the labels, with P(A_ij = 1 | z_i = r, z_j = s) = B_rs, where B is a symmetric K×K matrix of connection probabilities. Nodes in the same block are therefore exchangeable with respect to their connection pattern. The Degree-Corrected SBM (DCSBM) adds a node-level degree parameter theta_i, so that the edge probability becomes theta_i · theta_j · B_{z_i z_j}. Differences in degree then do not by themselves determine block membership. The choice of variant is guided by the degree distribution of the observed graph.
Given the adjacency matrix, the model estimates the block memberships and the K×K matrix of connection probabilities. Maximising the likelihood over all possible block assignments is combinatorially intractable, so practical inference relies on approximate methods. Variational Expectation-Maximisation (variational EM) and Markov Chain Monte Carlo (MCMC) are the inference options given for large graphs. Approximate methods can converge to local optima, so it is good practice to run several random initialisations and compare the final objective values before interpreting a solution.
The number of blocks K is not known in advance and must be selected from the data. Lee and Wilkinson (2019) distinguish approaches in which the number of groups is selected from those in which it is estimated. The Bayesian Information Criterion (BIC) and the Bayes factor are the selection criteria specified for this method. BIC is an approximation to the marginal likelihood: it rewards fit to the observed edges and penalises the number of free parameters, which grows with K. The Bayes factor compares the marginal likelihoods of competing models. Because the fit itself is usually obtained by approximate inference, a larger K should be preferred only when the improvement in fit clearly justifies the additional parameters, and the ranking of K values should be checked for stability.
After K and the block assignments are chosen, the estimated block connection matrix is examined. Blocks with high within-block and low between-block probabilities correspond to communities. A pattern with high between-block probabilities indicates bipartite-like or disassortative structure. A dense core connected to sparse peripheral blocks indicates core-periphery structure. The same block connection pattern can be consistent with more than one structural interpretation, so before naming a pattern as core-periphery or bipartite-like, compare candidate solutions across values of K and across the SBM and DCSBM variants, and check whether the pattern persists. Where the inference provides posterior membership probabilities, these should be reported alongside hard assignments.
Common pitfalls
- Fixing K by hand instead of selecting it by BIC or Bayes factor yields partitions that depend on an arbitrary choice. Use a model-selection criterion and check how the result changes when K is varied slightly.
- Applying the basic SBM to a graph with hubs or a heavy-tailed degree sequence can group nodes by degree rather than by structural position. The DCSBM is the usual remedy.
- Treating a hard block assignment as certain when the posterior is diffuse overstates confidence. Report uncertainty where the inference provides it.
- Block memberships are statistical latent classes, not ground-truth communities. Validate them against domain knowledge before interpreting them substantively.
- Running the model on graphs well below the 50-node minimum yields unstable block estimates, so results should not be interpreted substantively. Use descriptive network measures instead.
Frequently asked questions
How is the Stochastic Block Model different from modularity-based community detection?
Modularity maximisation is a heuristic that searches for partitions with more within-community edges than a null model would predict. It does not specify a generative model for the edges, so it offers no likelihood-based criterion for choosing the number of communities. The SBM is a generative probabilistic model with explicit assumptions. The number of blocks is chosen by model selection (BIC or Bayes factor) rather than by maximising a heuristic score. Because the block connection matrix is unconstrained, the SBM can describe disassortative and core-periphery patterns. Modularity, which rewards within-community density relative to a null model, is built around assortative communities and is not designed to represent these patterns directly.
When should I use DCSBM instead of the basic SBM?
Use DCSBM when the node degree distribution is heterogeneous, for example when a small number of hubs account for a large fraction of edges. The basic SBM treats nodes within a block as exchangeable, so hubs may be grouped by their degree rather than by structural position. DCSBM adds a node degree parameter, so that differences in degree do not by themselves determine block membership. Whether this changes the block assignments in a given network should be checked against domain knowledge.
How do I choose the number of blocks K?
Fit the model for a range of K values and select the K with the lowest BIC or the highest Bayes factor. Do not choose K from visual inspection of the graph or from prior expectations. Sensitivity analysis is also recommended: check whether the qualitative block structure changes when K is varied slightly.
What is the minimum network size for SBM to be reliable?
The registry specifies a minimum of 50 nodes for reliable inference. Graphs with fewer nodes give unstable block estimates, so results from them should be treated with caution, and descriptive network statistics may be more appropriate.
Related methods
Sources
Holland, P.W., Laskey, K.B. & Leinhardt, S. (1983). Stochastic Blockmodels: First Steps. Social Networks, 5(2), 109-137.
Open DOI referenceLee, C. & Wilkinson, D.J. (2019). A Review of Stochastic Block Models and Extensions for Graph Clustering. Applied Network Science, 4(1), 122.
Open DOI reference