Higher-Order Cheeger and When Spectral Partitioning Fails
Cheeger's inequality explains the Fiedler vector: is small exactly when there is one sparse cut. k-way spectral clustering uses eigenvectors, and for a decade it worked in practice without a matching theorem. In 2012 Lee, Oveis Gharan and Trevisan proved one: is small exactly when the graph has disjoint sparse sets. This lesson states that theorem and its relatives, proves the easy side, and then turns to the other half of the story: graphs on which spectral partitioning provably returns bad answers.
-way expansion
Throughout this lesson, as in the paper of Lee, Oveis Gharan and Trevisan, the conductance of a single set is (no minimum: the sets of interest are the small side). The -way expansion is
(take a set and its complement; conversely, of two disjoint sets the one with smaller volume has at most half the total), and exactly when has at least connected components, just as exactly then.
Theorem (higher-order Cheeger inequality; Lee, Oveis Gharan and Trevisan, 2012; journal version 2014). For every graph and every , with the -th smallest eigenvalue of the normalized Laplacian,
Moreover , and for graphs excluding a fixed minor (planar graphs, for instance) the factor improves to . The proof of the hard side is constructive: embed the vertices with the bottom eigenvectors (as in spectral clustering), partition the embedding by random geometric partitioning into pieces whose "mass" is spread out, then run a Cheeger-style sweep inside each piece. Independently, Louis, Raghavendra, Tetali and Vempala (2012) proved closely related bounds that lose only a factor when one asks for somewhat fewer than sparse sets.
Proof of the easy side. Let be disjoint with for all . The vectors have disjoint supports, so they span a -dimensional space. For , an edge inside some contributes nothing to ; an edge between and contributes , and an edge from to the rest contributes . So , while . The ratio is at most , and Courant-Fischer over this -dimensional space gives .
Improved Cheeger (Kwok, Lau, Lee, Oveis Gharan and Trevisan, 2013). For every , , and the plain sweep cut of the Fiedler vector achieves it. When some higher eigenvalue is large (the graph has no sparse pieces), the square-root loss of Cheeger's inequality disappears: the sweep is within a factor of . This explains why the sweep often does far better than in practice.
The program plants three communities and computes and the conductances of the planted sets, checking for (with the first two or all three communities) and showing the jump at .
import random
import numpy as np
r = random.Random(12)
sizes = [20, 20, 20]
truth = np.repeat(np.arange(3), sizes)
n = len(truth)
W = np.zeros((n, n))
for u in range(n):
for v in range(u + 1, n):
if r.random() < (0.4 if truth[u] == truth[v] else 0.02):
W[u, v] = W[v, u] = 1
d = W.sum(axis=1)
s = 1 / np.sqrt(d)
nu = np.linalg.eigvalsh(np.eye(n) - s[:, None] * W * s[None, :])
print("nu_1 .. nu_5:", np.round(nu[:5], 4) + 0.0)
def phi(mask):
return float(W[mask][:, ~mask].sum() / d[mask].sum())
parts = [truth == j for j in range(3)]
for k in (2, 3):
worst = max(phi(p) for p in parts[:k])
print(f"k = {k}: nu_k / 2 = {nu[k - 1] / 2:.4f} <= max phi(S_i) = {worst:.4f}")
print(f"k = 4: nu_4 / 2 = {nu[3] / 2:.4f}, so any 4 disjoint sets include one with phi >= {nu[3] / 2:.4f}")nu_1 .. nu_5: [0. 0.0808 0.1082 0.5279 0.5589]
k = 2: nu_k / 2 = 0.0404 <= max phi(S_i) = 0.0843
k = 3: nu_k / 2 = 0.0541 <= max phi(S_i) = 0.0843
k = 4: nu_4 / 2 = 0.2640, so any 4 disjoint sets include one with phi >= 0.2640
Three small eigenvalues, then a jump: by the easy side, every family of 4 disjoint sets has a member with conductance at least , so there is no fourth community to find.
Failure 1: spectral bisection on the "cockroach"
Spectral bisection splits the vertices at the median of the Fiedler vector, forcing two equal halves. Guattery and Miller (1998) built graphs on which it is far from optimal. The "cockroach" with parameter has two paths of vertices, top and bottom , and rungs only for : two long antennae attached to a ladder. Cutting the two path edges between positions and separates the antennae from the ladder with 2 edges, a perfect bisection. The Fiedler vector instead is antisymmetric between top and bottom, and its median split cuts all rungs.
import numpy as np
def cockroach(k):
n = 4 * k # top path 0..2k-1, bottom path 2k..4k-1
edges = [(i, i + 1) for i in range(2 * k - 1)] + [(2 * k + i, 2 * k + i + 1) for i in range(2 * k - 1)]
edges += [(i, 2 * k + i) for i in range(k, 2 * k)] # rungs on the second half only
return n, edges
print(" k n lambda_2 spectral bisection cut best bisection cut")
for k in [5, 10, 20]:
n, edges = cockroach(k)
L = np.zeros((n, n))
for u, v in edges:
L[u, u] += 1; L[v, v] += 1; L[u, v] -= 1; L[v, u] -= 1
vals, vecs = np.linalg.eigh(L)
half = set(np.argsort(vecs[:, 1], kind="stable")[: n // 2].tolist()) # median split
cut = sum((u in half) != (v in half) for u, v in edges)
antennae = set(range(k)) | set(range(2 * k, 3 * k))
best = sum((u in antennae) != (v in antennae) for u, v in edges)
print(f"{k:3} {n:3} {float(vals[1]):.5f} {cut:22} {best:18}") k n lambda_2 spectral bisection cut best bisection cut
5 20 0.07128 5 2
10 40 0.02086 10 2
20 80 0.00566 20 2
The spectral cut grows linearly with while the optimum stays at 2. Note what this does and does not contradict: Cheeger's inequality is about conductance with free set sizes, and the median constraint is extra. Guattery and Miller showed families on which every bisection rule based on the Fiedler vector fails, but on bounded-degree planar graphs spectral bisection is provably good: Spielman and Teng (1996) proved there, so a sweep finds cuts of ratio , and applying it recursively yields bisections of size , matching the Lipton-Tarjan planar separator theorem.
Failure 2: whiskers and localized eigenvectors
Real networks often have small sets hanging off a large well-connected core by a single edge ("whiskers"). Such a set has tiny conductance, and the bottom eigenvectors localize on it. Spectral methods then dutifully return the whisker: correct for the objective, useless as a community. Leskovec, Lang, Dasgupta and Mahoney (2009) found that in large social and information networks the lowest-conductance sets are almost always such small whiskers, while larger sets have markedly worse conductance.
The program attaches a path of 6 vertices to a graph with two planted communities of 30.
import random
import numpy as np
r = random.Random(9)
n0 = 60
edges = [(u, v) for u in range(n0) for v in range(u + 1, n0)
if r.random() < (0.3 if (u < 30) == (v < 30) else 0.03)]
edges += [(n0 - 1 + i, n0 + i) for i in range(6)] # a whisker: path 59-60-...-65
n = n0 + 6
A = np.zeros((n, n))
for u, v in edges:
A[u, v] = A[v, u] = 1
d = A.sum(axis=1)
s = 1 / np.sqrt(d)
vals, vecs = np.linalg.eigh(np.eye(n) - s[:, None] * A * s[None, :])
print("nu_2, nu_3, nu_4:", np.round(vals[1:4], 4) + 0.0)
for j in (1, 2):
x = vecs[:, j] * s
weight_on_whisker = float((d[n0:] * x[n0:] ** 2).sum() / (d * x ** 2).sum())
print(f"eigenvector {j + 1}: share of its D-weighted mass on the 6 whisker vertices = {weight_on_whisker:.3f}")
cut_c = sum((u < 30) != (v < 30) for u, v in edges if u < n0 and v < n0)
vol_c = min(d[:30].sum(), d[30:].sum())
print(f"phi(whisker) = {1 / d[n0:].sum():.4f}, phi(planted community) = {cut_c / vol_c:.4f}")nu_2, nu_3, nu_4: [0.0324 0.1849 0.2755]
eigenvector 2: share of its D-weighted mass on the 6 whisker vertices = 0.979
eigenvector 3: share of its D-weighted mass on the 6 whisker vertices = 0.038
phi(whisker) = 0.0909, phi(planted community) = 0.1241
The whisker has the lower conductance, so the Fiedler vector concentrates on it; the community structure only appears in the next eigenvector. Practical spectral clustering therefore removes low-degree "dangling" pieces first, regularizes the graph (adding a small constant to every entry of ; Amini, Chen, Bickel and Levina, 2013), or uses several eigenvectors and inspects them.
Failure 3: no clusters at all
The algorithm always outputs a partition, even when there is nothing to find. A path or a grid has a small and a Fiedler vector that cleanly splits it in the middle, but no "community" exists; a random regular graph has a large , and the sweep returns a set of conductance near , which is the honest answer "no sparse cut". The eigenvalues themselves are the diagnostic: look at and the gap after before believing clusters.
Test yourself
What does the higher-order Cheeger inequality relate?
- and the diameter
- and , the best possible maximum conductance of disjoint sets:
- and bipartiteness
- of the adjacency matrix and the chromatic number
How is the easy side proved?
- By a sweep cut
- By Courant-Fischer on the -dimensional span of the indicator vectors of disjoint sparse sets
- By the expander mixing lemma
- By Markov's inequality
On the Guattery-Miller cockroach graph, what goes wrong with spectral bisection?
- The Fiedler vector is not defined
- The median split of the Fiedler vector cuts about rungs although a bisection with 2 edges exists
- It finds the optimum but slowly
- It produces unbalanced parts
Why can the Fiedler vector of a real network be uninformative about communities?
- Real networks are bipartite
- Small whiskers attached by one edge have lower conductance than any community, so the low eigenvectors localize on them
- Eigenvectors cannot be computed for large graphs
- Real networks have no edges between communities