Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Statistical network models: ERGMs and actor-oriented models

Clear, exam-focused notes on Exponential-family Random Graph Models (ERGMs) and actor-oriented (stochastic actor-oriented) network models, explaining definitions, main formulas, estimation ideas, worked examples, common mistakes and exam guidance.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Two popular classes of statistical network models help engineers understand and predict how ties form and persist in social and technical networks. Exponential-family Random Graph Models (ERGMs) are used to model the probability of a whole observed network as a function of structural patterns (e.g. edges, triangles, degree). Actor-oriented models (also called Stochastic Actor-Oriented Models, SAOMs) model network change as decisions by individual nodes over time. Engineers use these to test hypotheses about network mechanisms (e.g. reciprocity, transitivity), to simulate networks, and to predict evolution in social, communication or collaboration systems.

Key ideas

Start from basics. A network is a set of nodes and ties. Let Y be the random variable representing the adjacency matrix of a network (Yij = 1 if there is a tie from i to j, else 0). We study probability distributions over the space of possible networks.

  • Definition: Exponential-family Random Graph Model (ERGM) — A probability model for a full network Y with the form P_θ(Y = y) = exp(θ · g(y)) / κ(θ), where θ is a vector of parameters, g(y) is a vector of network statistics (sufficient statistics), and κ(θ) is the normalizing constant summing exp(θ · g(y)) over all possible networks. This is an exponential-family distribution over graphs. More generally, include a reference measure h(y) (often h(y)=1 for binary networks) and possible offset terms, so P_θ(Y=y) ∝ h(y) exp(θ · g(y)).

    • Assumptions: the model assumes the user has chosen meaningful statistics g(y) (e.g., number of edges, number of triangles). The model does not assume independence of dyads; dependencies are captured through g(y).
    • Interpretation: A single parameter θ_k corresponds to the log-change in probability (log-odds) associated with a one-unit increase in the statistic g_k, all else equal. More exactly: holding other sufficient statistics constant, increasing g_k by 1 multiplies the unnormalised probability by exp(θ_k).
    • Key practical problem: the normalizing constant κ(θ) involves a sum over all 2^(n(n-1)) or 2^(n(n-1)/2) graphs (directed or undirected) — intractable for realistic n. Estimation therefore uses MCMC-based approximations or pseudo-likelihood.
  • Useful ERGM statistics (define before use):

    • Edge count: g_edge(y) = sum_{i<j} y_{ij} (or sum_{i!=j} for directed). Counts ties.
    • Triangle count: g_triangle(y) = number of triangles (3-cliques); fosters transitivity.
    • k-star counts: number of nodes with degree k or counts of k-stars (patterns where one node connects to k others); related to degree distribution.
    • Node/edge covariate effects: terms for exogenous attributes, e.g., nodematch (homophily on a categorical attribute), nodemix, absdiff (absolute difference on a numeric attribute), edgecov (dyadic covariate).
    • Curved terms to reduce degeneracy: e.g., GWESP (geometrically weighted edgewise shared partners) for transitivity and GWDegree/GWOutdegree/GWIndegree for degree distributions; these often stabilize estimation compared to raw triangle and k-star counts.
  • Local interpretation: change statistic Δg_{ij}(y) = g(y^{+ij}) - g(y^{-ij}) where y^{+ij} is y with y_{ij}=1 and y^{-ij} is y with y_{ij}=0. The conditional log-odds of a tie y_{ij}=1 given the rest of the network y_{-ij} is θ · Δg_{ij}(y).

    • This is the formula often used for interpretation and for some estimation algorithms.
  • Estimation methods for ERGMs:

    • MCMC-MLE: Using Markov chain Monte Carlo to approximate expectations and maximize the likelihood. Requires simulation until Monte Carlo error is small.
    • Pseudo-likelihood (MPLE): Replace the full likelihood with product of conditional dyadic probabilities (logistic regression-like). Fast but biased under dependence.
    • Diagnostics: Check for model degeneracy (parameters leading to almost all probability mass on very sparse or very dense graphs). Use goodness-of-fit plots comparing observed network statistics with networks simulated from fitted model.
  • Definition: Actor-oriented (Stochastic Actor-Oriented) Model (SAOM) — A continuous-time stochastic model for network evolution where actors (nodes) are units making decisions to change their outgoing ties to maximize an objective or evaluation function with some randomness. The network evolves in small steps (one tie-change at a time) according to a Markov process.

    • Components:
      • Rate function λ_i(α): the rate at which actor i gets opportunities to make a change. Parameter vector α.
      • Evaluation (objective) function f_i(y; β): actor i’s utility (up to an additive random noise) for network configuration y, parameter vector β; often linear in network statistics from i’s perspective (e.g., outdegree, reciprocity, transitive triplets).
      • Choice rule: when actor i has a chance, they consider a set of possible networks (usually toggling one outgoing tie) and choose with probability proportional to exp(f_i(y)). This yields a multinomial choice model (logit-like). In the basic SAOM ministep there is no 'no-change' option; conditional on a change opportunity, the choice set C_i consists of networks obtainable by toggling one outgoing tie of i.
    • Estimation: Typically method-of-moments / simulation-based (GMM) using simulated network trajectories to match observed network changes. Implementation is often via the SIENA package. Requires panel network data with at least two observation waves (ideally three or more), and rate parameters are often period-specific and estimated separately from evaluation parameters.
    • Assumptions: actors act myopically to increase their objective (stochastic best response); change opportunities occur one-at-a-time.
  • Relationship and differences:

    • ERGMs model the cross-sectional probability of a whole network (static snapshot). SAOMs model explicit dynamics and actor choices over time. Both can encode similar structural effects (reciprocity, transitivity), but interpretation of parameters differs: ERGM parameters refer to log-probability of whole-network change; SAOM parameters refer to actor preferences and rates of change.
  • Diagram to draw (for exam): Draw 4 nodes labelled 1,2,3,4 placed roughly in a square. Draw existing edges: (1-2), (2-3), (1-3) forming a triangle among 1,2,3. Mark a potential tie (3-4) with a dashed line and label it y_{34}. This diagram is used to compute change statistics (e.g., adding y_{34} closes no triangle; adding y_{14} might close a triangle if 1-4 and 1-3 etc.).

