Private notes
0/8000

Notes stay private to your browser until account sync is configured.

Part 1
30 min read18 headingsSplit lesson page

Lesson overview | Lesson overview | Next part

Random Graphs: Part 1: Intuition to 8. Graphons: The Infinite-Size Limit

1. Intuition

1.1 What Is a Random Graph?

A random graph is not a single graph but a probability distribution over graphs. When we write GG(n,p)G \sim G(n, p), we mean: take nn labeled vertices; independently include each of the (n2)\binom{n}{2} possible edges with probability pp. The specific graph GG is a sample from this distribution.

This is a powerful abstraction. Real-world networks - social graphs, citation networks, protein-protein interaction maps, the web - cannot be written down in closed form. They arise from complex processes involving millions of actors. Random graph models capture the statistical regularity of these networks without requiring knowledge of every individual edge.

Key insight: Many properties of real-world networks can be characterized by just a few parameters (average degree, clustering coefficient, community structure), and random graph models are the mathematical objects that interpolate between these summary statistics and the full combinatorial structure of the graph.

For AI and ML, random graphs matter in at least three ways:

  1. Benchmark generation: We generate synthetic graphs from random models to test GNN algorithms across controlled conditions (the GraphWorld framework uses SBM).
  2. Graph generation models: GRAN, GDSS, and DiGress learn to sample from distributions over graphs - essentially learning a graphon.
  3. Network analysis: Training data graphs (social networks, citation networks, knowledge graphs) have structure that random graph models help characterize and exploit.

1.2 Why Random Graphs Matter for AI

The connection between random graphs and modern AI is deeper than benchmark generation:

Transformer attention is a random graph. In a language model with nn tokens and sparse attention, the attention pattern defines a random-looking bipartite graph. The connectivity of this graph determines information flow - whether distant tokens can influence each other and how quickly information propagates. Results from random graph theory (connectivity thresholds, small-world phenomena) directly predict when transformers can or cannot capture long-range dependencies.

GNN expressiveness depends on graph structure. The WL hierarchy and GIN's expressiveness guarantees depend on what graphs the model will see. If training graphs are sampled from an SBM, the GNN faces a specific community detection problem that has known information-theoretic limits - limits that bound what no GNN can achieve regardless of architecture.

Overparameterized networks are sparse graphs. The lottery ticket hypothesis says that dense networks contain sparse subnetworks (tickets) that train just as well. These sparse subnetworks have random-graph-like structure: they appear near the percolation threshold of the dense network.

Graphons = graph neural network limits. The mathematical theory of graphons (limit objects of dense graph sequences) is the same theory that gives GNNs their universality results. A GNN that is continuous in the cut metric topology of graphons is provably expressive on all graphs in the same graphon equivalence class.

1.3 The Four Canonical Models

THE FOUR CANONICAL RANDOM GRAPH MODELS
========================================================================

  Model           Parameters          Key property
  ---------------------------------------------------------------------
  Erdos-Renyi     n, p (or n, m)      Phase transition at p = 1/n
  G(n,p)          Independent edges   Poisson degree distribution
                                      Thresholds for all monotone props

  Watts-Strogatz  n, k, \beta             High clustering + short paths
  Small-World     Ring lattice +      Models social/neural networks
                  random rewiring     Navigability (Kleinberg)

  Barabasi-Albert n, m_0, m            Power-law degree distribution
  Scale-Free      Preferential        Hubs, robustness to random failure
                  attachment          Most real-world networks

  Stochastic      k, n_1,...,n_k, B     Community structure
  Block Model     Block membership    Kesten-Stigum threshold
  (SBM)           + probability matrix Benchmark for GNN node classif.

========================================================================

Each model captures one dominant feature of real-world networks:

  • ER captures mathematical tractability and threshold phenomena
  • WS captures the small-world property (short paths, high clustering)
  • BA captures heterogeneity (a few highly-connected hubs, many low-degree nodes)
  • SBM captures community structure (dense intra-community, sparse inter-community)

Real networks typically exhibit several of these properties simultaneously. Hybrid models (e.g., SBM with degree correction, or preferential attachment with community structure) better match empirical data.

1.4 Historical Timeline: 1959-2026

RANDOM GRAPH THEORY: 1959-2026
========================================================================

  1959  Erdos & Renyi introduce G(n,m); first random graph paper
  1960  Erdos & Renyi prove giant component phase transition
  1961  Erdos & Renyi prove connectivity threshold p = log(n)/n
  1984  Bollobas writes first comprehensive textbook on random graphs
  1995  Chung & Lu: random graphs with given expected degrees
  1998  Watts & Strogatz: small-world networks (Nature, ~36,000 cites)
  1999  Barabasi & Albert: scale-free networks (Science, ~50,000 cites)
  2001  Lovasz & Szegedy begin graphon theory (published 2006)
  2001  Girvan & Newman: modularity and community detection
  2007  Lovasz & Szegedy: limits of dense graph sequences (JCTB)
  2011  Mossel, Neeman, Sly: Kesten-Stigum threshold (stochastic proof)
  2014  Abbe & Sandon: exact recovery threshold for SBM
  2015  You, Ying, Leskovec: GraphRNN graph generation
  2018  Keriven & Peyre: graphon neural networks
  2020  GraphWorld: benchmark generation via SBM
  2022  Rusch, Bronstein, Mishra: gradient over-squashing theory
  2023  DiGress: discrete diffusion for graph generation
  2024  Graphon attention transformers (sparse attention limits)
  2026  Graphon-based GNN universality: completeness results

========================================================================

1.5 Phase Transitions: The Central Metaphor

The most striking feature of random graphs is the phase transition: a sudden, dramatic change in global structure as a parameter crosses a critical threshold. This is not merely a quantitative change but a qualitative one - the graph transitions from one phase (many small components) to another (one giant component plus small components).

Physical analogy: In ferromagnetism, a material transitions from disordered (many small magnetic domains) to ordered (one aligned domain) as temperature drops below the Curie point. The mathematics is identical: both are percolation phase transitions.

The critical exponent phenomenon: Near the critical point pc=1/np_c = 1/n, the giant component has size Θ(n2/3)\Theta(n^{2/3}) - a polynomial intermediate between the subcritical O(logn)O(\log n) and supercritical Θ(n)\Theta(n) regimes. This n2/3n^{2/3} scaling is a universal critical exponent that appears in many other combinatorial and physical phase transitions.

For AI: Phase transitions in random graphs correspond to phase transitions in learning. A GNN trained to detect community structure in SBMs undergoes a computational phase transition at the Kesten-Stigum threshold - above it, polynomial-time algorithms succeed; below it, no efficient algorithm can (conditional on computational hardness conjectures). This is the rigorous mathematical statement of why some graph learning problems are fundamentally hard.


2. Probability on Graphs: Formal Setup

2.1 Graph Probability Spaces

Let Gn\mathcal{G}_n denote the set of all labeled graphs on vertex set [n]={1,2,,n}[n] = \{1, 2, \ldots, n\}. A random graph model is a probability measure μ\mu on Gn\mathcal{G}_n.

Definition (Random Graph): A random graph GG on nn vertices is a random variable taking values in Gn\mathcal{G}_n, defined on some probability space (Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P}).

The key examples:

G(n,p)G(n,p) (Erdos-Renyi): Each edge {u,v}([n]2)\{u,v\} \in \binom{[n]}{2} is included independently with probability pp. The probability of a specific graph gg with mm edges is:

