Network Outcome Models - Stochastic Block Models and Network Checks

Summary

Concept note (no raw source). Stochastic block models (SBMs) give each node a latent role and let tie probability depend only on the pair of roles; mixed-membership and degree-corrected variants relax hard roles and degree homogeneity. Marginalising roles avoids discrete sampling in PyMC; network posterior predictive checks (degree, transitivity, shared partners, geodesics) show what each model misses. Complements the latent-space model of Hoff 2002 - Latent Space Models Overview.

Overview

Used in PyMC example E21 (Lazega lawyers; mixed-membership SBM with marginalised roles, degree-corrected or not, co-clustering matrix, network PPCs). Example list: https://redam94.github.io/pymc-challenges/examples.html.

Main Content

Stochastic block model (Holland, Laskey & Leinhardt 1983; Nowicki & Snijders 2001)

Nodes have latent classes over groups; for a directed binary network independently, the block matrix.

Mixed-membership SBM (Airoldi et al. 2008)

Each node has membership vector ; for each ordered pair draw sender role and receiver role ; . Marginalising roles gives .

Degree-corrected SBM (Karrer & Newman 2011)

Poisson-edge version: with node propensity , absorbing heterogeneous degrees that a plain SBM would assign to extra blocks.

Marginalising roles: for the classical SBM, conditioned on is block-constant; a node’s likelihood contribution is only when other labels are known, so exact marginalisation is not available; the mixed-membership form is tractable because pairs are independent given : . Identification: label switching (use ordered/identifiable constraints on ‘s diagonal), and the co-clustering matrix (a posterior summary invariant to relabeling).

Network posterior predictive checks: simulate from the posterior and compare statistics: degree distribution, global transitivity, edgewise shared partners, geodesic distance distribution. A latent-space model captures transitivity; a plain SBM typically misses degree heterogeneity (a motivation for degree correction); a dyad logistic with sociality random effects captures degree but not triads.

Examples

Mixed-membership tie probability, tiny check

, ; nodes , give .

import numpy as np
B = np.array([[.8, .05], [.05, .6]]); p1 = np.array([.9, .1]); p2 = np.array([.1, .9]); print(p1 @ B @ p2)   # 0.167

PyMC sketch (untested):

import pymc as pm
with pm.Model():
    pi = pm.Dirichlet("pi", a=np.ones(K)*0.5, shape=(n, K))
    B = pm.Beta("B", 1, 1, shape=(K, K))
    P = pm.math.dot(pi, pm.math.dot(B, pi.T))
    pm.Bernoulli("y", p=P[iu], observed=y[iu])

Connections

Social Network Models (basic network models); Hoff 2002 - Monks Florentine Families and Classroom Examples (SBM vs latent space log-likelihoods); marketing: roles = customer segments in referral graphs.

See Also

Hoff 2002 - Latent Space Approaches to Social Network Analysis