Formulas

P_θ(Y = y) = exp(θ · g(y)) / κ(θ) — P_θ(Y = y) is probability of network y; θ is parameter vector (dimensionless); g(y) is vector of network statistics (counts, dimensionless); κ(θ) = sum_{all y'} exp(θ · g(y')) is the normalizing constant. Applies to ERGMs.

κ(θ) = Σ_{y' ∈ 𝒴} exp(θ · g(y')) — sum over all possible networks 𝒴 (dimensionless). Applies when computing exact likelihood (infeasible for large n).

Score: ∂ log L(θ)/∂θ = g(y_obs) − E_θ[g(Y)] — used in MCMC-MLE to update θ; E_θ[g(Y)] is approximated by simulation.

logit(P(Y_{ij}=1 | Y_{-ij}=y_{-ij})) = θ · Δg_{ij}(y) — conditional log-odds of tie (dimensionless). Δg_{ij}(y) is the change statistic when toggling y_{ij}.

Odds ratio for toggling y_{ij}: P(y^{+ij}) / P(y^{-ij}) = exp(θ · Δg_{ij}(y)) — ratio of probabilities of graphs differing only in edge ij.

For actor-oriented models: Rate for actor i: λ_i(α) — units: expected number of change opportunities per unit time (time unit as used in data). α dimensionless parameters.

Choice probability when i can change: P(choose y') = exp(f_i(y';β)) / Σ_{y'' ∈ C_i} exp(f_i(y'';β)) — multinomial logit choice among candidate networks C_i. β dimensionless.

Evaluation function (example linear form): f_i(y;β) = Σ_k β_k s_{ik}(y) — s_{ik}(y) are actor-based statistics (e.g., outdegree of i, number of reciprocated ties for i), dimensionless.

