# Maximum-entropy random graph model

Part of a series on :
Network science :
Theory :
Graph
Complex network
Contagion
Small-world
Scale-free
Community structure
Percolation
Evolution
Controllability
Graph drawing
Social capital
Link analysis
Optimization
Reciprocity
Closure
Homophily
Transitivity
Preferential attachment
Balance theory
Network effect
Social influence :
Network types :
Informational (computing)
Telecommunication
Transport
Social
Scientific collaboration
Biological
Artificial neural
Interdependent
Semantic
Spatial
Dependency
Flow
on-Chip :
Graphs :
MetricsAlgorithms :
Centrality
Degree
Motif
Clustering
Degree distribution
Assortativity
Distance
Modularity
Efficiency :
Models :
ListsCategories :
Topics
Software
Network scientists
Category:Network theory
Category:Graph theory :
vte :
Maximum-entropy random graph models are random graph models used to study complex networks subject to the principle of maximum entropy under a set of structural constraints, which may be global, distributional, or local.

## Overview

Any random graph model (at a fixed set of parameter values) results in a probability distribution on graphs, and those that are maximum entropy within the considered class of distributions have the special property of being maximally unbiased null models for network inference (e.g. biological network inference). Each model defines a family of probability distributions on the set of graphs of size $n$ (for each $n>n_{0}$ for some finite $n_{0}$), parameterized by a collection of constraints on $J$ observables $\{Q_{j}(G)\}_{j=1}^{J}$ defined for each graph $G$ (such as fixed expected average degree, degree distribution of a particular form, or specific degree sequence), enforced in the graph distribution alongside entropy maximization by the method of Lagrange multipliers. Note that in this context "maximum entropy" refers not to the entropy of a single graph, but rather the entropy of the whole probabilistic ensemble of random graphs.
Several commonly studied random network models are in fact maximum entropy, for example the ER graphs $G(n,m)$ and $G(n,p)$ (which each have one global constraint on the number of edges), as well as the configuration model (CM). and soft configuration model (SCM) (which each have $n$ local constraints, one for each nodewise degree-value). In the two pairs of models mentioned above, an important distinction is in whether the constraint is sharp (i.e. satisfied by every element of the set of size-$n$ graphs with nonzero probability in the ensemble), or soft (i.e. satisfied on average across the whole ensemble). The former (sharp) case corresponds to a microcanonical ensemble, the condition of maximum entropy yielding all graphs $G$ satisfying $Q_{j}(G)=q_{j}\forall j$ as equiprobable; the latter (soft) case is canonical, producing an exponential random graph model (ERGM).
| Model | Constraint type | Constraint variable | Probability distribution |
| ER, $G(n,m)$ | Sharp, global | Total edge-count $|E(G)|$ | $1/{\binom {\binom {n}{2}}{m}};\ m=|E(G)|$ |
| ER, $G(n,p)$ | Soft, global | Expected total edge-count $|E(G)|$ | $p^{|E(G)|}(1-p)^{{\binom {n}{2}}-|E(G)|}$ |
| Configuration model | Sharp, local | Degree of each vertex, $\{{\hat {k}}_{j}\}_{j=1}^{n}$ | $1/\left\vert \Omega (\{{\hat {k}}_{j}\}_{j=1}^{n})\right\vert ;\Omega (\{k_{j}\}_{j=1}^{n})=\{g\in {\mathcal {G}}_{n}:k_{j}(g)={\hat {k}}_{j}\forall j\}\subset {\mathcal {G}}_{n}$ |
| Soft configuration model | Soft, local | Expected degree of each vertex, $\{{\hat {k}}_{j}\}_{j=1}^{n}$ | $Z^{-1}\exp \left[-\sum _{j=1}^{n}\psi _{j}k_{j}(G)\right];\ -{\frac {\partial \ln Z}{\partial \psi _{j}}}={\hat {k}}_{j}$ |

## Canonical ensemble of graphs (general framework)

