Graph Fourier Transform: The Spectral View of Graphs

5 minute read

Published:

TL;DR: The classical Fourier transform decomposes a 1D signal into sinusoids. The Graph Fourier Transform (GFT) decomposes a graph signal into the eigenvectors of the graph Laplacian — the graph's natural "frequency basis". Low-frequency eigenvectors are smooth over the graph; high-frequency ones are rough. Spectral graph convolution filters signals in this basis.

From Classical to Graph Fourier

In classical signal processing, the Fourier transform decomposes a signal f(t) into complex exponentials:

F̂(ω) = ∫ f(t) e^{−iωt} dt

The complex exponentials e^{iωt} are the eigenfunctions of the derivative operator (d/dt): they satisfy de^{iωt}/dt = iω e^{iωt}.

On a graph, the natural differential operator is the graph Laplacian L = D − A (see the Graph Laplacian post). Its eigenvectors play the role of complex exponentials.

The Graph Laplacian Eigenvectors

The symmetric normalised Laplacian L_sym = D^{-1/2} L D^{-1/2} has eigendecomposition:

L_sym = U Λ Uᵀ

Where:

  • U = [u₁, u₂, …, uₙ] — matrix of orthonormal eigenvectors
  • Λ = diag(λ₁ ≤ λ₂ ≤ … ≤ λₙ) — diagonal matrix of eigenvalues (real, non-negative)
  • λ₁ = 0 always (the constant vector u₁ = 1/√N is the eigenvector for λ=0)

Eigenvalues range from 0 to 2 for the normalised Laplacian.

Graph Signals and Frequencies

A graph signal is a function f: V → ℝ, assigning a scalar value to each node. Stack these into a vector f ∈ ℝᴺ: f[v] = signal value at node v.

The smoothness of a signal is measured by the Laplacian quadratic form:

fᵀ L f = Σ_{(u,v)∈E} (f[u] − f[v])²

A smooth signal (nearby nodes have similar values) gives small fᵀ L f. A rough signal (wildly varying between neighbours) gives large fᵀ L f.

Eigenvectors as frequency components:

  • u₁ (λ₁ = 0): perfectly constant over the graph — the DC component, lowest frequency
  • u₂, u₃, … (increasing λ): progressively rougher signals — higher frequencies
  • uₙ (λₙ = largest): alternates sign between connected nodes — highest frequency, like a checkerboard
The intuition: Just as a high-frequency sinusoid oscillates rapidly in time, a high-frequency graph eigenvector oscillates rapidly across edges — adjacent nodes have very different values. Low-frequency eigenvectors vary slowly and smoothly across the graph.

The Graph Fourier Transform

The Graph Fourier Transform (GFT) of signal f is its projection onto the eigenvectors:

f̂ = Uᵀ f (GFT: time domain → frequency domain) f = U f̂ (Inverse GFT: frequency → time)

f̂[k] = uₖᵀ f is the “amplitude” of the k-th frequency component in the signal.

This is a change of basis: from node space (what value is at each node) to frequency space (how much of each eigenvector pattern is present in the signal).

Graph Convolution via the GFT

In classical signal processing, convolution in time equals pointwise multiplication in frequency:

(f * g)(t) = ℱ⁻¹{ ℱ{f}(ω) · ℱ{g}(ω) }

Analogously, spectral graph convolution is defined as:

(f *_G g) = U (Uᵀf ⊙ Uᵀg) = U (f̂ ⊙ ĝ)

where ⊙ is elementwise multiplication. A spectral filter h_θ(Λ) is a diagonal matrix of learnable weights in the frequency domain:

h_θ *_G f = U · h_θ(Λ) · Uᵀ f

Learning h_θ learns which frequencies to amplify and which to suppress — exactly like an equaliser on a music player.

The Problem: Computation Cost

Computing the full eigendecomposition of L costs O(N³) — prohibitive for large graphs. Storing U costs O(N²).

Solutions:

  • ChebNet approximates h_θ(Λ) with Chebyshev polynomials — O(E) cost, no eigendecomposition
  • GCN further simplifies by using the first-order Chebyshev approximation — a single message-passing step
  • Graph Transformers abandon the spectral view and use attention directly in node space

Low-Pass Filtering and GCN

Standard GCN acts as a low-pass filter — it amplifies smooth (low-frequency) signals and suppresses rough (high-frequency) ones. Averaging neighbour features is a local smoothing operation.

This is why GCN works well for homophilic graphs (smooth label signals) and poorly for heterophilic graphs (rough, high-frequency label signals). A heterophilic graph needs a high-pass filter — accentuating differences between neighbours rather than averaging them away.

Summary

ConceptClassical (time)Graph (node space)
Signalf(t) ∈ ℝf ∈ ℝᴺ (one value per node)
Frequency basisComplex exponentials e^{iωt}Laplacian eigenvectors U
Forward transformF̂(ω) = ∫ f e^{-iωt} dtf̂ = Uᵀf
Inversef = ∫ F̂ e^{iωt} dωf = Uf̂
ConvolutionPointwise product in freq. domainU (f̂ ⊙ ĝ)
Low-pass filterRemoves high ωSmooths across edges
High-pass filterRemoves low ωAccentuates edge differences

The Graph Fourier Transform is the mathematical foundation of spectral GNNs. Even if you use spatial GNNs (which avoid eigendecomposition), understanding this spectral view helps diagnose why GNNs succeed or fail on specific graph types.

References