Skip to main content
\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)
Mathematics LibreTexts

18.2: Diffusion on Networks

  • Page ID
    7879
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    Many important dynamical network models can be formulated as a linear dynamical system. The first example is the diffusion equation on a network that we discussed in Chapter 16:

    \[\frac{dc}{dt} =-\alpha{Lc} \label{(18.5)}\]
    This is a continuous-time version, but you can also write a discrete-time equivalent. As we discussed before, \(L = D−A\) is the Laplacian matrix of the network. It is a symmetric matrix in which diagonal components are all non-negative (representing node degrees) while other components are all non-positive. This matrix has some interesting, useful dynamical properties:

    A Laplacian matrix of an undirected network has the following properties:

    1. At least one of its eigenvalues is zero.
    2. All the other eigenvalues are either zero or positive.
    3. The number of its zero eigenvalues corresponds to the number of connected components in the network.
    4. If the network is connected, the dominant eigenvector is a homogeneity vector \(h = (1 1 ...1)^{T}\)a.
    5. The smallest non-zero eigenvalue is called the spectral gap of the network, which determines how quickly the diffusion takes place on the network.

    aEven if the network is not connected, you can still take the homogeneity vector as one of the bases of its dominant eigenspace.

    The first property is easy to show, because \(Lh = (D −A)h = d−d = 0\), where \(d\) is the vector made of node degrees. This means that \(h\) can be taken as the eigenvector that corresponds to eigenvalue 0. The second property comes from the fact that the Laplacian matrix is positive-semidefinite, because it can be obtained by \(L = M^{T}M\) where \(M\) is the signed incidence matrix of the network (not detailed in this textbook).

    To understand the rest of the properties, we need to consider how to interpret the eigenvalues of the Laplacian matrix. The actual coefficient matrix of the diffusion equation is \(−αL\), and its eigenvalues are \({−αλ_i}\), where \({λ_i}\) are \(L\)’s eigenvalues. According to the first two properties discussed above, the coefficient matrix of the equation has at least one eigenvalue 0, and all the eigenvalues are 0 or negative. This means that the zero eigenvalue is actually the dominant one in this case, and its corresponding dominant eigenvector (\(h\), or eigenspace, if the network is not connected) will tell us the asymptotic state of the network.

    Let’s review the other properties. The third property arises intuitively because, if the network is made of multiple connected components, each of those components behaves as a separate network and shows diffusion independently, converging to a different asymptotic value, and therefore, the asymptotic state of the whole network should have as many degrees of freedom as the connected components. This requires that the dominant eigenspace have as many dimensions, which is why there should be as many degenerate dominant eigenvalue 0’s as the connected components in the network. The fourth property can be derived by combining this with the argument on property 1 above.

    And finally, the spectral gap. It is so called because the list of eigenvalues of a matrix is called a matrix spectrum in mathematics. The spectral gap is the smallest non-zero eigenvalue of \(L\), which corresponds to the largest non-zero eigenvalue of \(−αL\) and thus to the mode of the network state that shows the slowest exponential decay over time. Ifthe spectral gap is close to zero, this decay takes a very long time, resulting in slow diffusion. Or if the spectral gap is far above zero, the decay occurs quickly, and so does the diffusion. In this sense, the spectral gap of the Laplacian matrix captures some topological aspects of the network, i.e., how well the nodes are connected to each other from a dynamical viewpoint. The spectral gap of a connected graph (or, the second smallest eigenvalue of a Laplacian matrix in general) is called the algebraic connectivity of a network.

    Here is how to obtain a Laplacian matrix and a spectral gap in NetworkX:

    Code 18.1pt1.PNG

    Code 18.1pt 2.PNG

    So, the spectral gap (= algebraic connectivity in this case) of the Karate Club graph is about 0.4685. This value doesn’t tell us much about the speed of the diffusion on that network. We will need to compare spectral gaps between different network topologies.

    Exercise \(\PageIndex{1}\)

    Randomize the topology of the Karate Club graph several times and measure their spectral gaps. Compare the result with the original value obtained above and discuss what it means in terms of the speed of diffusion.

    Exercise \(\PageIndex{2}\)

    Generate the following network topologies with comparable size and density:

    • random graph

    • barbell graph

    • ring-shaped graph (i.e., degree-2 regular graph)

    Measure their spectral gaps and see how topologies quantitatively affect the speed of diffusion.