Part 1Math for LLMs

Spectral Graph Theory: Part 1 - Intuition To 6 Graph Fourier Transform And Signal Processing

Graph Theory / Spectral Graph Theory

Private notes
0/8000

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

Part 1
29 min read18 headingsSplit lesson page

Lesson overview | Lesson overview | Next part

Spectral Graph Theory: Part 1: Intuition to 6. Graph Fourier Transform and Signal Processing

1. Intuition

1.1 Hearing the Shape of a Graph

In 1966, mathematician Mark Kac posed the question: "Can you hear the shape of a drum?" - meaning, can you reconstruct the geometry of a vibrating membrane from the frequencies it produces? The question turned out to have a negative answer in general, but it crystallized one of the deepest ideas in mathematics: the spectrum of a differential operator encodes geometric information.

Spectral graph theory asks the same question for discrete structures. A graph G=(V,E)G = (V, E) has an associated matrix - the Laplacian LL - whose eigenvalues form the graph spectrum. These numbers are not arbitrary: they encode whether the graph is connected, how tightly its communities are glued together, how quickly a random walk mixes across its edges, how hard it is to cut the graph in two.

Think of a social network. Each person is a node; each friendship is an edge. The graph has "natural frequencies": a society with two isolated groups (a disconnected graph) has a different spectrum from one that is fully interconnected. The small eigenvalues of LL correspond to smooth, slowly-varying signals - the overall community membership function. The large eigenvalues correspond to rapidly-oscillating signals - the microscopic variation from person to person. This is the graph analogue of low and high frequencies in audio.

Three statements, each surprising when first encountered, that spectral graph theory makes precise:

  1. The number of connected components of GG equals the number of times 00 appears as an eigenvalue of LL.
  2. The second-smallest eigenvalue λ2(L)\lambda_2(L) - the "Fiedler value" - tells you how hard it is to disconnect the graph. A graph is harder to cut when λ2\lambda_2 is larger.
  3. The eigenvector corresponding to λ2\lambda_2 - the "Fiedler vector" - assigns a real number to each vertex, and the sign of this number tells you which side of the best bisection each vertex belongs to.

These are not vague analogies. They are theorems with proofs, and they form the backbone of a theory that has become indispensable in machine learning.

1.2 The Three Graph Matrices

For a graph G=(V,E)G = (V, E) with n=Vn = |V| vertices and m=Em = |E| edges, three matrices appear constantly:

Adjacency matrix ARn×nA \in \mathbb{R}^{n \times n}:

