Spectral Analysis of Networks

The eigenvalues and eigenvectors of the graph Laplacian encode deep structural properties of a network. The Fiedler value measures connectivity, the spectral gap controls diffusion speed, and effective resistance quantifies accessibility between locations.

1. The Graph Laplacian

For an undirected graph \(G\) with adjacency matrix \(\mathbf{A}\) and degree matrix \(\mathbf{D} = \text{diag}(k_1, \ldots, k_n)\), the graph Laplacian is:

$$\mathbf{L} = \mathbf{D} - \mathbf{A}$$

Explicitly, its entries are:

$$L_{ij} = \begin{cases} k_i & \text{if } i = j \\ -1 & \text{if } (i,j) \in E \\ 0 & \text{otherwise} \end{cases}$$

Key properties of \(\mathbf{L}\):

  • Positive semi-definite: \(\mathbf{x}^T \mathbf{L} \mathbf{x} = \sum_{(i,j) \in E} (x_i - x_j)^2 \geq 0\)
  • Smallest eigenvalue is zero: \(\lambda_1 = 0\) with eigenvector \(\mathbf{1}\) (the constant vector)
  • Multiplicity of zero: equals the number of connected components
  • Row sums are zero: \(\mathbf{L}\mathbf{1} = \mathbf{0}\)

The normalised Laplacian is sometimes preferred:\(\;\mathcal{L} = \mathbf{D}^{-1/2}\mathbf{L}\mathbf{D}^{-1/2} = \mathbf{I} - \mathbf{D}^{-1/2}\mathbf{A}\mathbf{D}^{-1/2}\), whose eigenvalues lie in \([0, 2]\).

2. The Fiedler Value and Algebraic Connectivity

The eigenvalues of \(\mathbf{L}\) are ordered:

$$0 = \lambda_1 \leq \lambda_2 \leq \lambda_3 \leq \cdots \leq \lambda_n$$

The second-smallest eigenvalue \(\lambda_2\) is called the Fiedler value or algebraic connectivity. It measures how well-connected the graph is:

$$\lambda_2 = \min_{\mathbf{x} \perp \mathbf{1}} \frac{\mathbf{x}^T \mathbf{L} \mathbf{x}}{\mathbf{x}^T \mathbf{x}} = \min_{\mathbf{x} \perp \mathbf{1}} \frac{\sum_{(i,j) \in E} (x_i - x_j)^2}{\sum_i x_i^2}$$

The corresponding eigenvector \(\mathbf{v}_2\) -- the Fiedler vector -- provides the optimal bipartition of the graph. Nodes with positive components of \(\mathbf{v}_2\) form one community, negative components form the other. This is the basis of spectral clustering.

Cheeger Inequality

The Fiedler value is related to the isoperimetric number (Cheeger constant) \(h(G)\):

$$\frac{\lambda_2}{2} \leq h(G) \leq \sqrt{2\lambda_2 d_{\max}}$$

where \(h(G) = \min_{S \subset V, |S| \leq n/2} \frac{|\partial S|}{|S|}\) is the minimum cut ratio. A large \(\lambda_2\) means the graph has no bottleneck and is well-connected everywhere.

3. Heat Diffusion on Networks

The heat equation on a graph models diffusion processes (e.g., information spread, traffic congestion propagation):

$$\frac{d\mathbf{u}}{dt} = -\mathbf{L}\mathbf{u}$$

where \(\mathbf{u}(t)\) is the vector of node values (temperature, density). The solution uses the spectral decomposition \(\mathbf{L} = \mathbf{V}\boldsymbol{\Lambda}\mathbf{V}^T\):

$$\mathbf{u}(t) = e^{-\mathbf{L}t}\mathbf{u}(0) = \sum_{k=1}^{n} e^{-\lambda_k t} (\mathbf{v}_k^T \mathbf{u}(0)) \mathbf{v}_k$$

The \(\lambda_1 = 0\) mode is the equilibrium (uniform distribution). The \(\lambda_2\) mode decays slowest, so the mixing time scales as:

$$t_{\text{mix}} \sim \frac{1}{\lambda_2}$$

For urban networks, this means that well-connected grids (large \(\lambda_2\)) equilibrate traffic quickly, while networks with bottlenecks (small \(\lambda_2\)) have persistent congestion gradients.

4. Effective Resistance as Accessibility

The effective resistance between nodes \(i\) and \(j\)is defined using the pseudoinverse of the Laplacian \(\mathbf{L}^+\):

$$R_{\text{eff}}(i, j) = (\mathbf{e}_i - \mathbf{e}_j)^T \mathbf{L}^+ (\mathbf{e}_i - \mathbf{e}_j) = L^+_{ii} + L^+_{jj} - 2L^+_{ij}$$

where \(\mathbf{e}_i\) is the \(i\)-th standard basis vector. In spectral form:

$$R_{\text{eff}}(i, j) = \sum_{k=2}^{n} \frac{(v_k(i) - v_k(j))^2}{\lambda_k}$$

The effective resistance is a true distance metric on the graph. Its urban interpretation: low resistance between two locations means they are well-connected by multiple paths. The total effective resistance (Kirchhoff index) is:

$$K_f(G) = \sum_{i < j} R_{\text{eff}}(i, j) = n \sum_{k=2}^{n} \frac{1}{\lambda_k}$$

5. Python: Laplacian Spectrum and Heat Diffusion

We compare the Laplacian spectra of a grid graph (regular city) and a random graph (irregular city), then simulate heat diffusion on both.

Spectral Analysis: Grid vs Random Graph

Python
script.py118 lines

Click Run to execute the Python code

Code will be executed with Python 3 on the server