P[G=g]=pm(1p)(n2)m\mathbb{P}[G = g] = p^m (1-p)^{\binom{n}{2} - m}

G(n,m)G(n,m) (fixed-edge): Uniform over all graphs with exactly mm edges:

P[G=g]=((n2)m)11[E(g)=m]\mathbb{P}[G = g] = \binom{\binom{n}{2}}{m}^{-1} \cdot \mathbf{1}[|E(g)| = m]

Equivalence: G(n,p)G(n,p) and G(n,m)G(n,m) with m=p(n2)m = p\binom{n}{2} have the same asymptotic behavior for most properties. More precisely, G(n,p)G(n,p) conditioned on having exactly mm edges is G(n,m)G(n,m).

Graph properties as events: A graph property P\mathcal{P} is a set of graphs closed under isomorphism (it depends only on structure, not labeling). We study the event {GP}\{G \in \mathcal{P}\} and its probability as nn \to \infty.

2.2 With High Probability (w.h.p.)

Definition (w.h.p.): We say G(n,p)G(n,p) satisfies property P\mathcal{P} with high probability (w.h.p.) if:

limnP[G(n,p)P]=1\lim_{n \to \infty} \mathbb{P}[G(n,p) \in \mathcal{P}] = 1

This is distinct from "always" - there will always be rare samples that violate the property. But in the limit, the measure of the failure set goes to zero.

Notation conventions:

  • f(n)=o(g(n))f(n) = o(g(n)): f/g0f/g \to 0
  • f(n)=ω(g(n))f(n) = \omega(g(n)): f/gf/g \to \infty
  • f(n)=Θ(g(n))f(n) = \Theta(g(n)): c1gfc2gc_1 g \le f \le c_2 g for constants c1,c2>0c_1, c_2 > 0
  • f(n)g(n)f(n) \sim g(n): f/g1f/g \to 1

Example (Isolated vertices): In G(n,p)G(n,p) with p=c/np = c/n, the probability that vertex vv is isolated is (1p)n1ec(1-p)^{n-1} \sim e^{-c}. The expected number of isolated vertices is necn \cdot e^{-c}. For c=lnnc = \ln n, this expected number is 11, and the actual number of isolated vertices is 0 w.h.p.

Markov's inequality (First Moment Method): If X0X \ge 0 and E[X]0\mathbb{E}[X] \to 0, then X=0X = 0 w.h.p. (since P[X1]E[X]0\mathbb{P}[X \ge 1] \le \mathbb{E}[X] \to 0). This proves upper bounds on the probability of properties.

Second moment method: If E[X2]/E[X]21\mathbb{E}[X^2] / \mathbb{E}[X]^2 \to 1, then X>0X > 0 w.h.p. (Paley-Zygmund inequality: P[X>0]E[X]2/E[X2]\mathbb{P}[X > 0] \ge \mathbb{E}[X]^2 / \mathbb{E}[X^2]). This proves lower bounds.

2.3 Monotone Properties and Threshold Functions

Definition (Monotone property): A graph property P\mathcal{P} is monotone increasing if whenever GPG \in \mathcal{P} and GGG' \supset G (additional edges), then GPG' \in \mathcal{P}. Examples: connectivity, containing a triangle, having a giant component.

Theorem (Bollobas-Thomason, 1987): Every non-trivial monotone graph property has a threshold function p(n)p^*(n) such that:

limnP[G(n,p)P]={0if p/p01if p/p\lim_{n \to \infty} \mathbb{P}[G(n,p) \in \mathcal{P}] = \begin{cases} 0 & \text{if } p/p^* \to 0 \\ 1 & \text{if } p/p^* \to \infty \end{cases}

The proof uses the noise sensitivity / sharp threshold theory: monotone properties exhibit sharp transitions (the window where P[P]\mathbb{P}[\mathcal{P}] goes from near-0 to near-1 is o(p)o(p^*) wide) due to the influence of edges being approximately equal.

For AI: Sharp thresholds are the theoretical explanation for why GNN performance can change dramatically as graph density or community strength crosses a critical value. A model that performs at 90% accuracy might drop to random guessing when a graph parameter decreases by a factor of 2.

2.4 First and Second Moment Methods

These are the two workhorses for proving w.h.p. statements.

First Moment (Upper Bound):

To show P\mathcal{P} holds w.h.p., find a "bad event" BB and show E[1B]0\mathbb{E}[\mathbf{1}_B] \to 0:

P[B]=E[1B]0\mathbb{P}[B] = \mathbb{E}[\mathbf{1}_B] \to 0

Second Moment (Lower Bound):

To show X>0X > 0 w.h.p. (where X=iXiX = \sum_i X_i counts copies of some structure):

Paley-Zygmund inequality: P[X>0]E[X]2E[X2]\mathbb{P}[X > 0] \ge \frac{\mathbb{E}[X]^2}{\mathbb{E}[X^2]}

Expanding: E[X2]=i,jE[XiXj]\mathbb{E}[X^2] = \sum_{i,j} \mathbb{E}[X_i X_j], so we need to bound correlations between pairs of copies.

Example (Triangles): Let XX = number of triangles in G(n,p)G(n,p).

  • E[X]=(n3)p3n3p36\mathbb{E}[X] = \binom{n}{3} p^3 \sim \frac{n^3 p^3}{6}
  • For p=c/np = c/n: E[X]c3/6\mathbb{E}[X] \sim c^3/6

The triangle threshold is p=n1p^* = n^{-1}: for p1/np \ll 1/n, no triangles w.h.p.; for p1/np \gg 1/n, triangles exist w.h.p.


3. Erdos-Renyi Model

3.1 Definitions: G(n,p) and G(n,m)

The Erdos-Renyi model is the simplest and most mathematically tractable random graph model. Its beauty lies in the complete independence of edges, which makes exact calculations feasible.

Definition G(n,p)G(n,p): The random graph on [n][n] where each edge is independently present with probability p[0,1]p \in [0,1].

Statistics:

  • E[E]=(n2)pn2p/2\mathbb{E}[|E|] = \binom{n}{2} p \approx n^2 p / 2
  • Var[E]=(n2)p(1p)\text{Var}[|E|] = \binom{n}{2} p(1-p)
  • E[deg(v)]=(n1)pnp\mathbb{E}[\deg(v)] = (n-1)p \approx np for each vertex vv

Definition G(n,m)G(n,m): The random graph on [n][n] drawn uniformly from all graphs with exactly mm edges.

Regime classification (by average degree c=(n1)pnpc = (n-1)p \approx np):

Regimepp rangecc rangeLargest component
Subcriticalp<1/np < 1/nc<1c < 1O(logn)O(\log n)
Criticalp=1/np = 1/nc=1c = 1Θ(n2/3)\Theta(n^{2/3})
Supercriticalp>1/np > 1/nc>1c > 1Θ(n)\Theta(n)
Connectedpln(n)/np \ge \ln(n)/nclnnc \ge \ln nnn (whole graph)

For AI: When analyzing message passing in sparse GNNs on ER graphs, the regime determines whether information can flow globally. Below criticality (c<1c < 1), most nodes are in isolated small components - the GNN can only see local structure. Above criticality, there's a giant component enabling global information flow.

3.2 Degree Distribution: Poisson Limit

Theorem (Poisson Degree Distribution): In G(n,p)G(n,p) with p=c/np = c/n, the degree of a fixed vertex vv satisfies:

deg(v)Binomial(n1,c/n)dPoisson(c) as n\deg(v) \sim \text{Binomial}(n-1, c/n) \xrightarrow{d} \text{Poisson}(c) \text{ as } n \to \infty

Proof sketch: deg(v)=uvXuv\deg(v) = \sum_{u \neq v} X_{uv} where XuvBernoulli(c/n)X_{uv} \sim \text{Bernoulli}(c/n) are i.i.d. The sum of n1n-1 independent Bernoullis with success probability c/nc/n converges to Poisson(cc) by the law of small numbers (Poisson limit theorem).

Generating function approach: The probability generating function of Binomial(n1,c/n)\text{Binomial}(n-1, c/n) is:

GB(z)=(1cn+czn)n1ec(z1)=GPoi(c)(z)G_{B}(z) = \left(1 - \frac{c}{n} + \frac{cz}{n}\right)^{n-1} \to e^{c(z-1)} = G_{\text{Poi}(c)}(z)

Consequences of Poisson degree distribution:

  1. Exponential tail: P[deg(v)=k]=ecck/k!\mathbb{P}[\deg(v) = k] = e^{-c} c^k / k! - degrees are concentrated near cc
  2. Max degree: maxvdeg(v)lognloglogn\max_v \deg(v) \sim \frac{\log n}{\log \log n} (sublinear in nn)
  3. No hubs: Unlike scale-free networks, ER graphs have no nodes with Ω(n)\Omega(\sqrt{n}) degree

Contrast with scale-free: Power-law degree distributions P[deg=k]kγ\mathbb{P}[\deg = k] \propto k^{-\gamma} have polynomial tails and allow hubs with degree Θ(n1/(γ1))\Theta(n^{1/(\gamma-1)}). This is why real networks (preferential attachment) look so different from ER.

3.3 Giant Component Phase Transition

This is the central theorem of random graph theory - one of the most beautiful results in all of combinatorics.

Theorem (Erdos-Renyi, 1960): Let c>0c > 0 be a constant and p=c/np = c/n. Let L1(G)L_1(G) denote the size of the largest connected component of GG(n,p)G \sim G(n,p).

  1. Subcritical (c<1c < 1): L1/lnn1/I(c)L_1 / \ln n \to 1/I(c) w.h.p., where I(c)=c1lnc>0I(c) = c - 1 - \ln c > 0. In particular, L1=O(logn)L_1 = O(\log n).

  2. Critical (c=1c = 1): L1/n2/3Θ(1)L_1 / n^{2/3} \to \Theta(1) in distribution (scaling limit is Brownian motion related).

  3. Supercritical (c>1c > 1): L1/nβ(c)L_1 / n \to \beta(c) w.h.p., where β(c)\beta(c) is the unique solution in (0,1)(0,1) to:

β=1ecβ\beta = 1 - e^{-c\beta}

The second-largest component has size O(logn)O(\log n).

The survival probability β(c)\beta(c): The equation β=1ecβ\beta = 1 - e^{-c\beta} has a probabilistic interpretation. Think of each vertex independently joining the giant component with probability β\beta. A vertex joins if it has at least one neighbor that also joins. If neighbors join with probability β\beta, and there are Poisson(c)\text{Poisson}(c) neighbors, the probability of having at least one joining neighbor is 1ecβ1 - e^{-c\beta} - hence the fixed-point equation.

Derivation via branching processes: A key technique is to compare component exploration with a branching process. Starting from vertex vv, reveal its neighbors one by one. Each neighbor independently has Poisson(c)\text{Poisson}(c) additional neighbors (in the limit). This is a Galton-Watson branching process with offspring distribution Poisson(c)\text{Poisson}(c).

A Galton-Watson process with mean offspring cc survives (generates an infinite tree) with probability β\beta satisfying β=1ecβ\beta = 1 - e^{-c\beta}. Below c=1c = 1 (mean offspring <1< 1), the process dies out almost surely - hence subcritical. Above c=1c = 1, there's a positive probability of survival - hence the giant component.

Size of the giant component:

ccβ(c)\beta(c) (fraction in giant)
0.50 (subcritical)
1.00 (critical, but n2/3n^{2/3} scaling)
1.50.583
2.00.797
3.00.940
5.00.993

For AI: GNN expressiveness on random graphs undergoes a similar phase transition. In the subcritical regime, the WL algorithm (and GINs) see disconnected local neighborhoods - they cannot distinguish non-isomorphic components. In the supercritical regime, the global component provides rich structural information.

3.4 Connectivity Threshold

Theorem (Erdos-Renyi, 1961): Let p=(lnn+c)/np = (\ln n + c) / n for a constant cRc \in \mathbb{R}. Then:

limnP[G(n,p) is connected]=eec\lim_{n \to \infty} \mathbb{P}[G(n,p) \text{ is connected}] = e^{-e^{-c}}

In particular:

  • If pln(n)/np \ll \ln(n)/n: GG is disconnected w.h.p.
  • If p=ln(n)/np = \ln(n)/n: GG is connected with probability e10.368e^{-1} \approx 0.368
  • If pln(n)/np \gg \ln(n)/n: GG is connected w.h.p.

Proof sketch (upper bound via first moment):

Let XkX_k = number of components of size kn/2k \le n/2. The bottleneck is k=1k=1 (isolated vertices). A vertex vv is isolated iff none of its n1n-1 potential edges are present:

P[v isolated]=(1p)n1=(1lnn+cn)n1e(lnn+c)=ecn\mathbb{P}[v \text{ isolated}] = (1-p)^{n-1} = \left(1 - \frac{\ln n + c}{n}\right)^{n-1} \to e^{-(\ln n + c)} = \frac{e^{-c}}{n}

Expected isolated vertices: E[X1]=necn=ec\mathbb{E}[X_1] = n \cdot \frac{e^{-c}}{n} = e^{-c}.

By a Poisson approximation argument, X1Poisson(ec)X_1 \to \text{Poisson}(e^{-c}) in distribution, so:

P[X1=0]eec\mathbb{P}[X_1 = 0] \to e^{-e^{-c}}

Connectivity fails iff X1>0X_1 > 0 or there's a larger isolated component. One shows larger components disappear before isolated vertices, so connectivity threshold == isolated vertex disappearance threshold.

Sharp threshold: The window is p=(lnn+ω(1))/np = (\ln n + \omega(1))/n - any diverging ω\omega suffices. This is an unusually sharp threshold (polynomial-width thresholds are more common).

3.5 Subgraph Counts and Triangle Thresholds

Definition: A subgraph count for a fixed graph HH is XH=X_H = number of labeled copies of HH in G(n,p)G(n,p).

Expectation:

E[XH]=n!(nV(H))!1Aut(H)pE(H)\mathbb{E}[X_H] = \frac{n!}{(n - |V(H)|)!} \cdot \frac{1}{|\text{Aut}(H)|} \cdot p^{|E(H)|}

For dense subgraphs, this simplifies to Θ(nV(H)pE(H))\Theta(n^{|V(H)|} p^{|E(H)|}).

Threshold for HH: By the first and second moment methods, XH>0X_H > 0 w.h.p. iff pn1/m(H)p \gg n^{-1/m(H)}, where:

m(H)=maxHH,V(H)1E(H)V(H)m(H) = \max_{H' \subseteq H, |V(H')| \ge 1} \frac{|E(H')|}{|V(H')|}