Aij={1if (i,j)E0otherwiseA_{ij} = \begin{cases} 1 & \text{if } (i,j) \in E \\ 0 & \text{otherwise} \end{cases}

For undirected graphs, AA is symmetric. For weighted graphs, Aij=wijA_{ij} = w_{ij}, the edge weight. The adjacency matrix encodes the direct connections in the graph.

Degree matrix DRn×nD \in \mathbb{R}^{n \times n}: a diagonal matrix with Dii=di=jAijD_{ii} = d_i = \sum_j A_{ij}, the degree of vertex ii. For weighted graphs, di=jwijd_i = \sum_j w_{ij} is the weighted degree (also called strength).

Graph Laplacian L=DAL = D - A: the central object of spectral graph theory. Explicitly:

Lij={diif i=j1if (i,j)E0otherwiseL_{ij} = \begin{cases} d_i & \text{if } i = j \\ -1 & \text{if } (i,j) \in E \\ 0 & \text{otherwise} \end{cases}

The Laplacian is named after Pierre-Simon Laplace because it is the discrete analogue of the continuous Laplace operator Δ=i2/xi2\Delta = \sum_i \partial^2/\partial x_i^2. For a function f:VRf: V \to \mathbb{R} defined on the vertices:

(Lf)i=j:(i,j)E(f(i)f(j))=dif(i)j:(i,j)Ef(j)(Lf)_i = \sum_{j: (i,j) \in E} (f(i) - f(j)) = d_i f(i) - \sum_{j: (i,j) \in E} f(j)

This is the "discrete second derivative" - it measures how much the value at vertex ii differs from the average value among its neighbors.

For AI: In a Graph Neural Network, the operation A~H\tilde{A} \mathbf{H} (multiplying node features by the adjacency matrix with self-loops) is equivalent to computing (D~L~)H(\tilde{D} - \tilde{L})\mathbf{H}. The Laplacian is implicitly present in every GNN layer.

1.3 Why Eigenvalues Reveal Structure

The Laplacian LL is a real symmetric positive semidefinite matrix. By the spectral theorem (03-Advanced-Linear-Algebra), it has a complete orthonormal basis of eigenvectors u1,u2,,un\mathbf{u}_1, \mathbf{u}_2, \ldots, \mathbf{u}_n with real non-negative eigenvalues:

0=λ1λ2λn0 = \lambda_1 \leq \lambda_2 \leq \cdots \leq \lambda_n

Why is λ1=0\lambda_1 = 0 always? Because L1=0L \mathbf{1} = \mathbf{0} - the all-ones vector is always in the null space of LL (every row of LL sums to zero). The constant function "assign the same value to every vertex" has zero variation across every edge, so it has zero energy.

The deeper result: λ1=λ2==λk=0\lambda_1 = \lambda_2 = \cdots = \lambda_k = 0 if and only if the graph has exactly kk connected components. On a disconnected graph with kk components, the eigenvectors for eigenvalue 00 are the indicator vectors of each component.

The first nonzero eigenvalue λ2\lambda_2 - if it exists - is called the algebraic connectivity or Fiedler value (after Miroslav Fiedler, who proved its key properties in 1973). A larger λ2\lambda_2 means the graph is harder to disconnect; a λ2\lambda_2 close to zero means there is almost a disconnection - a bottleneck.

The largest eigenvalue λn\lambda_n gives the spectral radius of the Laplacian and satisfies λn2dmax\lambda_n \leq 2 d_{\max}.

1.4 Historical Timeline

SPECTRAL GRAPH THEORY - HISTORICAL TIMELINE
========================================================================

  1847  Kirchhoff     - Matrix-Tree theorem; Laplacian for electrical circuits
  1931  Whitney       - Graph isomorphism; chromatic polynomials
  1954  Collatz &     - Systematic study of graph spectra begins
        Sinogowitz
  1973  Fiedler       - Algebraic connectivity; Fiedler vector; graph bisection
  1981  Cheeger       - Cheeger inequality (originally for manifolds)
  1988  Alon & Milman - Discrete Cheeger inequality for graphs
  1996  Belkin &      - Laplacian eigenmaps for manifold learning (pub. 2001)
        Niyogi
  2000  Shi & Malik   - Normalized Cuts and image segmentation
  2002  Ng, Jordan,   - Spectral clustering algorithm (the standard version)
        Weiss
  2004  Spielman &    - Spectral sparsification; fast Laplacian solvers
        Teng
  2011  Hammond et al - Wavelets on graphs
  2014  Bruna et al   - Spectral graph CNNs (first spectral GNN)
  2016  Defferrard    - ChebNet: Chebyshev polynomial filters on graphs
        et al
  2017  Kipf &        - GCN: first-order Chebyshev -> simple spatial rule
        Welling
  2022  Dwivedi et al - Laplacian positional encodings for graph Transformers
  2022  Rampasek et   - GPS: General, Powerful, Scalable graph Transformer
        al                with spectral PE

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

1.5 Roadmap of the Section

This section follows a deliberate progression from foundational algebra to modern AI applications:

SECTION ROADMAP
========================================================================

  2 Graph Matrices          Build the algebraic objects
         down
  3 Quadratic Form / PSD    Prove fundamental spectral properties
         down
  4 Fiedler Vector          Connect \lambda_2 to graph connectivity
         down
  5 Cheeger Inequality      Connect \lambda_2 to cut structure and mixing
         down
  6 Graph Fourier Transform  Signal processing on graphs
         down
  7 Spectral Filtering      From Fourier to polynomial approximations
         down
  8 Spectral Clustering     Partition graphs via eigenvectors
         down
  9 Laplacian Eigenmaps     Embed graphs; PE for transformers
         down
  10 Directed Graphs        PageRank; complex eigenvalues
         down
  11 Advanced Topics        Sparsification; wavelets; random matrices
         down
  12 ML Applications        KGs, molecules, LLM attention analysis

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

2. Graph Matrices and Their Spectra

2.1 Adjacency Matrix: Spectral View

Definition. For G=(V,E)G = (V, E) with nn vertices, the adjacency matrix ARn×nA \in \mathbb{R}^{n \times n} is defined by Aij=wijA_{ij} = w_{ij} if (i,j)E(i,j) \in E and Aij=0A_{ij} = 0 otherwise (with wij=1w_{ij} = 1 for unweighted graphs).

Key spectral property: Walk counting. The (i,j)(i,j) entry of AkA^k counts the number of walks of length exactly kk from vertex ii to vertex jj. This follows by induction: (Ak)ij=(Ak1)iAj(A^k)_{ij} = \sum_\ell (A^{k-1})_{i\ell} A_{\ell j} sums over all ways to reach jj in kk steps by first taking k1k-1 steps to reach \ell, then one step to jj.

For AI: This walk-counting property is the spectral justification for why a kk-layer GNN can "see" information from the kk-hop neighborhood. The matrix AkA^k is what a linear GNN with kk layers computes.

Eigenvalues of AA. For an undirected graph, AA is symmetric, so all eigenvalues are real. Let μ1μ2μn\mu_1 \geq \mu_2 \geq \cdots \geq \mu_n denote the eigenvalues of AA in decreasing order. Key bounds:

  • For any graph: μidmax|\mu_i| \leq d_{\max} (the maximum degree), since A2=μ1dmax\lVert A \rVert_2 = \mu_1 \leq d_{\max}.
  • For a dd-regular graph: μ1=d\mu_1 = d with eigenvector 1/n\mathbf{1}/\sqrt{n}.
  • Bipartite graphs have symmetric spectra: μi=μn+1i\mu_i = -\mu_{n+1-i}.
  • The number of distinct eigenvalues is at least diam(G)+1\text{diam}(G) + 1 (where diam\text{diam} is graph diameter).

Non-examples of symmetry: For a directed graph, AA is not symmetric and eigenvalues may be complex. This is why directed spectral theory (10) requires separate treatment.

2.2 Degree Matrix and Volume

The degree matrix D=diag(d1,d2,,dn)D = \operatorname{diag}(d_1, d_2, \ldots, d_n) is diagonal with Dii=di=jAijD_{ii} = d_i = \sum_j A_{ij}.

Volume. For a subset SVS \subseteq V, the volume is vol(S)=iSdi\operatorname{vol}(S) = \sum_{i \in S} d_i. For the full graph, vol(V)=2m\operatorname{vol}(V) = 2m (each edge contributes 2 to the total degree sum). Volume plays the role of "mass" in the normalized Laplacian theory.

For a dd-regular graph, D=dInD = d \cdot I_n and vol(S)=dS\operatorname{vol}(S) = d |S|, making the theory particularly clean. Most derivations proceed with general DD but reduce to simpler formulas in the regular case.

Random walk transition matrix. The matrix P=D1AP = D^{-1} A is a row-stochastic matrix: jPij=1\sum_j P_{ij} = 1 for all ii. It defines a random walk on the graph: from vertex ii, move to neighbor jj with probability Aij/diA_{ij}/d_i. The stationary distribution of this walk is π\boldsymbol{\pi} with πi=di/vol(V)\pi_i = d_i / \operatorname{vol}(V) - proportional to degree. This connection between DD, AA, and random walks is central to the normalized Laplacian theory.

2.3 Unnormalized Laplacian L = D - A

Definition. L=DAL = D - A. Entry-by-entry:

Lij={dii=jwij(i,j)E0otherwiseL_{ij} = \begin{cases} d_i & i = j \\ -w_{ij} & (i,j) \in E \\ 0 & \text{otherwise} \end{cases}

Every row (and column) sums to zero: jLij=dij:(i,j)E1=0\sum_j L_{ij} = d_i - \sum_{j:(i,j)\in E} 1 = 0. Equivalently, L1=0L \mathbf{1} = \mathbf{0}.

The fundamental quadratic form:

xLx=(i,j)Ewij(xixj)2for all xRn\mathbf{x}^\top L \mathbf{x} = \sum_{(i,j) \in E} w_{ij}(x_i - x_j)^2 \quad \text{for all } \mathbf{x} \in \mathbb{R}^n

Proof:

xLx=xDxxAx\mathbf{x}^\top L \mathbf{x} = \mathbf{x}^\top D \mathbf{x} - \mathbf{x}^\top A \mathbf{x} =idixi2(i,j)E2wijxixj= \sum_i d_i x_i^2 - \sum_{(i,j)\in E} 2 w_{ij} x_i x_j =(i,j)Ewij(xi2+xj2)2(i,j)Ewijxixj=(i,j)Ewij(xixj)20= \sum_{(i,j)\in E} w_{ij}(x_i^2 + x_j^2) - 2\sum_{(i,j)\in E} w_{ij} x_i x_j = \sum_{(i,j)\in E} w_{ij}(x_i - x_j)^2 \geq 0

Since wij>0w_{ij} > 0, this is always non-negative: L0L \succeq 0.

Geometric meaning: xLx\mathbf{x}^\top L \mathbf{x} measures the total variation of the signal x:VR\mathbf{x}: V \to \mathbb{R} across all edges. It is zero if and only if xi=xjx_i = x_j for all edges (i,j)(i,j) - i.e., x\mathbf{x} is constant on each connected component.

For AI: Graph regularization in semi-supervised learning minimizes fLf\mathbf{f}^\top L \mathbf{f} subject to labeling constraints. This penalizes label functions that change rapidly across edges - a smoothness prior that says "connected nodes likely have the same label."

2.4 Normalized Laplacians

Two normalized variants of the Laplacian are used in practice:

Symmetric normalized Laplacian:

Lsym=D1/2LD1/2=ID1/2AD1/2L_{\text{sym}} = D^{-1/2} L D^{-1/2} = I - D^{-1/2} A D^{-1/2}

with entries:

(Lsym)ij={1i=jwij/didj(i,j)E0otherwise\left(L_{\text{sym}}\right)_{ij} = \begin{cases} 1 & i = j \\ -w_{ij}/\sqrt{d_i d_j} & (i,j) \in E \\ 0 & \text{otherwise} \end{cases}

Properties: Symmetric; eigenvalues in [0,2][0, 2]; λk(Lsym)=1\lambda_k(L_{\text{sym}}) = 1 for all kk iff the graph is bipartite (eigenvalues symmetric around 1); u~k=D1/2uk\tilde{\mathbf{u}}_k = D^{1/2} \mathbf{u}_k where uk\mathbf{u}_k are eigenvectors of LrwL_{\text{rw}}.

Random-walk normalized Laplacian:

Lrw=D1L=ID1A=IPL_{\text{rw}} = D^{-1} L = I - D^{-1} A = I - P

with P=D1AP = D^{-1}A the random walk transition matrix. Properties: Not symmetric, but has the same eigenvalues as LsymL_{\text{sym}} (they are similar matrices). Eigenvalues in [0,2][0, 2]. The eigenvectors of LrwL_{\text{rw}} for eigenvalue 00 are the constant vectors on each component.

When to use which:

LaplacianUse caseWhy
L=DAL = D - AGraphs with uniform degree; theoretical proofsSimplest form
LsymL_{\text{sym}}Spectral clustering (Ng et al.); GCN normalizationSymmetric -> orthogonal eigenvectors
LrwL_{\text{rw}}Random walk analysis; Shi-Malik NCutDirect connection to PP

For AI (GCN connection): The GCN propagation rule A^=D~1/2A~D~1/2\hat{A} = \tilde{D}^{-1/2}\tilde{A}\tilde{D}^{-1/2} uses the symmetric normalized adjacency of the graph with self-loops - equivalently, ILsymI - L_{\text{sym}} of the augmented graph.

2.5 Spectra of Special Graphs

Closed-form eigenvalues for key graph families provide calibration and test cases:

Complete graph KnK_n: A=11IA = \mathbf{1}\mathbf{1}^\top - I. Eigenvalues of AA: n1n-1 (once) and 1-1 (n1n-1 times). Eigenvalues of LL: 00 (once) and nn (n1n-1 times). The graph is maximally connected: λ2(L)=n\lambda_2(L) = n.

Path graph PnP_n: Vertices {1,,n}\{1, \ldots, n\}, edges {(i,i+1)}\{(i, i+1)\}. Eigenvalues of LL:

λk=22cos ⁣((k1)πn),k=1,2,,n\lambda_k = 2 - 2\cos\!\left(\frac{(k-1)\pi}{n}\right), \quad k = 1, 2, \ldots, n

So λ1=0\lambda_1 = 0, λ2=22cos(π/n)π2/n2\lambda_2 = 2 - 2\cos(\pi/n) \approx \pi^2/n^2 for large nn - very small. This reflects the intuition that a long path is easy to cut (just remove the middle edge).

Cycle graph CnC_n: Eigenvalues of LL:

λk=22cos ⁣(2π(k1)n),k=1,2,,n\lambda_k = 2 - 2\cos\!\left(\frac{2\pi(k-1)}{n}\right), \quad k = 1, 2, \ldots, n

The spectrum is symmetric around λ=2\lambda = 2. λ2=22cos(2π/n)4π2/n2\lambda_2 = 2 - 2\cos(2\pi/n) \approx 4\pi^2/n^2 for large nn.

Star graph SnS_n: One hub connected to n1n-1 leaves. Eigenvalues of LL: 00 (once), 11 (n2n-2 times), nn (once). λ2=1\lambda_2 = 1 regardless of how many leaves there are - the star is easy to disconnect (remove the hub).

dd-regular bipartite graph Kn/2,n/2K_{n/2, n/2}: Eigenvalues of LL: 0,d,d,,d,2d0, d, d, \ldots, d, 2d with the pattern dictated by the bipartite structure; eigenvalue 2d2d indicates bipartiteness.

2.6 Characteristic Polynomial and Cospectral Graphs

The characteristic polynomial of a graph GG is pG(λ)=det(λIA)p_G(\lambda) = \det(\lambda I - A). The roots are the eigenvalues of AA. The coefficients of pGp_G are spectral invariants: the sum of eigenvalues equals tr(A)=0\operatorname{tr}(A) = 0 (no self-loops); the sum of squares of eigenvalues equals tr(A2)=2m\operatorname{tr}(A^2) = 2m.

Cospectral (isospectral) graphs are graphs with identical characteristic polynomials but non-isomorphic structures. The simplest pair: two graphs on 6 vertices found by Schwenk (1973). Cospectrality shows that the spectrum does not uniquely determine a graph - a fundamental limitation of spectral methods. For graph isomorphism testing, the Weisfeiler-Lehman test (05) captures structure that the spectrum misses.

For AI: The WL-expressiveness hierarchy of GNNs (Xu et al., 2019) parallels this cospectrality result. GNNs based on spectral convolution can distinguish everything the Laplacian spectrum distinguishes - but no more. This is one motivation for higher-order GNNs and attention-based methods.


3. The Fundamental Quadratic Form and PSD Structure

3.1 Dirichlet Energy

The quadratic form xLx=(i,j)E(xixj)2\mathbf{x}^\top L \mathbf{x} = \sum_{(i,j)\in E}(x_i - x_j)^2 is called the Dirichlet energy (or graph Dirichlet form) of the signal x:VR\mathbf{x}: V \to \mathbb{R}.

This name comes from the continuous analogue: for a function f:ΩRf: \Omega \to \mathbb{R} on a domain ΩRd\Omega \subset \mathbb{R}^d, the Dirichlet energy is Ωf2dx\int_\Omega \lVert \nabla f \rVert^2 \, d\mathbf{x}, which measures the total variation (smoothness) of ff. The graph Laplacian LL is the discrete analogue of Δ-\Delta (the negative Laplacian), and xLx\mathbf{x}^\top L \mathbf{x} is the discrete Dirichlet energy.

Interpretations by context:

ContextWhat xLx\mathbf{x}^\top L \mathbf{x} measures
Social networkTotal disagreement when xi{1,+1}x_i \in \{-1, +1\} labels communities
Signal on graphTotal variation (roughness) of the signal across edges
Temperature fieldTotal heat flux across edges at steady state
Node embeddings"Embedding strain" - how much nearby nodes differ
Semi-supervised labelsPenalty for assigning different labels to connected nodes

Critical point of Dirichlet energy. The Rayleigh quotient R(x)=xLx/x2R(\mathbf{x}) = \mathbf{x}^\top L \mathbf{x} / \lVert \mathbf{x} \rVert^2 is minimized by the eigenvector with smallest eigenvalue. Constrained to x1\mathbf{x} \perp \mathbf{1} (orthogonal to the trivial null vector), the minimum is achieved by u2\mathbf{u}_2, the Fiedler vector.

3.2 Proof That L \succeq 0

Theorem. For any undirected weighted graph with non-negative edge weights, L0L \succeq 0.

Proof. For any xRn\mathbf{x} \in \mathbb{R}^n:

xLx=(i,j)Ewij(xixj)20\mathbf{x}^\top L \mathbf{x} = \sum_{(i,j) \in E} w_{ij}(x_i - x_j)^2 \geq 0

since wij0w_{ij} \geq 0 and (xixj)20(x_i - x_j)^2 \geq 0 for all real numbers. \square

Corollary. All eigenvalues of LL are non-negative: 0λ1λ2λn0 \leq \lambda_1 \leq \lambda_2 \leq \cdots \leq \lambda_n.

Corollary. 1\mathbf{1} is always an eigenvector with λ1=0\lambda_1 = 0, since L1=(DA)1=dA1=0L\mathbf{1} = (D - A)\mathbf{1} = \mathbf{d} - A\mathbf{1} = \mathbf{0} (where d\mathbf{d} is the degree vector, equal to A1A\mathbf{1}).

Strengthened result for normalized Laplacians. For LsymL_{\text{sym}}: since Lsym=D1/2LD1/2L_{\text{sym}} = D^{-1/2}LD^{-1/2} and L0L \succeq 0, we have Lsym0L_{\text{sym}} \succeq 0. Moreover, xLsymx2x2\mathbf{x}^\top L_{\text{sym}} \mathbf{x} \leq 2\lVert \mathbf{x} \rVert^2 for all x\mathbf{x}, so λk(Lsym)[0,2]\lambda_k(L_{\text{sym}}) \in [0, 2].

3.3 Connected Components via the Null Space

Theorem (Fiedler, 1973). The multiplicity of eigenvalue 00 of the graph Laplacian LL equals the number of connected components of GG.

Proof.

()(\Rightarrow) Suppose GG has kk connected components C1,C2,,CkC_1, C_2, \ldots, C_k. For each component CC_\ell, define vRn\mathbf{v}^\ell \in \mathbb{R}^n as the indicator vector of CC_\ell: vi=1v^\ell_i = 1 if iCi \in C_\ell, else 00. Then Lv=0L\mathbf{v}^\ell = \mathbf{0} because for any vertex iCi \in C_\ell:

(Lv)i=divij:(i,j)Evj=didi=0(L\mathbf{v}^\ell)_i = d_i v^\ell_i - \sum_{j:(i,j)\in E} v^\ell_j = d_i - d_i = 0

(all neighbors of ii are also in CC_\ell since components are isolated). The kk vectors v1,,vk\mathbf{v}^1, \ldots, \mathbf{v}^k are linearly independent, so dim(kerL)k\dim(\ker L) \geq k.

()(\Leftarrow) Suppose Lx=0L\mathbf{x} = \mathbf{0}. Then 0=xLx=(i,j)E(xixj)20 = \mathbf{x}^\top L \mathbf{x} = \sum_{(i,j)\in E}(x_i - x_j)^2, which forces xi=xjx_i = x_j for every edge (i,j)(i,j). Thus x\mathbf{x} is constant on each connected component. The dimension of the space of such functions equals the number of components. So dim(kerL)k\dim(\ker L) \leq k.

Combining both directions, dim(kerL)=k\dim(\ker L) = k. \square

Examples:

  • Fully connected graph (k=1k=1): λ1=0\lambda_1 = 0 is simple; λ2>0\lambda_2 > 0.
  • Graph with 2 isolated components: λ1=λ2=0\lambda_1 = \lambda_2 = 0; λ3>0\lambda_3 > 0.
  • Path PnP_n: always connected; λ2=22cos(π/n)>0\lambda_2 = 2 - 2\cos(\pi/n) > 0.

Non-example: For a disconnected graph with components of different sizes, the eigenvectors for λ=0\lambda = 0 are NOT all-ones vectors but rather indicator vectors of the components.

3.4 Eigenvalue Bounds and Interlacing

Upper bound. For any connected graph:

λn(L)2dmax\lambda_n(L) \leq 2 d_{\max}

where dmaxd_{\max} is the maximum degree. For dd-regular graphs: λn(L)=2d\lambda_n(L) = 2d iff the graph is bipartite.

Lower bound on λ2\lambda_2. From the Cheeger inequality (full treatment in 5):

λ2h(G)22\lambda_2 \geq \frac{h(G)^2}{2}

where h(G)h(G) is the Cheeger constant.

Interlacing theorem. Let HH be an induced subgraph of GG on m<nm < n vertices, with Laplacian eigenvalues 0=μ1μ2μm0 = \mu_1 \leq \mu_2 \leq \cdots \leq \mu_m. Then:

λi(LG)λi(LH)λnm+i(LG)for i=1,,m\lambda_i(L_G) \leq \lambda_i(L_H) \leq \lambda_{n-m+i}(L_G) \quad \text{for } i = 1, \ldots, m

Interlacing means that removing vertices from a graph cannot increase λ2\lambda_2 by more than the increase in λn\lambda_n. This is used in structural arguments about graph connectivity after vertex removal.

3.5 Courant-Fischer Minimax Theorem

The Courant-Fischer theorem provides a variational characterization of every eigenvalue of a symmetric matrix. For the graph Laplacian LL with eigenvalues 0=λ1λ2λn0 = \lambda_1 \leq \lambda_2 \leq \cdots \leq \lambda_n:

λk=minSRndim(S)=kmaxxSx0xLxx2\lambda_k = \min_{\substack{S \leq \mathbb{R}^n \\ \dim(S) = k}} \max_{\substack{\mathbf{x} \in S \\ \mathbf{x} \neq \mathbf{0}}} \frac{\mathbf{x}^\top L \mathbf{x}}{\lVert \mathbf{x} \rVert^2}

In particular, the Fiedler value has the characterization:

λ2=minx1,x0xLxx2=minx1,x=1(i,j)E(xixj)2\lambda_2 = \min_{\mathbf{x} \perp \mathbf{1},\, \mathbf{x} \neq \mathbf{0}} \frac{\mathbf{x}^\top L \mathbf{x}}{\lVert \mathbf{x} \rVert^2} = \min_{\mathbf{x} \perp \mathbf{1},\, \lVert \mathbf{x} \rVert = 1} \sum_{(i,j)\in E}(x_i - x_j)^2

Proof sketch. Write x=kckuk\mathbf{x} = \sum_k c_k \mathbf{u}_k in the eigenbasis. Then xLx=kλkck2\mathbf{x}^\top L \mathbf{x} = \sum_k \lambda_k c_k^2 and x2=kck2\lVert \mathbf{x} \rVert^2 = \sum_k c_k^2. The Rayleigh quotient is kλkck2/kck2\sum_k \lambda_k c_k^2 / \sum_k c_k^2, a convex combination of eigenvalues. Minimizing over xu1=1/n\mathbf{x} \perp \mathbf{u}_1 = \mathbf{1}/\sqrt{n} forces c1=0c_1 = 0, making the minimum λ2\lambda_2 (achieved when c2=1c_2 = 1, all others 00).

Practical use. Courant-Fischer justifies using u2\mathbf{u}_2 as the optimal graph bisection vector: it solves the continuous relaxation of the minimum bisection problem, as we prove in 4 and 8.


4. Algebraic Connectivity and the Fiedler Vector

4.1 Algebraic Connectivity \lambda_2

Definition. The algebraic connectivity of a graph GG is a(G)=λ2(L)a(G) = \lambda_2(L), the second-smallest eigenvalue of the graph Laplacian. It is also called the Fiedler value.

Theorem (Fiedler, 1973). λ2(L)>0\lambda_2(L) > 0 if and only if GG is connected.

This follows directly from 3.3: λ2=0\lambda_2 = 0 iff there are at least 2 connected components.

Why "algebraic" connectivity? The classical combinatorial connectivity κ(G)\kappa(G) (minimum number of vertices whose removal disconnects GG) is NP-hard to compute in general. The algebraic connectivity λ2\lambda_2 provides a computable lower bound:

λ2κ(G)δ(G)\lambda_2 \leq \kappa(G) \leq \delta(G)

where δ(G)\delta(G) is the minimum degree. This inequality chain says: algebraic connectivity \leq vertex connectivity \leq minimum degree.

Sensitivity. When a single edge (u,v)(u,v) is added to a graph, λ2\lambda_2 can increase by at most 22. When an edge is removed, λ2\lambda_2 can decrease by at most 22. This quantifies how much the connectivity changes with each graph edit - useful in robust network design.

Regular graphs. For a dd-regular graph on nn vertices:

λ2(L)=dμ1(A)(second eigenvalue of adjacency)\lambda_2(L) = d - \mu_1(A) \quad \text{(second eigenvalue of adjacency)}

where μ1(A)\mu_1(A) is the largest eigenvalue of AA not equal to dd. The spectral gap dμ1d - \mu_1 of the adjacency matrix and the algebraic connectivity are directly related for regular graphs.

4.2 The Fiedler Vector

Definition. The Fiedler vector u2\mathbf{u}_2 is the eigenvector of LL corresponding to λ2\lambda_2.

The Fiedler vector assigns a real number (u2)i(\mathbf{u}_2)_i to each vertex ii. Vertices with positive values are assigned to one "side" of the graph; vertices with negative values to the other. This is the basis of spectral bisection.

Spectral bisection algorithm:

  1. Compute the Fiedler vector u2\mathbf{u}_2.
  2. Partition V=SSˉV = S \cup \bar{S} by the sign of (u2)i(\mathbf{u}_2)_i: let S={i:(u2)i0}S = \{i : (\mathbf{u}_2)_i \geq 0\}.
  3. The edges (S,Sˉ)(S, \bar{S}) form the "spectral cut."

Why does this work? The Courant-Fischer theorem says u2\mathbf{u}_2 minimizes the Dirichlet energy (i,j)E(xixj)2\sum_{(i,j)\in E}(x_i - x_j)^2 subject to x1\mathbf{x} \perp \mathbf{1} and x=1\lVert \mathbf{x} \rVert = 1. If we further constrain xi{c,+c}x_i \in \{-c, +c\} (a discrete two-way partition), we get the NP-hard graph bisection problem. The Fiedler vector is the continuous relaxation of this discrete problem - the best we can do efficiently.

The ordering property. Sorting vertices by their Fiedler vector value (u2)i(\mathbf{u}_2)_i reveals the community structure of the graph. Vertices in the same community tend to have similar (u2)i(\mathbf{u}_2)_i values; the transition from negative to positive marks the community boundary.

For AI: Spectral bisection is used in:

  • Circuit partitioning (VLSI design): split a circuit graph across two chips to minimize inter-chip connections
  • Domain decomposition (PDE solvers): partition a mesh graph for parallel computation
  • Community detection in knowledge graphs: find the two most separated communities in a KG

4.3 Bounding Graph Properties via \lambda_2

Diameter bound (Mohar, 1991):

diam(G)2ln(n1)ln ⁣(λnλnλ2)\operatorname{diam}(G) \leq \left\lfloor \frac{2\ln(n-1)}{\ln\!\left(\frac{\lambda_n}{\lambda_n - \lambda_2}\right)} \right\rfloor

A simpler bound: diam(G)2nλ2\operatorname{diam}(G) \leq \frac{2n}{\lambda_2} (rough but useful).

Vertex connectivity. For any connected graph:

λ2(L)κ(G)\lambda_2(L) \leq \kappa(G)

where κ(G)\kappa(G) is the vertex connectivity (minimum number of vertices to remove to disconnect). A large λ2\lambda_2 means the graph is robustly connected.

Conductance. The conductance Φ(G)=minS:vol(S)vol(V)/2E(S,Sˉ)vol(S)\Phi(G) = \min_{S: \operatorname{vol}(S) \leq \operatorname{vol}(V)/2} \frac{|E(S, \bar{S})|}{\operatorname{vol}(S)} measures the minimum normalized cut. The Cheeger inequality (5) gives:

λ2(Lsym)2Φ(G)2λ2(Lsym)\frac{\lambda_2(L_{\text{sym}})}{2} \leq \Phi(G) \leq \sqrt{2\lambda_2(L_{\text{sym}})}

Isoperimetric number. The Cheeger constant h(G)h(G) (using S|S| instead of vol(S)\operatorname{vol}(S)) satisfies the same type of inequality with the unnormalized λ2\lambda_2.

4.4 Computing the Fiedler Vector in Practice

For small graphs (nn \leq a few thousand), compute all eigenvalues of LL directly via dense symmetric eigensolver (scipy.linalg.eigh). The second column of the eigenvector matrix is u2\mathbf{u}_2.

For large sparse graphs, use iterative methods:

Lanczos algorithm: Builds a tridiagonal matrix TT from Krylov vectors {Lv,L2v,}\{L\mathbf{v}, L^2\mathbf{v}, \ldots\}. Converges to extreme eigenvalues fastest. For the Fiedler vector, we need the smallest nonzero eigenvalue, which requires the shift-invert trick: compute the largest eigenvalue of (L+ϵI)1(L + \epsilon I)^{-1} for small ϵ\epsilon.

Inverse power iteration with deflation: Since λ1=0\lambda_1 = 0 is known, we can deflate it out. Initialize with a random x1\mathbf{x} \perp \mathbf{1}, repeatedly apply LL (via sparse matrix-vector product), normalize, and orthogonalize against 1\mathbf{1}. Convergence rate is (λ2/λ3)k(\lambda_2/\lambda_3)^k per iteration.

Randomized Nystrom approximation: For graphs with n>106n > 10^6, approximate the low-rank spectral structure using randomized sampling of the Laplacian (Spielman & Srivastava, 2011).

4.5 AI Application: Community Detection

Community detection - finding groups of densely interconnected nodes - is one of the most practically important graph problems. Spectral methods are the gold standard for quality guarantees.

Planted partition model. Generate a graph with kk communities of size n/kn/k each, intra-community edge probability pinp_{\text{in}}, inter-community probability poutpinp_{\text{out}} \ll p_{\text{in}}. Spectral bisection recovers the communities exactly when:

pinpout>2lnnn/k1SBM gapp_{\text{in}} - p_{\text{out}} > \sqrt{\frac{2\ln n}{n/k} \cdot \frac{1}{\text{SBM gap}}}

(This is the information-theoretic threshold for the Stochastic Block Model.)

Knowledge graph clustering. In a knowledge graph (KG) like Freebase or Wikidata, entities form communities by topic (sports, science, politics). The Fiedler vector of the KG adjacency graph separates these clusters. The resulting community structure can be used to create topic-specific sub-KGs for retrieval-augmented generation.


5. Cheeger's Inequality and Graph Expansion

5.1 The Cheeger Constant h(G)

Definition. For a graph G=(V,E)G = (V, E) and a subset SVS \subseteq V, the edge boundary S\partial S is the set of edges between SS and its complement Sˉ=VS\bar{S} = V \setminus S:

S={(i,j)E:iS,jSˉ}\partial S = \{(i,j) \in E : i \in S, j \in \bar{S}\}

The conductance (or isoperimetric ratio) of the cut (S,Sˉ)(S, \bar{S}) is:

Φ(S)=Smin(S,Sˉ)(unnormalized)orh(S)=Smin(vol(S),vol(Sˉ))(normalized)\Phi(S) = \frac{|\partial S|}{\min(|S|, |\bar{S}|)} \quad \text{(unnormalized)} \quad \text{or} \quad h(S) = \frac{|\partial S|}{\min(\operatorname{vol}(S), \operatorname{vol}(\bar{S}))} \quad \text{(normalized)}

The Cheeger constant (or isoperimetric number) of GG is:

h(G)=minSV,S,Vh(S)h(G) = \min_{S \subset V,\, S \neq \emptyset,\, V} h(S)

This is the minimum conductance cut: the partition that minimizes the fraction of edges leaving the smaller side relative to its volume. A small h(G)h(G) means the graph has a bottleneck - a small number of edges separating a large fraction of the volume.

Computing h(G)h(G) is NP-hard. This is a major motivation for the Cheeger inequality, which gives a polynomial-time algorithm (via λ2\lambda_2) to find a cut within a factor of 2\sqrt{2} of optimal.

Examples:

  • Path PnP_n: Remove the middle edge; h(Pn)2/nh(P_n) \approx 2/n. Very small: the path is a severe bottleneck.
  • Complete graph KnK_n: Every cut (S,Sˉ)(S, \bar{S}) has S=SSˉ/(n1)S/2|\partial S| = |S| \cdot |\bar{S}|/(n-1) \approx |S|/2; h(Kn)=n/(2(n1))1/2h(K_n) = n/(2(n-1)) \approx 1/2.
  • Expander graph (5.3): h(G)=Ω(1)h(G) = \Omega(1) - bounded below by a constant, independent of nn.

5.2 Cheeger's Inequality

Theorem (Alon & Milman, 1985; Dodziuk, 1984). For any undirected graph GG:

λ2(Lsym)2h(G)2λ2(Lsym)\frac{\lambda_2(L_{\text{sym}})}{2} \leq h(G) \leq \sqrt{2\lambda_2(L_{\text{sym}})}

Proof of the left inequality (easy direction). We show λ22h(G)\lambda_2 \leq 2h(G) by exhibiting a test vector x\mathbf{x} with R(x)2h(G)R(\mathbf{x}) \leq 2h(G).

Let SS^* be the optimal Cheeger cut with h(S)=h(G)h(S^*) = h(G). Define:

xi={1/vol(S)iS1/vol(Sˉ)iSˉx_i = \begin{cases} 1/\operatorname{vol}(S^*) & i \in S^* \\ -1/\operatorname{vol}(\bar{S}^*) & i \in \bar{S}^* \end{cases}

This x\mathbf{x} is orthogonal to the stationary distribution of the random walk (which plays the role of 1\mathbf{1} for the normalized Laplacian). Then:

xLsymx=(i,j)S(xixjdidj)2didj\mathbf{x}^\top L_{\text{sym}} \mathbf{x} = \sum_{(i,j)\in\partial S^*} \left(\frac{x_i - x_j}{\sqrt{d_i d_j}}\right)^2 \cdot d_i d_j

After algebraic simplification using the definition of hh: R(x)2h(G)R(\mathbf{x}) \leq 2h(G). Since λ2=minR(x)\lambda_2 = \min R(\mathbf{x}), we get λ22h(G)\lambda_2 \leq 2h(G).

Proof of the right inequality (hard direction). We show h(G)2λ2h(G) \leq \sqrt{2\lambda_2}.

Given the Fiedler vector u2\mathbf{u}_2, sort vertices so u2,1u2,2u2,nu_{2,1} \leq u_{2,2} \leq \cdots \leq u_{2,n}. For each threshold tt, let St={i:u2,it}S_t = \{i : u_{2,i} \leq t\}. Consider the sweep over all n1n-1 possible thresholds. By the co-area formula for graphs (a discrete version of the co-area formula in differential geometry), the average conductance of these cuts satisfies:

minth(St)th(St)Δvol(St)tΔvol(St)2λ2\min_t h(S_t) \leq \frac{\sum_t h(S_t) \cdot \Delta\operatorname{vol}(S_t)}{\sum_t \Delta\operatorname{vol}(S_t)} \leq \sqrt{2\lambda_2}

The last step uses the Cauchy-Schwarz inequality together with the fact that λ2=R(u2)\lambda_2 = R(\mathbf{u}_2) is the Rayleigh quotient of the Fiedler vector. \square

Tightness. The left bound is tight for expanders (5.3). The right bound is tight for paths and other bottleneck graphs where λ2h2/2\lambda_2 \approx h^2/2.

Practical implication. Given λ2\lambda_2, we know h(G)[λ2/2,2λ2]h(G) \in [\lambda_2/2, \sqrt{2\lambda_2}]. More importantly, the proof of the right inequality is constructive: the sweep over Fiedler vector thresholds finds a cut with conductance 2λ2\leq \sqrt{2\lambda_2}.

5.3 Expander Graphs

Definition. A family of graphs {Gn}\{G_n\} is an (n,d,λ)(n, d, \lambda)-expander family if:

  • Each GnG_n has nn vertices and is dd-regular
  • The second eigenvalue of AA satisfies μ2(A)λ<d\mu_2(A) \leq \lambda < d
  • The spectral gap dλd - \lambda is bounded below by a positive constant

Equivalently (by Cheeger): h(Gn)=Ω(1)h(G_n) = \Omega(1), i.e., the Cheeger constant is bounded below uniformly in nn.

Why expanders matter:

  1. Communication networks: In a dd-regular expander on nn nodes, any message can be routed between any two nodes in O(logn)O(\log n) hops, using only dd connections per node. This is optimal for constant-degree networks.
  2. Error-correcting codes: Expander codes (Sipser & Spielman, 1996) achieve linear-time encoding/decoding of codes close to the Shannon capacity.
  3. Derandomization: Expanders provide pseudorandom number generators - random walks on expanders mix in O(logn)O(\log n) steps, so short random walks serve as good randomness sources.
  4. GNN depth: A GNN on an expander graph propagates information across the entire graph in O(logn)O(\log n) layers. This is why expanders are ideal benchmarks for deep GNNs.

Ramanujan graphs. The optimal spectral gap for a dd-regular graph is bounded: λ2d1\lambda \geq 2\sqrt{d-1} (Alon-Boppana theorem). Graphs achieving λ=2d1\lambda = 2\sqrt{d-1} are called Ramanujan graphs - they are the optimal expanders. Explicit Ramanujan graph constructions (Lubotzky, Phillips, Sarnak, 1988; Margulis, 1988) use deep number theory.

5.4 Random Walk Mixing Time

The random walk on GG defined by transition matrix P=D1AP = D^{-1}A has stationary distribution π\boldsymbol{\pi} with πi=di/vol(V)\pi_i = d_i / \operatorname{vol}(V). The mixing time is the number of steps needed for the walk to get close to the stationary distribution:

tmix(ϵ)=min{t:maxi(Pt)i,:π1ϵ}t_{\text{mix}}(\epsilon) = \min\left\{t : \max_i \lVert (P^t)_{i,:} - \boldsymbol{\pi} \rVert_1 \leq \epsilon\right\}

Spectral mixing bound. Let α=max(μ2(P),μn(P))=1λ2(Lrw)\alpha = \max(|\mu_2(P)|, |\mu_n(P)|) = 1 - \lambda_2(L_{\text{rw}}) be the second-largest absolute eigenvalue of PP. Then:

tmix(ϵ)ln(n/ϵ)λ2(Lrw)=ln(n/ϵ)1αt_{\text{mix}}(\epsilon) \leq \frac{\ln(n/\epsilon)}{\lambda_2(L_{\text{rw}})} = \frac{\ln(n/\epsilon)}{1 - \alpha}

Interpretation: The spectral gap λ2=1α\lambda_2 = 1 - \alpha governs the mixing time. Large spectral gap -> fast mixing. For expanders with constant spectral gap: tmix=O(logn)t_{\text{mix}} = O(\log n). For paths: λ2=O(1/n2)\lambda_2 = O(1/n^2), so tmix=O(n2logn)t_{\text{mix}} = O(n^2 \log n).

Proof sketch. Write the initial distribution as δi=π+kckϕk\boldsymbol{\delta}_i = \boldsymbol{\pi} + \sum_k c_k \boldsymbol{\phi}_k where ϕk\boldsymbol{\phi}_k are eigenvectors of PP (eigenvalues 1=μ1>μ2μn11 = \mu_1 > \mu_2 \geq \cdots \geq \mu_n \geq -1). After tt steps: (Ptδi)j=πj+k2ckμkt(ϕk)j(P^t \boldsymbol{\delta}_i)_j = \pi_j + \sum_{k \geq 2} c_k \mu_k^t (\boldsymbol{\phi}_k)_j. The deviation decays as αt\alpha^t, giving tmixln(1/ϵπmin)/ln(1/α)t_{\text{mix}} \leq \ln(1/\epsilon\pi_{\min})/\ln(1/\alpha).

Lazy walk. To avoid oscillation when μn1\mu_n \approx -1 (bipartite-like graphs), use the lazy random walk with P=(I+P)/2P' = (I + P)/2. Eigenvalues of PP' are (1+μk)/2[0,1](1 + \mu_k)/2 \in [0, 1], avoiding negative eigenvalues.

5.5 AI Connection: Over-Smoothing as Diffusion

Over-smoothing is the well-documented phenomenon in deep GNNs where node representations become indistinguishable as the number of layers increases (Li et al., 2018; Oono & Suzuki, 2020). Spectral theory provides the exact mechanism:

A kk-layer GCN computes (roughly) A^kXW\hat{A}^k X W where A^=D~1/2A~D~1/2\hat{A} = \tilde{D}^{-1/2}\tilde{A}\tilde{D}^{-1/2} is the normalized adjacency. The eigenvalues of A^\hat{A} satisfy μ^i=1λ~i[1,1]\hat{\mu}_i = 1 - \tilde{\lambda}_i \in [-1, 1] where λ~i\tilde{\lambda}_i are eigenvalues of LsymL_{\text{sym}} of the augmented graph. After kk iterations:

(A^k)ij=μ^k(U)i(U)jkμ^1k(U)i1(U)j1=didjvol(V)(\hat{A}^k)_{ij} = \sum_\ell \hat{\mu}_\ell^k (U)_{i\ell}(U)_{j\ell} \xrightarrow{k \to \infty} \hat{\mu}_1^k (U)_{i1}(U)_{j1} = \frac{\sqrt{d_i d_j}}{\operatorname{vol}(V)}

All node features converge to a value proportional to di\sqrt{d_i}, determined only by degree - all structural information is lost.

Rate of collapse. The convergence rate is governed by the spectral gap: μ^2=1λ2(Lsym)<1\hat{\mu}_2 = 1 - \lambda_2(L_{\text{sym}}) < 1. Faster collapse on expanders (large λ2\lambda_2), slower on bottleneck graphs. This is counterintuitive: the "most connected" graphs (expanders) over-smooth fastest.

Mitigation strategies:

  • Residual connections (GCNII, Chen et al., 2020): H(k+1)=σ ⁣((1α)A^H(k)W(k)+αH(0))H^{(k+1)} = \sigma\!\left((1-\alpha)\hat{A}H^{(k)}W^{(k)} + \alpha H^{(0)}\right) - preserve initial features
  • DropEdge (Rong et al., 2020): randomly remove edges during training, reducing effective kk
  • PairNorm (Zhao & Akoglu, 2020): explicitly normalize pairwise distances to prevent collapse
  • Jumping knowledge (Xu et al., 2018): aggregate representations from all layers

Forward reference: The full architecture-level treatment of over-smoothing, including the WL expressiveness hierarchy and architectural mitigations, is in 11-05 Graph Neural Networks.


6. Graph Fourier Transform and Signal Processing

6.1 Classical Fourier Analogy

The classical Fourier transform on Rn\mathbb{R}^n decomposes a function ff into a linear combination of eigenfunctions of the Laplace operator Δ\Delta:

f^(ω)=Rnf(x)eiωxdx\hat{f}(\boldsymbol{\omega}) = \int_{\mathbb{R}^n} f(\mathbf{x}) e^{-i\boldsymbol{\omega}^\top \mathbf{x}} d\mathbf{x}

The functions eiωxe^{i\boldsymbol{\omega}^\top \mathbf{x}} are eigenfunctions of the continuous Laplacian: Δeiωx=ω2eiωx-\Delta e^{i\boldsymbol{\omega}^\top \mathbf{x}} = \lVert \boldsymbol{\omega} \rVert^2 e^{i\boldsymbol{\omega}^\top \mathbf{x}}.

On a graph, the Laplacian LL plays the role of Δ-\Delta, and its eigenvectors u1,u2,,un\mathbf{u}_1, \mathbf{u}_2, \ldots, \mathbf{u}_n (with eigenvalues λ1λ2λn\lambda_1 \leq \lambda_2 \leq \cdots \leq \lambda_n) play the role of the complex exponentials eiωxe^{i\boldsymbol{\omega}^\top \mathbf{x}}.

The analogy:

FOURIER TRANSFORM ANALOGY
========================================================================

  Classical Fourier                   Graph Fourier
  ---------------------------------   ---------------------------------
  Domain          \mathbb{R}^n                  Vertex set V (finite)
  Operator        -\Delta (Laplacian)      L = D - A (graph Laplacian)
  Eigenfunctions  exp(i\omega*x)           Eigenvectors u_1, u_2, ..., u_n
  Frequencies     ||\omega||^2 \in [0, \infty)      Eigenvalues \lambda_1 \leq \lambda_2 \leq ... \leq \lambda_n
  Low freq.       ||\omega|| small -> smooth  \lambda_k small -> smooth on graph
  High freq.      ||\omega|| large -> rapid   \lambda_k large -> rapid variation
  Transform       Continuous integral  Finite matrix multiply (U^Tx)

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

This analogy is the conceptual foundation for defining convolution, filtering, and signal processing on irregular graph domains.

6.2 Graph Fourier Transform

Definition. Let L=UΛUL = U \Lambda U^\top be the eigendecomposition of the graph Laplacian, with U=[u1,u2,,un]U = [\mathbf{u}_1, \mathbf{u}_2, \ldots, \mathbf{u}_n] the matrix of eigenvectors (columns). For a signal xRn\mathbf{x} \in \mathbb{R}^n (assigning a value xix_i to each vertex ii), the Graph Fourier Transform (GFT) is:

x^=UxRn\hat{\mathbf{x}} = U^\top \mathbf{x} \in \mathbb{R}^n

The inverse GFT is:

x=Ux^=k=1nx^kuk\mathbf{x} = U \hat{\mathbf{x}} = \sum_{k=1}^n \hat{x}_k \mathbf{u}_k

Properties:

  1. Parseval's theorem: x^2=x2\lVert \hat{\mathbf{x}} \rVert^2 = \lVert \mathbf{x} \rVert^2 (since UU is orthogonal).
  2. Linearity: x+y^=x^+y^\widehat{\mathbf{x} + \mathbf{y}} = \hat{\mathbf{x}} + \hat{\mathbf{y}}.
  3. Energy decomposition: x2=kx^k2\lVert \mathbf{x} \rVert^2 = \sum_k \hat{x}_k^2 (energy in each frequency component).
  4. Shift property: There is no clean "shift theorem" for graphs as there is for the DFT, because graphs lack translation symmetry. This is a fundamental difference.

Graph convolution. The convolution of two signals x\mathbf{x} and y\mathbf{y} on a graph is defined spectrally:

xGy=U(x^y^)=Udiag(x^)y^\mathbf{x} \star_G \mathbf{y} = U (\hat{\mathbf{x}} \odot \hat{\mathbf{y}}) = U \operatorname{diag}(\hat{\mathbf{x}}) \hat{\mathbf{y}}

where \odot is element-wise multiplication. This is the analogue of the convolution theorem: convolution in the vertex domain equals pointwise multiplication in the spectral domain.

Limitation of full GFT: Computing UU requires O(n3)O(n^3) time (eigendecomposition). For large graphs (n>104n > 10^4), this is infeasible, motivating polynomial approximations (7).

6.3 Frequency Interpretation

The kk-th frequency component x^k=uk,x=ukx\hat{x}_k = \langle \mathbf{u}_k, \mathbf{x} \rangle = \mathbf{u}_k^\top \mathbf{x} measures how much of the signal x\mathbf{x} "oscillates at frequency λk\lambda_k."

Low-frequency signals correspond to small λk\lambda_k: the eigenvectors uk\mathbf{u}_k for small eigenvalues vary smoothly across edges (since ukLuk=λk\mathbf{u}_k^\top L \mathbf{u}_k = \lambda_k is small). A signal concentrated in low frequencies is smooth: nearby vertices have similar values.

High-frequency signals correspond to large λk\lambda_k: the eigenvectors for large eigenvalues oscillate rapidly, with (uk)i(\mathbf{u}_k)_i and (uk)j(\mathbf{u}_k)_j having opposite signs for many edges (i,j)(i,j). A pure high-frequency signal looks like a checkerboard on the graph.

Example on a path graph. For PnP_n, the eigenvectors are uk,i=2/ncos((k1)π(2i1)/(2n))u_{k,i} = \sqrt{2/n} \cos((k-1)\pi(2i-1)/(2n)) - the discrete cosine transform (DCT). The eigenvalues λk=22cos((k1)π/n)\lambda_k = 2 - 2\cos((k-1)\pi/n) are just the squared DCT frequencies. The GFT on a path is the DCT.

Example on a community graph. A graph with two tightly connected communities has:

  • u1=1/n\mathbf{u}_1 = \mathbf{1}/\sqrt{n}: constant (DC component)
  • u2\mathbf{u}_2: Fiedler vector, positive on community 1, negative on community 2 - the community membership function is a low-frequency signal
  • un\mathbf{u}_n: highest frequency, alternates sign on bipartite-like structure

6.4 Dirichlet Energy Revisited

The Dirichlet energy decomposes cleanly in the spectral domain:

xLx=x^Λx^=k=1nλkx^k2\mathbf{x}^\top L \mathbf{x} = \hat{\mathbf{x}}^\top \Lambda \hat{\mathbf{x}} = \sum_{k=1}^n \lambda_k \hat{x}_k^2

This is the "power spectrum" interpretation: the Dirichlet energy is the weighted sum of spectral components, weighted by frequency. A signal is smooth (low Dirichlet energy) iff its energy is concentrated in low-frequency components (λk\lambda_k small).

Spectral analysis of node features. Given a node feature matrix XRn×dX \in \mathbb{R}^{n \times d}, we can compute the spectral content of each feature dimension:

Dirichlet(X:,j)=k=1nλkX^kj2\operatorname{Dirichlet}(X_{:,j}) = \sum_{k=1}^n \lambda_k \hat{X}_{kj}^2

Feature dimensions with low Dirichlet energy are "community-consistent" features (e.g., political affiliation in a social network). Feature dimensions with high Dirichlet energy are "noisy" local features.

For AI: Graph regularization in semi-supervised learning minimizes:

L=Lsupervised+γjf:,jLf:,j\mathcal{L} = \mathcal{L}_{\text{supervised}} + \gamma \sum_j \mathbf{f}_{:,j}^\top L \mathbf{f}_{:,j}

This penalizes high-frequency components in the predicted label function f\mathbf{f}, implementing a "smoothness prior": connected nodes likely have the same label.

6.5 Uncertainty Principle on Graphs

In classical signal processing, the Heisenberg uncertainty principle states that a signal cannot be simultaneously concentrated in both time and frequency: the product of time spread and frequency spread is at least 1/4π1/4\pi.

On graphs, an analogous uncertainty principle holds (Agaskar & Lu, 2013):

ΔG(x)2ΔS(x)2C\Delta_G(\mathbf{x})^2 \cdot \Delta_S(\mathbf{x})^2 \geq C

where ΔG\Delta_G measures how localized x\mathbf{x} is in the vertex domain (concentrated on a small set of vertices) and ΔS\Delta_S measures how localized x^\hat{\mathbf{x}} is in the spectral domain (concentrated on a small band of frequencies), and CC is a constant depending on the graph structure.

Implications for graph signal processing:

  • A signal perfectly localized on a single vertex (ΔG=0\Delta_G = 0) is spread across all frequencies (ΔS=\Delta_S = maximum)
  • Smooth signals (concentrated on low frequencies, small ΔS\Delta_S) are necessarily spread across many vertices (ΔG\Delta_G large)
  • This tradeoff motivates graph wavelets (11.3): basis functions that are approximately localized in both vertex and spectral domains

6.6 AI Application: Node Feature Smoothing

Label propagation (Zhou et al., 2004) is a classic semi-supervised learning algorithm that directly implements low-pass graph filtering. Starting from a partially labeled graph, labels propagate according to:

F(t+1)=αA^F(t)+(1α)Y\mathbf{F}^{(t+1)} = \alpha \hat{A} \mathbf{F}^{(t)} + (1 - \alpha) Y

where YY is the initial label matrix (zeros for unlabeled nodes), A^\hat{A} is the normalized adjacency, and α(0,1)\alpha \in (0,1) controls the smoothing strength. In the spectral domain, this converges to:

F=(IαA^)1(1α)Y=k1α1α(1λ~k)Y^kuk\mathbf{F}^* = (I - \alpha \hat{A})^{-1} (1-\alpha) Y = \sum_k \frac{1-\alpha}{1 - \alpha(1-\tilde{\lambda}_k)} \hat{Y}_k \mathbf{u}_k

The filter g(λ)=(1α)/(1α(1λ))g(\lambda) = (1-\alpha)/(1-\alpha(1-\lambda)) is a low-pass filter: it attenuates high-frequency components (λ\lambda large) more than low-frequency ones.

For modern LLMs: When an LLM reasons over a knowledge graph, smooth graph signals correspond to consistent facts (nearby entities agree), while high-frequency signals correspond to noise or inconsistencies. Spectral filtering provides a principled way to denoise knowledge graphs before retrieval.


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