Foundations to Frontier
Tests
E. Deep Learning › E14 Graph Neural Networks

Spectral GNNs: ChebNet

Spectral graph neural networks define convolution on a graph through the eigenvectors of its Laplacian, the graph's version of Fourier modes. Applying a learned filter to those frequencies needs a costly eigendecomposition, and the filter is not localised. ChebNet (Defferrard, Bresson and Vandergheynst, 2016) fixes both. It writes the filter as a degree-K Chebyshev polynomial of the scaled Laplacian, computed with K sparse matrix products, and such a filter only mixes nodes within K hops. This page covers the graph Fourier transform, spectral filtering and the Chebyshev recurrence. In the exercises you implement the recurrence, then denoise a smooth signal on a 10 × 10 grid with a heat-kernel low-pass filter. The exact spectral filter cut the error from 0.233 to 0.026. A third-order Chebyshev filter, using only 3 sparse products and 3-hop neighbourhoods, reached 0.029. Its filter matrix was exactly zero beyond 3 hops.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Frequencies on a graph

A sound can be split into low and high frequencies; so can a signal living on a graph. Slowly varying patterns, where neighbours have similar values, are low frequencies; patterns that flip between neighbours are high frequencies. Spectral GNNs learn which frequencies to keep. ChebNet does this cheaply with a polynomial that only looks a few hops around each node. The demo plots such a polynomial filter over the graph’s frequencies.

Graph neural network lab
eigenvalue λ of the normalised Laplacian, 0 … 2
Red dots: the graph's 12 Laplacian eigenvalues and the filter's gain there. A degree-3 Chebyshev polynomial is K-localised: it mixes information only within 3 hops.
Why engineers care

Graph filters denoise sensor networks, smooth measurements on meshes and power grids, and underlie the GCN, the most widely used graph network.

📝 Quick check (Level 0)
0/3 answered
  1. 1. A low-frequency graph signal has…
  2. 2. ChebNet's filters are…
  3. 3. A degree-K ChebNet filter looks…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Normalised Laplacian: L = I − D^(−1/2) A D^(−1/2), with eigenvalues in [0, 2] and eigenvectors U, the graph Fourier basis.
  • Spectral filtering: y = U h(Λ) Uᵀ x, where h acts on each frequency (eigenvalue). The heat kernel h(λ) = e^(−τλ) is a low-pass filter.
  • Chebyshev approximation:
    • h(λ) ≈ Σ_(k=0)^K θ_k T_k(λ̃), with λ̃ = 2λ/λ_max − 1 in [−1, 1] (λ = 0 maps to −1, λ = 2 to 1 for λ_max = 2);
    • the polynomials satisfy T_0 = 1, T_1 = x and T_k = 2x T_(k−1) − T_(k−2): T_2(0.5) = −0.5 and T_3(0.5) = −1;
    • so y = Σ θ_k T_k(L̃) x needs only K sparse products with L̃.
  • Locality: (L̃^k)_ij = 0 when i and j are more than k hops apart, so the filter is exactly K-hop localised.
  • Parameters: (K + 1) coefficients per input–output channel pair, 16 × 32 × 4 = 2048 for K = 3.
📝 Quick check (Level 1)
0/3 answered
  1. 1. T_2(x):
  2. 2. Scaled eigenvalue for λ = 1, λ_max = 2:
  3. 3. Eigenvalues of the normalised Laplacian lie in…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

ChebNet in code

Exercise 1.

  • The recurrence matched T_2 and T_3, and cos(3 arccos x).
  • The scaled Laplacian of a 2-node graph was [[0, −1], [−1, 0]].
  • The Chebyshev filter matched direct spectral filtering through the eigendecomposition.

Practice.

  • PyTorch Geometric’s ChebConv(in, out, K) implements ChebNet. Use λ_max = 2 for the normalised Laplacian, or estimate it.
  • K = 2–3 is common. For very large graphs, use sparse tensors and precompute the scaled Laplacian.
  • Spectral filters are tied to one graph’s Laplacian; for many different graphs, spatial message passing is more natural.
Lt = 2 * L / lmax - I                                  # scaled Laplacian (sparse)
T0, T1 = x, Lt @ x
out = T0 @ theta[0] + T1 @ theta[1]
for k in range(2, K + 1):
    T0, T1 = T1, 2 * Lt @ T1 - T0                      # Chebyshev recurrence: one sparse product per order
    out = out + T1 @ theta[k]
