Weighted Exponential Random Graph Model

Machine Learning
Introduced by
Krivitsky, P. N.
Year
2012
Type
Statistical network model
Family
Network science

What does it do?

The Weighted Exponential Random Graph Model (W-ERGM) extends the binary exponential random graph framework to networks whose edges carry counts, such as the number of interactions, co-authored papers, or messages exchanged between two nodes.

It defines a probability distribution over all possible weighted graphs, so that structural patterns such as reciprocity or transitivity can be tested against what the model predicts without them. Krivitsky (2012) generalised ERGMs to valued networks, focusing on count-valued ties.

The intuition behind the method

A binary network asks whether a tie exists; a weighted network also asks how strong each tie is. W-ERGM specifies a probability distribution over the weighted graphs that could be observed on the same set of nodes, with each structural feature included as a term in a vector of network statistics g(y). Each coefficient indicates how strongly that feature is associated with higher or lower edge weights, conditional on the other terms in the model: a positive coefficient means the observed network has more of that feature than the model without it would predict, and a negative coefficient means less. These coefficients describe associations within a single cross-sectional network. They are not causal effects of the process that formed the network.

History

Exponential random graph models for binary networks are the basis from which the weighted version is built, and the introduction by Robins et al. (2007) describes this p* framework for social networks. The extension to valued edges was set out by Krivitsky (2012), who generalised ERGMs to networks whose ties are counts, introduced model terms for common social network features in such data, and applied the approach to a network of interaction counts. Work on continuous weights and other network types remains an active area of development.

When to use it

Choose W-ERGM when you have one observed network whose edges are counts (for example interaction frequencies, co-authorships or citations), and the question is whether particular structural tendencies, such as reciprocity, transitivity or uneven activity across nodes, account for the pattern of edge weights beyond a null model. It suits studies where tie strength or network formation is the object of interest. Do not use it when the network is large enough that MCMLE becomes computationally demanding or fails to converge. In that case weighted stochastic block models may be considered, but they answer a different question (group structure rather than structural tendencies), so they are not a drop-in replacement for W-ERGM inference. It is also unsuitable when edge weights are continuous (for example correlation coefficients or monetary trade values) unless you accept custom sampling, when you have only aggregate node-level data rather than a full weight matrix, or when the goal is prediction rather than inference about structural parameters.

Limitations and considerations

  • MCMLE for weighted networks is computationally heavy, and convergence can fail on large or densely weighted networks.
  • Degeneracy is a risk: unconstrained statistics can place most of the probability on empty or near-complete weight matrices, so the fitted model describes an implausible network.
  • Inference applies to a single cross-sectional network; repeated observations of a network require temporal extensions such as TERGM.
  • Count-valued support is the mature case; continuous weights need custom samplers or discretisation.
  • The method requires the full weight matrix and cannot be fitted from aggregate node-level summaries alone.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Provides inference about structural parameters in weighted networks, with approximate standard errors and significance tests for each term.
  • Structural tendencies such as reciprocity and transitivity enter as explicit terms, so each hypothesis corresponds to a named parameter.
  • Models the valued edge directly rather than dichotomising it, avoiding the loss of information and the biases that the cited abstract attributes to analyses of thresholded networks.
  • The exponential-family form makes each model term explicit, and fit can be checked by simulation. Comparing competing term sets is not straightforward, because standard information criteria are not directly applicable to MCMLE estimates; comparison requires likelihood-approximation methods or simulation-based checks.
  • Implemented in the open-source R ergm package with the ergm.count extension for count-valued networks.

Applications

  • Testing whether co-authorship counts in a scientific collaboration network are higher between researchers who share an institutional affiliation, beyond the structure expected under the model.
  • Examining reciprocity and transitivity in counts of messages exchanged within an organisation.
  • Modelling counts of citations between journals to assess whether citation intensity clusters beyond topical similarity.
  • Studying counts of recorded interactions among actors in a conflict network to test whether repeated contact is explained by shared third parties.

How it works

How it works

1

The observed network is stored as a matrix Y whose entry y_ij records the weight of the edge from node i to node j (or between i and j if the network is undirected). In the standard count-valued setting, each weight is a non-negative integer, such as a number of emails or co-authored papers. The support, meaning the set of values each y_ij can take, must be fixed before modelling because it determines which model family and estimation tools apply. Continuous weights fall outside the standard count-valued implementation.

2