is the maximum 2-core density of HH.

Triangle threshold: For H=K3H = K_3 (triangle), m(H)=3/3=1m(H) = 3/3 = 1, so threshold is p=n1p^* = n^{-1}.

| Subgraph HH | V|V| | E|E| | m(H)m(H) | Threshold pp^* | |-------------|-------|-------|---------|----------------| | Edge | 2 | 1 | 1/2 | n2n^{-2} | | Path P3P_3 | 3 | 2 | 2/3 | n3/2n^{-3/2} | | Triangle K3K_3 | 3 | 3 | 1 | n1n^{-1} | | 4-clique K4K_4 | 4 | 6 | 3/2 | n2/3n^{-2/3} | | 5-clique K5K_5 | 5 | 10 | 2 | n1/2n^{-1/2} |

Janson's inequality: Provides exponential concentration for subgraph counts when E[XH]\mathbb{E}[X_H] is large:

P[XH=0]exp(E[XH]22Δ)\mathbb{P}[X_H = 0] \le \exp\left(-\frac{\mathbb{E}[X_H]^2}{2\Delta}\right)

where Δ=HHP[HHG]\Delta = \sum_{H' \sim H''} \mathbb{P}[H' \cup H'' \subseteq G] sums over pairs sharing at least one edge.

3.6 Diameter and Distances

Theorem: In G(n,p)G(n,p) with c=np>1c = np > 1 (supercritical), the diameter of the giant component is:

diamlognlog(c)\text{diam} \sim \frac{\log n}{\log(c)}

w.h.p. More precisely, diam=(1+o(1))logn/logc\text{diam} = (1 + o(1)) \log n / \log c.

Why? The giant component behaves like a random tree with branching factor cc. Starting from any node, the neighborhood of radius rr has size cr\sim c^r. It reaches nn when crnc^r \approx n, i.e., rlogn/logcr \approx \log n / \log c.

Characteristic path length: This O(logn)O(\log n) diameter is the mathematical explanation for the six degrees of separation phenomenon. With n=109n = 10^9 (Facebook) and c100c \approx 100 (100 friends), the diameter is log(109)/log(100)4.5\log(10^9) / \log(100) \approx 4.5 - indeed about 4-6 hops.

Contrast with small-world: In the ring lattice (before rewiring), diameter is n/(2k)=Ω(n)n/(2k) = \Omega(n) - linear. Watts-Strogatz introduces just β\beta fraction of random rewirings to drop this to O(logn)O(\log n) while maintaining high clustering.

3.7 Spectral Properties of G(n,p)

Expected adjacency matrix: E[A]=p(11In)\mathbb{E}[\mathbf{A}] = p(\mathbf{1}\mathbf{1}^\top - \mathbf{I}_n), a rank-1 perturbation of pI-p\mathbf{I}.

Spectral decomposition: Write A=E[A]+(AE[A])\mathbf{A} = \mathbb{E}[\mathbf{A}] + (\mathbf{A} - \mathbb{E}[\mathbf{A}]). The fluctuation matrix W=AE[A]\mathbf{W} = \mathbf{A} - \mathbb{E}[\mathbf{A}] is a Wigner matrix (symmetric, zero-diagonal, i.i.d. entries above diagonal).

Theorem (Furedi-Komlos, 1981): For G(n,p)G(n,p) with pp constant, the eigenvalues of A\mathbf{A} satisfy:

  • λ1np\lambda_1 \sim np (outlier, corresponding to the average degree direction 1/n\mathbf{1}/\sqrt{n})
  • λ2,,λn\lambda_2, \ldots, \lambda_n are in [(2+ϵ)np(1p),(2+ϵ)np(1p)][-(2+\epsilon)\sqrt{np(1-p)}, (2+\epsilon)\sqrt{np(1-p)}] w.h.p.

The bulk eigenvalues follow Wigner's semicircle law with radius 2np(1p)2\sqrt{np(1-p)}.

For spectral clustering: The spectral gap λ1λ2np2np\lambda_1 - \lambda_2 \approx np - 2\sqrt{np} determines how easily we can detect the leading eigenvector (which encodes the community structure in SBM).


4. Watts-Strogatz Small-World Model

4.1 Construction and Parameters

The Watts-Strogatz (WS) model was introduced in 1998 to explain a paradox: real-world networks (social, neural, power grid) have both high clustering AND short path lengths. Regular lattices have high clustering but long paths; ER random graphs have short paths but low clustering. WS interpolates between them.

Construction (Watts-Strogatz, 1998):

  1. Start with a ring lattice: nn nodes arranged in a circle, each connected to kk nearest neighbors (k/2k/2 on each side). Assume nklnnn \gg k \gg \ln n.
  2. Rewire: For each edge (i,j)(i, j) with j>ij > i in the ring, with probability β\beta replace jj with a uniformly random node jij' \ne i (avoiding duplicate edges).

Parameters:

  • nn: number of nodes
  • kk: initial degree (even integer, typically k{4,6,10}k \in \{4, 6, 10\})
  • β[0,1]\beta \in [0,1]: rewiring probability
    • β=0\beta = 0: regular ring lattice (high clustering, long paths)
    • β=1\beta = 1: approximately ER random graph (low clustering, short paths)
    • β0.01\beta \approx 0.01-0.10.1: small-world regime (high clustering, short paths!)

For AI: Neural network connection graphs and attention patterns often exhibit small-world structure. The feedforward layers of transformers have short path lengths (like random graphs) while local attention heads maintain clustered connections (like lattices). Understanding this structure informs efficient attention design.

4.2 Clustering Coefficient

Definition: The local clustering coefficient of vertex vv with degree dvd_v is:

Cv={(u,w)E:u,wN(v)}(dv2)C_v = \frac{|\{(u,w) \in E : u,w \in N(v)\}|}{\binom{d_v}{2}}

the fraction of vv's possible neighbor-pairs that are also connected.

Global clustering coefficient: C=1nvCvC = \frac{1}{n} \sum_v C_v (average over vertices).

Ring lattice (β=0\beta = 0): Each vertex has kk neighbors (the k/2k/2 on each side of the ring). Neighbors of vv include all nodes within distance k/2k/2. A pair of vv's neighbors (u,w)(u,w) are connected iff they are within distance k/2k/2 of each other.

For large kk, the fraction of connected neighbor pairs is approximately:

Clattice=3(k2)4(k1)34 for large kC_{\text{lattice}} = \frac{3(k-2)}{4(k-1)} \approx \frac{3}{4} \text{ for large } k

WS model: For small β\beta, the clustering coefficient is approximately:

C(β)C(0)(1β)3=3(k2)4(k1)(1β)3C(\beta) \approx C(0) \cdot (1 - \beta)^3 = \frac{3(k-2)}{4(k-1)} (1 - \beta)^3

This is because a triangle involving vv requires all three edges to survive rewiring, and each edge survives with probability (1β)(1-\beta).

Random graph (β=1\beta = 1): For ER with pk/np \approx k/n:

Crandomk/n1C_{\text{random}} \approx k/n \ll 1

Key observation: For small β\beta (say β=0.05\beta = 0.05), C(β)0.75(0.95)30.64C(\beta) \approx 0.75 \cdot (0.95)^3 \approx 0.64 - still very high, close to the lattice value.

4.3 Average Path Length