🐍 Exercise 1: the Chebyshev recurrence
Compute Chebyshev polynomials, scale a Laplacian and apply a ChebNet filter.
📝 Quick check (Level 2)
0/3 answered
  1. 1. PyTorch Geometric layer for ChebNet:
  2. 2. Typical K:
  3. 3. Spectral filters are tied to…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Graph Fourier transform.

  • The Laplacian’s eigenvectors are ordered by smoothness: the quadratic form xᵀLx = ½ Σ_(ij) A_ij (x_i/√d_i − x_j/√d_j)² is small for smooth signals.
  • The eigenvalue measures each eigenvector’s variation, its frequency. Filtering scales each frequency component.

Why polynomials.

  • Early spectral networks (Bruna and colleagues, 2014) learned one parameter per eigenvalue: O(n) parameters, an O(n³) eigendecomposition, and filters that are not localised.
  • A polynomial filter of degree K has K + 1 parameters, costs O(K·|E|), and is K-hop localised.
  • Chebyshev polynomials are the natural basis on [−1, 1]: they are stable to compute and give near-best uniform approximations of smooth functions (Hammond and colleagues used them for graph wavelets in 2011).

Towards GCN. Setting K = 1 and λ_max ≈ 2 and tying the two coefficients gives the GCN layer (next page).

📝 Quick check (Level 3)
0/3 answered
  1. 1. xᵀLx is small for…
  2. 2. Bruna et al.'s spectral networks needed…
  3. 3. GCN is ChebNet with…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

How low an order is enough?

History.

  • J. Bruna, W. Zaremba, A. Szlam and Y. LeCun, “Spectral networks and locally connected networks on graphs” (ICLR 2014).
  • M. Defferrard, X. Bresson and P. Vandergheynst, “Convolutional neural networks on graphs with fast localized spectral filtering” (NeurIPS 2016).
  • D. Hammond, P. Vandergheynst and R. Gribonval (2011) introduced graph wavelets with Chebyshev approximation.

Exercise 2.

  • Graph and signal: a 10 × 10 grid graph carrying the smooth signal sin(x/3) + cos(y/4), plus noise of standard deviation 0.5.
  • Filter: the heat kernel h(λ) = e^(−4λ), applied exactly (through the eigendecomposition) and with Chebyshev approximations of order K.
  • Measurements: the maximum approximation error of h over the graph’s eigenvalues, the denoising error (MSE against the clean signal), and the largest filter-matrix entry beyond K hops.
order K max error of h denoising MSE largest entry beyond K hops
1 0.436 0.254 0
2 0.200 0.067 0
3 0.078 0.029 0
5 0.0076 0.025 0
10 0.0000 0.026 0

Noisy signal MSE 0.233; exact spectral filter 0.026.

  • Order 3 is already enough: with 3 sparse products, it reaches 0.029, within 10% of the exact filter’s 0.026, and removes 88% of the noise.
  • Order 1 is too crude: a straight line cannot follow the heat kernel’s curve, and the result (0.254) is worse than not filtering.
  • Locality is exact: every order-K filter matrix was exactly zero beyond K hops, as the theory says.
  • Order 10 reproduces the exact filter (approximation error below 10⁻⁴). Order 5 was marginally better than exact (0.025), a chance effect of a slightly different filter shape.
  • Seeds: noise seeds 1 and 2 gave order-3 errors of 0.036 and 0.022 against exact 0.025 and 0.016.
🐍 Exercise 2 (research): how low an order is enough?
Denoise a grid-graph signal with exact and Chebyshev-approximated heat-kernel filters and check their locality.

Spectral GNNs in AI, robotics and aerospace

  • Sensor networks: smoothing and interpolating readings over a network of weather stations, structural sensors or grid meters.
  • Meshes: filtering and learning on surface meshes of aircraft parts and terrain.
  • Design lesson: polynomial filters give a clean trade-off between locality, cost and frequency selectivity; a low order is usually enough.

References

  1. M. Defferrard, X. Bresson and P. Vandergheynst (2016). “Convolutional neural networks on graphs with fast localized spectral filtering.” NeurIPS.
  2. J. Bruna, W. Zaremba, A. Szlam and Y. LeCun (2014). “Spectral networks and locally connected networks on graphs.” ICLR.
  3. D. K. Hammond, P. Vandergheynst and R. Gribonval (2011). “Wavelets on graphs via spectral graph theory.” Applied and Computational Harmonic Analysis 30.