The researcher chooses a vector of network statistics g(y) that encode theoretically motivated patterns. Examples include weighted reciprocity (whether strong ties tend to be mutual), weighted transitivity (whether nodes sharing high-weight partners are tied more strongly), and overall weight density. Degeneracy-reducing terms, such as geometrically weighted terms, can also be considered, but the binary-ERGM versions do not transfer automatically to count-valued networks, so their validity for count-valued support should be checked in the software documentation before use. Each statistic corresponds to one parameter theta in the model, so the choice of terms defines the hypotheses being tested.

3

The probability of observing the weight matrix y is P(Y=y) = exp(theta^T g(y)) / kappa(theta), where theta is the parameter vector and kappa(theta) is the normalising constant, the sum of exp(theta^T g(y')) over all weight matrices y' with the same support, taken with respect to the model's reference measure. The count-valued model requires a reference measure on the dyad weights, meaning the baseline distribution against which the terms shift probability (for example a Poisson or geometric base, depending on the specification). Coefficients are interpreted relative to this baseline, so the choice must be stated and justified when the model is reported. Each theta_k gives the change in log-probability ratio associated with a one-unit change in g_k(y), holding the other statistics fixed.

Formula
P(Y=y) = \frac{\exp(\theta^\top g(y))}{\kappa(\theta)}
4

Because kappa(theta) cannot be computed exactly for all but very small networks, parameters are typically estimated by Markov chain Monte Carlo maximum likelihood estimation (MCMLE), which simulates networks from the model to approximate the likelihood, or by Bayesian MCMC. The ergm R package, with its ergm.count extension, is the implementation associated with count-valued networks. Continuous-weight variants require specialised samplers.

5

Fit is assessed by simulating networks from the estimated model and comparing simulated statistics, such as degree distributions, edge-weight distributions and triad counts, with the observed values. Observed statistics that fall in the tails of the simulated distributions indicate structure the model does not capture. Goodness-of-fit output of this kind is part of the ergm R workflow.

Common pitfalls

  • Choosing model statistics without theoretical justification and then selecting the best-fitting specification post hoc, which inflates the Type I error rate.
  • Ignoring convergence diagnostics: non-converged MCMC chains produce unreliable parameter estimates that can still look plausible.
  • Omitting goodness-of-fit checks and assuming the model is adequate because the parameters are significant.
  • Treating estimated parameters as causal effects when the model is cross-sectional and the network formation process is not directly observed.
  • Conflating W-ERGM, which makes inference about structural features of a network, with weighted regression models, which make inference about node or dyad covariates.

Frequently asked questions

How does W-ERGM differ from the standard binary ERGM?

Standard ERGM models the presence or absence of each edge as a Bernoulli outcome. W-ERGM replaces that binary outcome with a count or ordered categorical weight, allowing the model to capture not just whether a tie exists but how strong it is. The exponential-family structure is the same; what changes is the support and the sufficient statistics.

Can W-ERGM handle continuous edge weights like correlation coefficients?

Current mainstream implementations (ergm.count) are designed for non-negative integer counts. Continuous weights require custom MCMC samplers or approximation via discretisation. This is an open research area; consult recent methodological literature before applying W-ERGM to continuous-weight data.

My MCMLE did not converge — what should I do?

Non-convergence usually means the model is degenerate or the statistics are poorly scaled. First simplify the model by removing high-order or weakly motivated statistics. If degeneracy persists, consider degeneracy-reducing terms, but check in the software documentation that a count-valued version of the term exists and behaves as intended before using it. Increase the number of MCMC steps and inspect trace plots of each sufficient statistic.

How do I assess whether the model fits the observed network?

Use the goodness-of-fit (gof) function in the ergm package to simulate networks from the fitted model and compare simulated distributions of degree, edge-weight, and geodesic distance with the observed network. If observed statistics fall in the tails of the simulated distributions, the model is missing important structure.

Is W-ERGM appropriate for dynamic or longitudinal weighted networks?

No — standard W-ERGM is a cross-sectional model for a single network observation. For networks observed at multiple time points, use the Temporal ERGM (TERGM) or the Separable Temporal ERGM (STERGM) frameworks, which model tie formation and dissolution processes separately over time.

Related methods

Sources

  1. Krivitsky, P. N. (2012). Exponential-family random graph models for valued networks. Electronic Journal of Statistics, 6, 1100–1128.

    Open DOI reference
  2. Robins, G., Pattison, P., Kalish, Y., & Lusher, D. (2007). An introduction to exponential random graph (p*) models for social networks. Social Networks, 29(2), 173–191.

    Open DOI reference