Ring lattice (β=0\beta = 0): The shortest path between two nodes separated by rr positions in the ring is r/(k/2)\lceil r / (k/2) \rceil. The average path length is approximately n/(2k)n/(2k), which grows linearly with nn.

WS model (0<β<10 < \beta < 1): The average path length drops dramatically with rewiring. Even a tiny β\beta introduces long-range shortcuts that drastically reduce path lengths.

Heuristic analysis (Newman-Watts): The typical inter-component distance after rewiring is:

L(β)nkf(nkβ/2)L(\beta) \approx \frac{n}{k} \cdot f(nk\beta/2)

where f(u)log(u)/uf(u) \sim \log(u)/u for large uu. For β2/(nk)\beta \gg 2/(nk), the path length transitions from Θ(n)\Theta(n) to Θ(logn)\Theta(\log n).

Numerical example (n=1000n = 1000, k=10k = 10):

β\betaC(β)C(\beta)L(β)L(\beta)
00.66750
0.0010.66020
0.010.6408
0.10.5285
0.50.1954
1.00.0103

The small-world regime (β0.01\beta \approx 0.01-0.050.05) achieves high CC and low LL simultaneously.

4.4 The Small-World Regime

Watts-Strogatz property: A graph is said to have the small-world property if:

  1. CCrandom=k/nC \gg C_{\text{random}} = k/n (much more clustered than ER)
  2. LLrandom=log(n)/log(k)L \approx L_{\text{random}} = \log(n)/\log(k) (path length comparable to ER)

These two conditions are simultaneously satisfied for WS with β[Ω(1/(nk)),O(1)]\beta \in [\Omega(1/(nk)), O(1)].

Empirical validation:

Watts and Strogatz validated the model against three real networks:

NetworknnkkCactualC_{\text{actual}}CrandomC_{\text{random}}LactualL_{\text{actual}}LrandomL_{\text{random}}
Film actors225,226610.790.000273.652.99
Power grid (W. US)4,9412.670.0800.00518.712.4
C. elegans neural282140.280.052.652.25

All three networks have high clustering (much above ER random graph level) but short average path lengths (comparable to ER). This is the hallmark of small-world structure.

4.5 Navigability and Kleinberg's Grid

Watts and Strogatz showed that small-world graphs have short paths, but Kleinberg (2000) asked: can nodes find these short paths using only local information?

Kleinberg's model: Start with a 2D grid of n=k×kn = k \times k nodes. Each node vv has edges to all grid neighbors within distance rr (local structure) plus one long-range link to node uu chosen with probability proportional to d(v,u)sd(v,u)^{-s}.

Theorem (Kleinberg, 2000):

  • If s=2s = 2 (exponent matches grid dimension): greedy routing finds paths of length O((logn)2)O((\log n)^2) w.h.p.
  • If s2s \ne 2: any decentralized algorithm requires Ω(nδ)\Omega(n^{\delta}) steps for some δ>0\delta > 0.

Interpretation: The power-law exponent s=ds = d (where dd is the grid dimension) uniquely enables efficient decentralized navigation. Real social networks approximate this condition, explaining how people can navigate social networks in few steps even with only local knowledge.

For AI: This connects to hierarchical attention in transformers. FlashAttention-2 and related methods achieve efficient attention by exploiting the fact that attention scores decay with token distance - a continuous analog of Kleinberg's inverse power-law long-range links.

4.6 Social Network Evidence

Small-world structure has been empirically validated across many domains:

  • Social networks: Milgram's 1967 experiment found ~6 hops between strangers in the US; Facebook (2016) found average path length 3.57 for 1.6 billion users.
  • Neural connectomes: C. elegans (302 neurons), mouse visual cortex, human brain fMRI networks all show high clustering and short paths.
  • Internet topology: ASN-level and router-level graphs exhibit small-world properties.
  • Citation networks: Academic citation graphs have C0.3C \approx 0.3-0.50.5, well above the ER baseline.

Limitations: WS does not generate power-law degree distributions. Real networks often exhibit BOTH small-world AND scale-free properties - requiring hybrid models.


5. Barabasi-Albert Scale-Free Model

5.1 Preferential Attachment

The Barabasi-Albert (BA) model was introduced in 1999 to explain a universal observation: degree distributions in real-world networks follow a power law P(k)kγP(k) \propto k^{-\gamma} with γ2\gamma \approx 2-33. This is incompatible with the exponential tails of ER's Poisson distribution.

The explanation: networks grow over time, and new nodes prefer to attach to high-degree nodes. This "rich get richer" mechanism generates hubs.

Construction (Barabasi-Albert):

  1. Start with m0mm_0 \ge m nodes with arbitrary connections.
  2. At each time step t=m0+1,m0+2,,nt = m_0+1, m_0+2, \ldots, n:
    • Add one new node vtv_t
    • Connect vtv_t to mm existing nodes, chosen independently with probability proportional to their current degree:
Π(vtu)=deg(u)wdeg(w)\Pi(v_t \to u) = \frac{\deg(u)}{\sum_{w} \deg(w)}

The denominator wdeg(w)=2E\sum_w \deg(w) = 2|E| (handshaking lemma).

Why "preferential attachment"? This mimics real-world network growth:

  • Web pages link to popular pages (already have many in-links)
  • Scientists cite highly-cited papers
  • Airports add routes to hubs

For AI: GNN training graphs from large knowledge bases (Wikidata, Freebase) exhibit scale-free degree distributions. GNN aggregation functions must handle this heterogeneity - a degree-10 node and a degree-1000 node require different treatment.

5.2 Power-Law Degree Distribution

Theorem (Barabasi-Albert, 1999; rigorous: Bollobas et al., 2001): For GBA(n,m)G \sim \text{BA}(n, m), as nn \to \infty, the degree distribution satisfies:

P[deg(v)=k]2m(m+1)k(k+1)(k+2)2m2k3 for large k\mathbb{P}[\deg(v) = k] \to \frac{2m(m+1)}{k(k+1)(k+2)} \sim \frac{2m^2}{k^3} \text{ for large } k

This is a power law with exponent γ=3\gamma = 3:

P(k)k3P(k) \propto k^{-3}

Scale-free: A distribution is called scale-free if P(k)kγP(k) \propto k^{-\gamma} for some γ>1\gamma > 1. Scale-free means the distribution looks the same at all scales (self-similar under rescaling).

Moments: For P(k)kγP(k) \propto k^{-\gamma}:

  • E[k]<\mathbb{E}[k] < \infty iff γ>2\gamma > 2
  • E[k2]<\mathbb{E}[k^2] < \infty iff γ>3\gamma > 3

For BA with γ=3\gamma = 3: mean degree is finite, but variance diverges. This has profound implications:

  • No effective epidemic threshold: diseases spread to the whole network for any transmission rate >0>0
  • Robustness to random failure: removing random nodes rarely disconnects the graph (most nodes have low degree)
  • Vulnerability to targeted attack: removing the few hubs disconnects the graph immediately

5.3 Mean-Field Analysis

Mean-field derivation: Let ki(t)k_i(t) be the degree of node ii at time tt. Treating kik_i as a continuous variable and taking expectations:

kit=mΠ(i)=mkijkj\frac{\partial k_i}{\partial t} = m \cdot \Pi(i) = m \cdot \frac{k_i}{\sum_j k_j}

Since jkj=2mt\sum_j k_j = 2mt (each new node adds mm edges, contributing 2m2m to total degree sum):

