Conductance and the Cheeger Bound
The barbell graph of Stationary Distributions and Mixing Time mixed slowly because half of the probability had to squeeze through one edge. Conductance turns that picture into a number: the smallest rate at which probability can flow out of a set, relative to the set's own weight. It gives a lower bound on the mixing time for every chain and, through a Cheeger-type inequality, an upper bound for reversible ones. This lesson defines it, states both bounds (proofs are in the references), and computes everything exactly for small graphs.
Definitions
Let be an irreducible chain on with stationary distribution . The ergodic flow from to is , the probability that the stationary chain steps from to ; for a set , . The conductance (or bottleneck ratio) of and of the chain are
is the probability that the stationary chain, conditioned on being in , leaves in the next step. For the lazy random walk on a -regular graph with vertices, is uniform and for neighbours, so
the number of edges leaving per unit of "volume" inside it, up to the factor from laziness. Graphs whose conductance stays bounded below by a constant as they grow are expanders.
The bounds
Lower bound (Levin, Peres and Wilmer, Theorem 7.4). For every chain,
Idea: start the chain from restricted to a bad set . Per step, at most a fraction of that mass leaves , so after fewer than about steps the chain still sits in with probability far above .
Upper bound (the Cheeger inequality for Markov chains; Jerrum and Sinclair, 1989; Lawler and Sokal, 1988). Let the chain be reversible () and lazy, and let be its spectral gap, where is the second largest eigenvalue of . Then
and the spectral gap controls mixing (Levin, Peres and Wilmer, Theorem 12.4): , with . Combining,
So, up to the square and a logarithmic factor, a chain mixes fast exactly when it has no bottleneck. The square cannot be removed in general: the cycle has and mixing time .
These statements are given here without proof. The lower bound is a short argument; the upper half of the Cheeger inequality (, the hard direction) is proved by a clever choice of test function in the variational characterisation of . Both are in chapters 7, 12 and 13 of Levin, Peres and Wilmer, and the graph version is a central topic of Spectral Graph Theory & Modern Graph Algorithms.
Computing everything for small graphs
The program takes the three 12-node graphs of the mixing-time lab, finds by trying all subsets, computes the spectral gap of the lazy walk with NumPy (the walk is reversible, so is symmetric and has the same eigenvalues), and compares the bounds with the exact mixing time from the worst start.
import numpy as np
from math import log
def lazy_walk(n, edges):
P = np.zeros((n, n))
deg = np.zeros(n)
for a, b in edges:
deg[a] += 1
deg[b] += 1
for a, b in edges:
P[a, b] += 1 / (2 * deg[a])
P[b, a] += 1 / (2 * deg[b])
P += np.eye(n) / 2
return P, deg / deg.sum()
def conductance(P, pi):
n = len(pi)
masks = np.arange(1, 2 ** n - 1)
S = (masks[:, None] >> np.arange(n)) & 1 # one row per subset, as 0/1 indicators
Q = pi[:, None] * P # ergodic flow Q(x, y)
flow = ((S @ Q) * (1 - S)).sum(axis=1) # Q(S, complement of S)
piS = S @ pi
phi = np.where(piS <= 0.5 + 1e-12, flow / piS, np.inf)
return phi.min(), list(np.flatnonzero(S[phi.argmin()]))
def tmix(P, pi):
dist = np.eye(len(pi)) # row x = distribution after t steps from x
for t in range(1, 2000):
dist = dist @ P
if (np.abs(dist - pi).sum(axis=1) / 2).max() <= 0.25:
return t
n = 12
graphs = {
"cycle": [(i, (i + 1) % n) for i in range(n)],
"barbell": [(a + s, b + s) for s in (0, 6) for a in range(6) for b in range(a + 1, 6)] + [(5, 6)],
"circulant": [(i, (i + j) % n) for i in range(n) for j in (1, 5)],
}
print("graph Phi_* gap Phi^2/2 <= gap <= 2 Phi 1/(4 Phi) t_mix (1/gap) ln(4/pi_min)")
for name, edges in graphs.items():
P, pi = lazy_walk(n, edges)
phi, S = conductance(P, pi)
d = np.sqrt(pi)
lam = np.sort(np.linalg.eigvalsh((d[:, None] * P) / d[None, :]))[::-1]
gap = 1 - lam[1]
ok = phi ** 2 / 2 <= gap <= 2 * phi
print(f"{name:9} {phi:6.4f} {gap:6.4f} {str(ok):>22} {1 / (4 * phi):9.1f} {tmix(P, pi):5} {log(4 / pi.min()) / gap:20.1f}")graph Phi_* gap Phi^2/2 <= gap <= 2 Phi 1/(4 Phi) t_mix (1/gap) ln(4/pi_min)
cycle 0.0833 0.0670 True 3.0 14 57.8
barbell 0.0161 0.0253 True 15.5 29 154.1
circulant 0.1667 0.2500 True 1.5 4 15.5
In every row the true mixing time lies between the two bounds. The lower bound is within a small factor for the barbell, whose problem is precisely its bottleneck; the upper bound is loose by the logarithmic factor and the square. For the cycle, while the gap is . At the two are still similar (0.083 against 0.067), but as grows the gap shrinks quadratically, and the square in the Cheeger inequality is what reconciles with mixing.
Conductance as the reason MCMC works or fails
The conductance view explains when sampling by a Markov chain is hopeless: if the state space has two large regions joined by a thin set of transitions, the chain stays stuck in one of them for a time of order , even though it eventually converges. This is what happens to local Markov chains for the Ising model below its critical temperature, or for sampling independent sets in bipartite graphs at high density, where "mostly left side" and "mostly right side" configurations are separated by a bottleneck. Proving rapid mixing (polynomial in the input size, while the state space is exponential) usually means proving a conductance or spectral-gap lower bound, by canonical paths (Jerrum and Sinclair, 1989, used it for counting perfect matchings approximately), by coupling, or by more recent spectral-independence methods.
The program makes the bottleneck visible for a family of "dumbbells": two cliques of size joined by one edge. Conductance falls like and the mixing time grows like .
def dumbbell_stats(k):
edges = [(a + s, b + s) for s in (0, k) for a in range(k) for b in range(a + 1, k)] + [(k - 1, k)]
m = len(edges)
phi = (1 / (4 * m)) / 0.5 # the bridge cut: flow 1/(4m), each side has weight 1/2
n = 2 * k
adj = [[] for _ in range(n)]
for a, b in edges:
adj[a].append(b)
adj[b].append(a)
pi = [len(x) / (2 * m) for x in adj]
dist, t = [1.0] + [0.0] * (n - 1), 0 # start in the first clique, away from the bridge
while sum(abs(p - q) for p, q in zip(dist, pi)) / 2 > 0.25:
new = [p / 2 for p in dist]
for u in range(n):
for v in adj[u]:
new[v] += dist[u] / (2 * len(adj[u]))
dist, t = new, t + 1
return phi, t
print(" k Phi of the bridge cut 1/(4 Phi) mixing time from node 0")
for k in [4, 6, 8, 12, 16]:
phi, t = dumbbell_stats(k)
print(f"{k:3} {phi:21.5f} {1 / (4 * phi):9.1f} {t:23}") k Phi of the bridge cut 1/(4 Phi) mixing time from node 0
4 0.03846 6.5 14
6 0.01613 15.5 29
8 0.00877 28.5 50
12 0.00376 66.5 108
16 0.00207 120.5 189
Test yourself
What does the conductance of a set measure?
- The number of states in
- The probability that the stationary chain, conditioned on being in , leaves in one step
- The spectral gap restricted to
- The diameter of
Which lower bound on the mixing time holds for every chain?
The Cheeger inequality for a lazy reversible chain relates the spectral gap and the conductance how?
Two cliques of size joined by one edge: how does the lazy walk's mixing time grow with ?
- Like
- Like
- Like , because the bridge's conductance is
- It stays constant