Suppose we are building a random graph model consisting of a probability distribution $\mathbb {P} (G)$ on the set ${\mathcal {G}}_{n}$ of simple graphs with $n$ vertices. The Gibbs entropy $S[G]$ of this ensemble will be given by
    $S[G]=-\sum _{G\in {\mathcal {G}}_{n}}\mathbb {P} (G)\log \mathbb {P} (G).$
We would like the ensemble-averaged values $\{\langle Q_{j}\rangle \}_{j=1}^{J}$ of observables $\{Q_{j}(G)\}_{j=1}^{J}$ (such as average degree, average clustering, or average shortest path length) to be tunable, so we impose $J$ "soft" constraints on the graph distribution:
    $\langle Q_{j}\rangle =\sum _{G\in {\mathcal {G}}_{n}}\mathbb {P} (G)Q_{j}(G)=q_{j},$
where $j=1,...,J$ label the constraints. Application of the method of Lagrange multipliers to determine the distribution $\mathbb {P} (G)$ that maximizes $S[G]$ while satisfying $\langle Q_{j}\rangle =q_{j}$, and the normalization condition $\sum _{G\in {\mathcal {G}}_{n}}\mathbb {P} (G)=1$ results in the following:
    $\mathbb {P} (G)={\frac {1}{Z}}\exp \left[-\sum _{j=1}^{J}\psi _{j}Q_{j}(G)\right],$
where $Z$ is a normalizing constant (the partition function) and $\{\psi _{j}\}_{j=1}^{J}$ are parameters (Lagrange multipliers) coupled to the correspondingly indexed graph observables, which may be tuned to yield graph samples with desired values of those properties, on average; the result is an exponential family and canonical ensemble; specifically yielding an ERGM.

## The Erdős–Rényi model $G(n,m)$

In the canonical framework above, constraints were imposed on ensemble-averaged quantities $\langle Q_{j}\rangle$. Although these properties will on average take on values specifiable by appropriate setting of $\{\psi _{j}\}_{j=1}^{J}$, each specific instance $G$ may have $Q_{j}(G)\neq q_{j}$, which may be undesirable. Instead, we may impose a much stricter condition: every graph with nonzero probability must satisfy $Q_{j}(G)=q_{j}$ exactly. Under these "sharp" constraints, the maximum-entropy distribution is determined. We exemplify this with the Erdős–Rényi model $G(n,m)$.
The sharp constraint in $G(n,m)$ is that of a fixed number of edges $m$, that is $|\operatorname {E} (G)|=m$, for all graphs $G$ drawn from the ensemble (instantiated with a probability denoted $\mathbb {P} _{n,m}(G)$). This restricts the sample space from ${\mathcal {G}}_{n}$ (all graphs on $n$ vertices) to the subset ${\mathcal {G}}_{n,m}=\{g\in {\mathcal {G}}_{n};|\operatorname {E} (g)|=m\}\subset {\mathcal {G}}_{n}$. This is in direct analogy to the microcanonical ensemble in classical statistical mechanics, wherein the system is restricted to a thin manifold in the phase space of all states of a particular energy value.
Upon restricting our sample space to ${\mathcal {G}}_{n,m}$, we have no external constraints (besides normalization) to satisfy, and thus we'll select $\mathbb {P} _{n,m}(G)$ to maximize $S[G]$ without making use of Lagrange multipliers. It is well known that the entropy-maximizing distribution in the absence of external constraints is the uniform distribution over the sample space (see maximum entropy probability distribution), from which we obtain:
    $\mathbb {P} _{n,m}(G)={\frac {1}{|{\mathcal {G}}_{n,m}|}}={\binom {\binom {n}{2}}{m}}^{-1},$
where the last expression in terms of binomial coefficients is the number of ways to place $m$ edges among ${\binom {n}{2}}$ possible edges, and thus is the cardinality of ${\mathcal {G}}_{n,m}$.

## Generalizations

A variety of maximum-entropy ensembles have been studied on generalizations of simple graphs. These include, for example, ensembles of simplicial complexes, and weighted random graphs with a given expected degree sequence