kit=ki2t\frac{\partial k_i}{\partial t} = \frac{k_i}{2t}

Solution: With initial condition ki(ti)=mk_i(t_i) = m (node ii added at time tit_i with mm initial edges):

ki(t)=mt/tik_i(t) = m \sqrt{t / t_i}

Degree distribution from mean-field: Node ii has degree >k> k at time tt iff ki(t)>kk_i(t) > k, i.e., ti<m2t/k2t_i < m^2 t / k^2. Since nodes are added uniformly at rate 1 per step:

P[ki(t)>k]=P[ti<m2t/k2]=m2t/k2t=m2k2\mathbb{P}[k_i(t) > k] = \mathbb{P}[t_i < m^2 t / k^2] = \frac{m^2 t / k^2}{t} = \frac{m^2}{k^2}

Therefore:

P(k)=ddkP[ki(t)>k]=2m2k3P(k) = -\frac{d}{dk}\mathbb{P}[k_i(t) > k] = \frac{2m^2}{k^3}

This reproduces the power law P(k)k3P(k) \propto k^{-3}, consistent with the rigorous result.

Hub formation: The oldest nodes grow fastest (degree t/ti\propto \sqrt{t/t_i}). Node ii added at time ti=1t_i = 1 has degree mn\sim m\sqrt{n} at time nn - a hub with Θ(n)\Theta(\sqrt{n}) degree.

5.4 Robustness and Fragility

Random failure: If each node is independently removed with probability qq, what is the critical qq^* above which the giant component disappears?

For a network with degree distribution P(k)P(k), the critical fraction for percolation is determined by the Molloy-Reed criterion:

E[k2]E[k]>2\frac{\mathbb{E}[k^2]}{\mathbb{E}[k]} > 2

For scale-free networks with γ3\gamma \le 3 (including BA with γ=3\gamma = 3): E[k2]=\mathbb{E}[k^2] = \infty, so this criterion always holds. No matter how many nodes are randomly removed, a giant component persists (in infinite networks). In finite BA networks, the giant component persists for qq close to 1.

Targeted attack: If the highest-degree nodes are removed first, the network is highly vulnerable. Removing even 5% of the highest-degree nodes can destroy the giant component of a BA network.

Implication for AI: Neural network pruning that removes random weights (random failure) is much safer than pruning by magnitude (targeted attack) - magnitude-based pruning could inadvertently target the "hubs" of the implicit neural network graph.

5.5 Scale-Free Networks in the Wild

Evidence for scale-free: Many networks show approximate power-law degree distributions:

  • World Wide Web: γin2.1\gamma_{\text{in}} \approx 2.1, γout2.7\gamma_{\text{out}} \approx 2.7
  • Internet (AS-level): γ2.1\gamma \approx 2.1
  • Protein-protein interaction: γ2.4\gamma \approx 2.4
  • Actor collaboration: γ2.3\gamma \approx 2.3

Controversy (2019): Broido & Clauset (2019) argued that true power laws are rare - most claimed scale-free networks fit log-normal or other heavy-tailed distributions better. The debate continues, but the practical point stands: real networks have much heavier degree tails than ER Poisson.

GNN implications: Degree-heterogeneous graphs require careful normalization in GCN-style aggregation. GraphSAGE's neighborhood sampling provides approximate uniformity; PNA (Principal Neighbourhood Aggregation) uses multiple aggregators (mean, max, std) to handle degree heterogeneity robustly.


6. Stochastic Block Model

6.1 Definition and Parameters

The Stochastic Block Model (SBM) is the canonical random graph model for community structure. It is the workhorse of GNN benchmark generation and the model for which information-theoretic limits of community detection are fully understood.

Definition (SBM): Given parameters:

  • nn: number of nodes
  • kk: number of communities/blocks
  • σ:[n][k]\sigma: [n] \to [k]: community assignment vector
  • B[0,1]k×kB \in [0,1]^{k \times k}: symmetric block probability matrix (B_{rs} = probability of edge between community rr and ss)

The SBM generates a random graph GSBM(n,k,σ,B)G \sim \text{SBM}(n, k, \sigma, B) by independently including each edge (u,v)(u,v) with probability Bσ(u),σ(v)B_{\sigma(u), \sigma(v)}.

Symmetric SBM (planted partition): All communities have equal size n/kn/k; Brr=pB_{rr} = p (within-community) and Brs=qB_{rs} = q for rsr \ne s (between-community), with p>qp > q.

Sparse SBM: p=a/np = a/n, q=b/nq = b/n with a>ba > b constants. This is the regime studied in information-theoretic limits.

Why SBM matters for AI: Node classification on real graphs (citation networks, social networks) essentially asks: given an observed graph GG with node features, recover the community labels σ\sigma. SBM provides the ground truth for studying when this is possible and what algorithms can achieve it.

6.2 Community Detection: Information-Theoretic Limits

Three regimes for symmetric 2-block SBM (k=2k = 2, equal communities):

With p=a/np = a/n, q=b/nq = b/n:

  1. Exact recovery (a>ba > b large enough): Recover σ\sigma exactly (up to global permutation) with high probability. Threshold: ab>2\sqrt{a} - \sqrt{b} > \sqrt{2}.

  2. Weak recovery / detection: Identify communities better than chance (correlated with ground truth). Threshold (Kesten-Stigum): (ab)2>2(a+b)(a-b)^2 > 2(a+b).

  3. Impossible: Below the Kesten-Stigum threshold, no algorithm can do better than random guessing.

Kesten-Stigum threshold: The SNR condition (ab)2>2(a+b)(a-b)^2 > 2(a+b) can be rewritten as:

(ab)22(a+b)>1\frac{(a-b)^2}{2(a+b)} > 1

The left side is the signal-to-noise ratio: (ab)(a-b) measures community signal, a+b\sqrt{a+b} measures noise (average degree). When SNR <1< 1, the noise overwhelms the signal.

Spectral interpretation: The second eigenvalue of the adjacency matrix satisfies λ2(ab)/nn/2=(ab)/2\lambda_2 \approx (a-b)/n \cdot n/2 = (a-b)/2. The spectral radius of the noise (Wigner semicircle) is 2(a+b)/22\sqrt{(a+b)/2}. The signal eigenvalue emerges from the noise bulk iff (ab)/2>2(a+b)/2(a-b)/2 > 2\sqrt{(a+b)/2}, i.e., (ab)2>8(a+b)/2=4(a+b)(a-b)^2 > 8(a+b)/2 = 4(a+b) - slightly different from KS due to different normalization, but same qualitative conclusion.

For GNNs: GNNs trained on SBM graphs face exactly this detection problem. Below the Kesten-Stigum threshold, no GNN - regardless of depth, width, or architecture - can reliably classify nodes into communities. This is the hard limit on what graph learning can achieve.

kk-block SBM: For kk communities, the threshold generalizes. The second eigenvalue of BB determines the computational threshold.

6.3 Degree-Corrected SBM

Real-world networks have heterogeneous degree distributions within communities. The DC-SBM adds degree parameters:

Definition (DC-SBM): Node vv has a degree parameter θv>0\theta_v > 0. The probability of edge (u,v)(u,v) is:

P[(u,v)E]=θuθvBσ(u),σ(v)\mathbb{P}[(u,v) \in E] = \theta_u \theta_v B_{\sigma(u), \sigma(v)}