Worked examples

  1. ERGM change-statistic numeric example (typical exam calculation) Question: Consider an undirected network where the ERGM uses two statistics: number of edges g1(y) and number of triangles g2(y). Let θ1 = -1.5 and θ2 = 0.5. For a current graph y, toggling edge (i,j) from 0 to 1 increases edges by 1 and closes exactly 1 triangle (Δg1 = +1, Δg2 = +1). Compute the odds ratio P(y^{+ij})/P(y^{-ij}) and the conditional probability P(Y_{ij}=1 | rest) assuming these are the only two possible values. Solution steps:
  • Formula for odds ratio: exp(θ · Δg) = exp(θ1·Δg1 + θ2·Δg2).
  • Substitute numbers: exp(-1.5·1 + 0.5·1) = exp(-1.0) ≈ 0.3679.
  • Conditional probability P = odds / (1 + odds) = 0.3679 / (1 + 0.3679) = 0.3679 / 1.3679 ≈ 0.269. Final answer: The odds ratio is approximately 0.3679 and the conditional probability is 0.269 (26.9%).
  1. Actor-oriented model choice example (typical model-answer) Question: Actor i can either keep its current outgoing tie to j as 0 (no change) or add a tie to j making y_{ij}=1. The evaluation function for actor i is f_i(y) = β1·outdegree_i(y) + β2·reciprocity_i(y). Suppose currently outdegree_i = 2 and reciprocity_i = 0. If actor i would add tie to j, outdegree becomes 3 and reciprocity becomes 1. Let β1 = -0.4 and β2 = 1.0. Compute the choice probabilities for (keep,no-change) vs (add tie). Note: In the basic SAOM ministep, 'no change' is not part of C_i; actors choose among one-tie toggles. Interpret the probabilities here as conditional on a change opportunity and a choice set that includes 'no change' solely for illustration. Solution steps:
  • f_keep = -0.4·2 + 1.0·0 = -0.8.
  • f_add = -0.4·3 + 1.0·1 = -1.2 + 1 = -0.2.
  • Compute exponentials: exp(f_keep) = exp(-0.8) ≈ 0.4493; exp(f_add) = exp(-0.2) ≈ 0.8187.
  • Choice probability add = 0.8187 / (0.4493 + 0.8187) = 0.8187 / 1.268 ≈ 0.646. Final answer: The probability actor i will add the tie is 0.646 (64.6%), and keep is 35.4%.
  1. Short model-answer on estimation (exam style) Question: Briefly explain how MCMC-MLE is used to estimate ERGM parameters. Answer steps:
  • The likelihood gradient involves expected statistics E_θ[g(Y)] which cannot be computed exactly.
  • Use MCMC to simulate many graphs from current parameter θ and approximate E_θ[g(Y)] by sample average of g over simulated graphs.
  • Update θ (e.g., via Robbins-Monro / Newton-Raphson using approximated expectations) until convergence. Check goodness-of-fit and for degeneracy by simulating from final θ. Final answer: MCMC approximates intractable expectations and allows approximate maximum likelihood estimation; monitoring and diagnostics are essential to avoid degenerate fits.

Common mistakes

  • Forgetting that κ(θ) is global and intractable; claiming you can compute it for moderate n without approximation.
  • Confusing cross-sectional ERGM and actor-oriented model interpretations: ERGM ≠ actor preferences over time.
  • In SAOM calculations, forgetting the rate parameter: probability of any change also depends on rates λ_i, not only on evaluation functions.
  • Numerical mistakes: not normalising exponentials when computing choice probabilities.

For your exam

Kinds of questions you will see and what a full-marks answer should include:

  • Definitions: Define ERGM or SAOM and state their components. Full marks require exact model form and brief note on interpretation/assumptions.
  • Short notes: Explain change statistics, degeneracy, MCMC-MLE, or rate and evaluation functions in SAOM. Full marks need equations and a brief practical comment (estimation/diagnostics).
  • Derivations: Show that conditional log-odds for a dyad in an ERGM equals θ · Δg_{ij}(y). Full marks show algebra from P(y^{+ij})/P(y^{-ij}) and cancel κ(θ).
  • Numericals: Compute odds ratios or choice probabilities using given θ and Δg (show formula, substitutions, numeric steps, final numeric answer with percent).
  • Diagrams: Draw small graphs for change-statistic calculations. Full marks label nodes, the toggled dyad, and show how statistics (triangles, edges) change.
  • Model comparison: Explain conceptual differences between ERGM and actor-oriented models. Full marks contrast static vs dynamic, parameter interpretation and estimation methods.

Quick check

  1. What is the change statistic Δg_{ij}(y) used for in ERGMs?
  2. In a SAOM, what two components control network evolution?
  3. If θ_edge = -2 and adding an edge increases triangles by 0 and edges by 1, what is the odds ratio for that toggle? Answers: Δg_{ij}(y) is the vector of changes in sufficient statistics when toggling y_{ij}; rate function λ_i and evaluation (objective) function f_i; odds ratio = exp(-2·1 + 0·Δtriangle) = exp(-2) ≈ 0.1353.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?