Under DC-SBM, the expected degree of node vv is θvuθuBσ(v),σ(u)\theta_v \sum_u \theta_u B_{\sigma(v), \sigma(u)}. Choosing θvkα\theta_v \propto k^{-\alpha} for some power law generates a scale-free SBM combining community structure with hub-spoke topology.

Why DC-SBM matters: Citation networks and social networks have communities AND degree heterogeneity. Standard spectral clustering fails on DC-SBM because high-degree nodes dominate the leading eigenvectors. Regularized spectral clustering or normalized Laplacian-based methods are needed.

6.4 SBM as GNN Benchmark Generator

GraphWorld (2022): A Google framework that generates GNN benchmarks by sampling SBM parameters from a distribution over:

  • Number of communities k[2,20]k \in [2, 20]
  • Community sizes (balanced or Zipf-distributed)
  • Within-block density pp
  • Between-block density qq

By sampling (a,b)(a,b) pairs across and below the Kesten-Stigum threshold, GraphWorld generates benchmarks that are systematically hard or easy for GNNs.

Result: Different GNN architectures excel in different SBM regimes:

  • GCN: best for homophilic SBM (dense intra-community)
  • GraphSAGE: robust across densities
  • GIN: best near the Kesten-Stigum threshold (maximally expressive)
  • MixHop: best for heterophilic SBM (dense inter-community)

This validates the theoretical prediction that no single GNN architecture dominates all graph types.


7. Spectral Properties of Random Graphs

7.1 Wigner's Semicircle Law

Wigner's semicircle law is a fundamental result in random matrix theory that describes the bulk eigenvalue distribution of random symmetric matrices.

Setup: Let Wn=1nMnW_n = \frac{1}{\sqrt{n}} M_n where MnM_n is a real symmetric n×nn \times n random matrix with:

  • Diagonal entries Mii=0M_{ii} = 0
  • Off-diagonal entries Mij=MjiM_{ij} = M_{ji} i.i.d. with mean 0 and variance σ2\sigma^2

Theorem (Wigner, 1955): The empirical spectral distribution of WnW_n:

μn=1ni=1nδλi(Wn)\mu_n = \frac{1}{n} \sum_{i=1}^n \delta_{\lambda_i(W_n)}

converges weakly in probability to the semicircle law:

μsc(dx)=12πσ24σ2x21x2σdx\mu_{sc}(dx) = \frac{1}{2\pi\sigma^2}\sqrt{4\sigma^2 - x^2} \cdot \mathbf{1}_{|x| \le 2\sigma} dx

Support: [2σ,2σ][-2\sigma, 2\sigma] - all eigenvalues of WnW_n lie in this interval asymptotically.

For G(n,p)G(n,p): The adjacency matrix AA centered and scaled: W=(Ap11)/np(1p)W = (A - p\mathbf{1}\mathbf{1}^\top) / \sqrt{np(1-p)} has bulk eigenvalues following the semicircle law on [2,2][-2, 2] (with σ=1\sigma = 1).

The outlier eigenvalue λ1np\lambda_1 \approx np comes from the mean matrix p11p\mathbf{1}\mathbf{1}^\top - it pokes out of the bulk.

For SBM: The adjacency matrix of an SBM decomposes as A=Aˉ+WA = \bar{A} + W where Aˉ=E[A]\bar{A} = \mathbb{E}[A] is the block-structured mean matrix (rank kk) and WW is a Wigner-like noise matrix. The kk outlier eigenvalues of Aˉ\bar{A} emerge from the semicircle bulk and encode the community structure, provided the signal-to-noise ratio exceeds the Kesten-Stigum threshold.

7.2 Spectral Gap and Community Detection

Spectral algorithm for SBM:

  1. Compute the leading kk eigenvectors of AA (or normalized Laplacian LsymL_{sym})
  2. Form the n×kn \times k embedding matrix UU
  3. Run kk-means on rows of UU to recover community assignments

Why does this work? For the planted partition SBM with p=a/np = a/n and q=b/nq = b/n:

  • Leading eigenvalue: λ1(a+(k1)b)/(2k)n/n=(a+(k1)b)/2\lambda_1 \approx (a + (k-1)b)/(2k) \cdot n/n = (a + (k-1)b)/2 ... (using kk-block symmetric SBM)
  • Second eigenvalue: λ2(ab)/2\lambda_2 \approx (a-b)/2 (signal eigenvalue)
  • Bulk edge: λbulk(a+b)/2\lambda_{\text{bulk}} \approx \sqrt{(a+b)/2}

Signal eigenvalue separates from bulk iff (ab)/2>(a+b)/2|(a-b)/2| > \sqrt{(a+b)/2}, which is exactly the Kesten-Stigum condition.

Davis-Kahan bound (next subsection): If signal and noise eigenvalues are separated, the eigenvectors of AA are close to those of E[A]\mathbb{E}[A], enabling accurate community recovery.

7.3 Davis-Kahan Theorem and Perturbation Bounds

Theorem (Davis-Kahan, 1970): Let A=Aˉ+WA = \bar{A} + W where Aˉ\bar{A} is symmetric with eigenvalue λ\lambda and eigenvector u\mathbf{u}, and WW is a perturbation with Wopδ\|W\|_{op} \le \delta. Let δ\delta' be the gap between λ\lambda and all other eigenvalues of Aˉ\bar{A}. Then the corresponding eigenvector u^\hat{\mathbf{u}} of AA satisfies:

sin(u^,u)δδδ\sin\angle(\hat{\mathbf{u}}, \mathbf{u}) \le \frac{\delta}{\delta' - \delta}

Application to SBM: For the 2-block SBM:

  • Signal gap: δ=λ2(Aˉ)λ3(Aˉ)=(ab)/2\delta' = \lambda_2(\bar{A}) - \lambda_3(\bar{A}) = (a-b)/2
  • Noise: Wop2(a+b)/2(1+o(1))\|W\|_{op} \le 2\sqrt{(a+b)/2} \cdot (1 + o(1)) (Wigner semicircle radius)
  • Angle error: sin(u^2,u2)2(a+b)/2(ab)/22(a+b)/2\sin\angle(\hat{\mathbf{u}}_2, \mathbf{u}_2) \le \frac{2\sqrt{(a+b)/2}}{(a-b)/2 - 2\sqrt{(a+b)/2}}

This is o(1)o(1) iff (ab)/2>2(a+b)/2(a-b)/2 > 2\sqrt{(a+b)/2}, i.e., the Kesten-Stigum condition holds. When it holds, the estimated eigenvector is close to the ground-truth community indicator vector, and kk-means succeeds.

For GNNs: Davis-Kahan explains why GNNs with spectral-style message passing (GCN) can do community detection above the threshold but fail below it. It also shows that adding node features (which contribute additional signal to Aˉ\bar{A}) can push GNNs above the threshold even when the graph structure alone is insufficient.

7.4 Laplacian Spectrum of G(n,p)

Normalized Laplacian: Lsym=D1/2(DA)D1/2=ID1/2AD1/2L_{sym} = D^{-1/2}(D-A)D^{-1/2} = I - D^{-1/2}AD^{-1/2}.

For G(n,p)G(n,p) with pp constant:

  • Eigenvalues of LsymL_{sym} lie in [0,2][0, 2] (always)
  • λ1(Lsym)=0\lambda_1(L_{sym}) = 0 always (corresponding to 1/n\mathbf{1}/\sqrt{n})
  • For pp fixed: λn(Lsym)2\lambda_n(L_{sym}) \to 2, λ2(Lsym)1\lambda_2(L_{sym}) \to 1 - the bulk concentrates near 1

Algebraic connectivity (Fiedler value): λ2(L)\lambda_2(L) (unnormalized Laplacian) is the Fiedler value, which controls:

  • Convergence rate of random walks (mixing time 1/λ2\propto 1/\lambda_2)
  • Robustness (edge connectivity λ2\ge \lambda_2)
  • Cheeger constant approximation: λ2/2h(G)2λ2\lambda_2/2 \le h(G) \le \sqrt{2\lambda_2}

For G(n,p)G(n,p) with p=c/np = c/n, c>1c > 1: λ2(L)c2c+O(1/n)\lambda_2(L) \approx c - 2\sqrt{c} + O(1/n) for the giant component.


8. Graphons: The Infinite-Size Limit

8.1 Dense Graph Sequences and the Cut Metric

As graph size nn \to \infty, what is the "limit" of a sequence of dense graphs? This question leads to graphon theory - the measure-theoretic framework that unifies all dense random graph models.

Dense graph sequence: A sequence GnG_n of graphs with V(Gn)=n|V(G_n)| = n and E(Gn)=Θ(n2)|E(G_n)| = \Theta(n^2) (constant edge density).

Cut distance: The cut norm between two symmetric functions f,g:[0,1]2Rf, g: [0,1]^2 \to \mathbb{R} is:

fg=supS,T[0,1]S×T(f(x,y)g(x,y))dxdy\|f - g\|_{\square} = \sup_{S, T \subseteq [0,1]} \left| \int_{S \times T} (f(x,y) - g(x,y)) \, dx \, dy \right|

The cut metric between graphs GG and HH on the same vertex set is d(G,H)=WGWHd_\square(G, H) = \|W_G - W_H\|_\square where WG(x,y)W_G(x,y) is the step function encoding the adjacency of GG.

After quotienting by relabelings (graph isomorphisms), we get the cut distance δ(G,H)\delta_\square(G, H).

8.2 Graphon Definition and Sampling

Definition (Graphon): A graphon is a symmetric measurable function W:[0,1]2[0,1]W: [0,1]^2 \to [0,1].

Intuition: Think of W(x,y)W(x,y) as the "connection probability" between two abstract node types xx and yy, where node types are drawn uniformly from [0,1][0,1].

Graphon sampling: To sample an nn-node graph from graphon WW:

  1. Draw ξ1,,ξnUniform[0,1]\xi_1, \ldots, \xi_n \sim \text{Uniform}[0,1] i.i.d. (latent node types)
  2. Include edge (i,j)(i,j) with probability W(ξi,ξj)W(\xi_i, \xi_j), independently

Examples of graphons and their corresponding random graph models:

Graphon W(x,y)W(x,y)Corresponding model
W(x,y)=pW(x,y) = p (constant)Erdos-Renyi G(n,p)G(n,p)
W(x,y)=1[x+y>1]W(x,y) = \mathbf{1}[x+y > 1]Half-graph
W(x,y)=1[kx=ky]p+(11[])qW(x,y) = \mathbf{1}[\lfloor kx \rfloor = \lfloor ky \rfloor] \cdot p + (1 - \mathbf{1}[\ldots]) \cdot qkk-block SBM
W(x,y)=xyW(x,y) = x \cdot yProduct graphon (Chung-Lu style)
W(x,y)=min(x,y)W(x,y) = \min(x,y)Threshold model

Lovasz-Szegedy theorem (2006): Every convergent sequence of dense graphs (in the cut metric) converges to a graphon. Conversely, every graphon arises as the limit of a graph sequence. The space of graphons with the cut metric is compact.

For AI: Graphons are the natural limiting objects for graph neural networks. A GNN ff maps graphs to outputs. If ff is continuous in the cut metric, then f(Gn)f(W)f(G_n) \to f(W) whenever GnWG_n \to W in cut distance. This is precisely the condition for a GNN to be "robust" to graph size changes.

8.3 Homomorphism Densities and Graph Parameters

Homomorphism density: For graphs FF and GG, the homomorphism density is:

t(F,G)=hom(F,G)V(G)V(F)t(F, G) = \frac{\text{hom}(F, G)}{|V(G)|^{|V(F)|}}

where hom(F,G)\text{hom}(F, G) counts graph homomorphisms FGF \to G.

Examples:

  • t(K2,G)t(K_2, G) = edge density
  • t(K3,G)t(K_3, G) = triangle density
  • t(C4,G)t(C_4, G) = 4-cycle density

Graphon version: For a graphon WW and graph FF with kk vertices:

t(F,W)=[0,1]k(i,j)E(F)W(xi,xj)dxt(F, W) = \int_{[0,1]^k} \prod_{(i,j) \in E(F)} W(x_i, x_j) \, d\mathbf{x}

Theorem (Lovasz-Szegedy): Two graphons WW and WW' are equivalent (isomorphic in the graphon sense) iff t(F,W)=t(F,W)t(F, W) = t(F, W') for all graphs FF.

Graph parameters from homomorphism densities:

  • Triangle density: t(K3,W)=W(x,y)W(y,z)W(x,z)dxdydzt(K_3, W) = \int W(x,y)W(y,z)W(x,z) \, dx\, dy\, dz
  • Clustering coefficient: related to t(K3,W)/t(P2,W)3/2t(K_3, W) / t(P_2, W)^{3/2}

For ML: Substructure counting (homomorphism density estimation) is a key primitive for graph feature extraction. Ring GNNs and structural GNNs compute approximate homomorphism densities; this is one way to understand what graph structure GNNs learn.

8.4 Graphon Neural Networks

Definition (Graphon Neural Network, Keriven & Peyre, 2019): A graphon neural network is a sequence of functions fnf_n (on nn-node graphs) that converge to a limiting function fWf_W on graphons. Formally, fnf_n is a GNN architecture such that as GnWG_n \to W in cut metric, fn(Gn)fW(W)f_n(G_n) \to f_W(W).

Key result: GCN-style message passing with the propagation operator TWh(x)=01W(x,y)h(y)dyT_W h(x) = \int_0^1 W(x,y) h(y) \, dy defines a graphon neural network. The discrete GCN is a finite approximation.

Universality of graphon NNs: Maron et al. (2019) show that equivariant graph networks are universal approximators on graphons - any graphon property that is measurable can be approximated to arbitrary accuracy.

Limitation: Universality on graphons is density-dependent. For SPARSE graph sequences (edge density 0\to 0), graphons become trivial (the zero graphon), and a different limit theory (graphexes, local limits) is needed.

Forward reference: Graphon theory connects directly to functional analysis - the operator TWh(x)=W(x,y)h(y)dyT_W h(x) = \int W(x,y)h(y) \, dy is an integral operator on L2[0,1]L^2[0,1]. Spectral theory of compact operators (Hilbert-Schmidt theorem) governs its eigenvalue decomposition. -> Full treatment: Functional Analysis


Skill Check

Test this lesson

Answer 4 quick questions to lock in the lesson and feed your adaptive practice queue.

--
Score
0/4
Answered
Not attempted
Status
1

Which module does this lesson belong to?

2

Which section is covered in this lesson content?

3

Which term is most central to this lesson?

4

What is the best way to use this lesson for real learning?

Your answers save locally first, then sync when account storage is available.
Practice queue