Laplacian Paper
From Worden
Manuscript from the Laplacian Clustering project.
The material is here:
- Laplacianoid - definition of the Laplacianoid and analysis of the Laplacianoid ODE
- Laplacian Experiments/Laplacianoid ODEs - numerical exploration of the Laplacianoid ODE
- Laplacian Experiments/Stochastic - the fully stochastic Laplacianoid process
- Laplacian Paper/Figures - specific code for the figures for this paper
Following some discussion on Google+ about this manuscript, I am considering alternative names.
- Mega-Laplacian? Meta-Laplacian? Double Laplacian? Diplacian? Dilaplacian?
- (I have looked into defining an operation on the graph Laplacian matrix rather than on the adjacency matrix, which would make it more of a meta-Laplacian, but it didn't seem to work so well.)
- Laplacienne?
- Maybe I'll have a naming contest after the draft is more written...
Some things that probably won't make it into the paper:
- Analysis for directed graphs (I've done a fair bit of this, but there are fewer results)
- Laplacian deformation of continuous metric spaces (I haven't done this but would like to)
- Is there a Laplacian-derived measure of clustering
... after it's written, consider making a presentation of it as sequential art?
Reflexive graph operations for clustering
Abstract.
We use a graph’s Laplacian operator in a symmetrical way to transform the graph’s own structure, analogous to the use of the graph Laplacian operator in diffusion of a quantity along graph edges, and the use of the 2-D discrete Laplacian in image blurring. We look at the ability of this “matrix Laplacian” operation to add local clustering to a graph in three ways: by inducing continuous changes in the adjacency matrix, and interpreting it as a weighted graph; by making continuous changes in the adjacency matrix and interpreting it as a matrix of edge-presence probabilities; and by inducing discrete changes in the adjacency matrix using a stochastic process.
1 Introduction
In many disciplines there is a need to generate random graphs, in order to study how outcomes depend on graph structure, from dynamics of ecological food webs to spread of behaviors on social networks, the impact of contact network structure on disease transmission, behavior of networks of metabolic pathways, or search algorithms on the worldwide web. Exactly what aspects of a graph’s structure are salient can be a vexing question, and while degree distribution is the most often considered measure, clustering coefficient, degree assortativity, mean path lengths, and other graph characteristics can have a significant impact on outcomes as well.
High clustering coefficients are common to many measured real-world networks from various disciplines [], and highly clustered networks can have significantly different dynamical characteristics from otherwise similar graphs []. There are two popular methods for generating graphs with desired degree distributions and clustering coefficients, edge swapping techniques [] and exponential random graph models [], both of which are effective but computationally demanding and mathematically complex. In this paper we introduce a novel method of generating graphs with a desired clustering coefficient, which has the potential to be simpler though it may turn out to be less flexible. The process we introduce may turn out to have theoretical interest as well, because of its close relationship to the graph Laplacian operator, and the way in which it opens up the general subject of applying linear operations directly to graph structures.
The Laplacian operator originates in the study of the heat equation, in which it describes the temperature difference between any point and its surroundings, which drives the flow of heat from warmer to cooler locations. It is useful in describing diffusion of any number of quantities, from liquids and gases to crowds of random walkers, across any of a variety of spaces, Euclidean and nonlinear, continuous and discrete. The discrete Laplacian, on a lattice, approximates the continuous Laplacian on , and is used in numerical approximations to PDEs and image processing. In image processing, Laplacian operations are used to add blurring to pixelated images, and in feature detection and image sharpening. The more general graph Laplacian, on arbitrary graph structures rather than lattices, can be used to model heat, random walks, and other diffusion processes on graphs.
In this paper we investigate the possibility of using a graph’s Laplacian reflexively on the structure of the graph itself, as a potential way of adding clustering to an existing graph. By analogy to blurring of an image, or diffusion of heat or random walkers across a graph, we use the Laplacian to make the graph’s edges themselves diffuse to neighboring locations, adding triangles and higher-order polygons where they were previously not. Once the properties of this operation are well understood, it may be useful for generating graphs with a desired combination of degrees and clustering. It may also have other unforeseen applications.
1.1 Laplacian diffusion of graph edges
Consider a graph with adjacency matrix , so that is 1 if there is an arc from vertex to vertex , and 0 otherwise. Let be a vector recording the temperature, or other diffusing quantity, at each vertex of . Then the values of flow across arcs of the graph, from higher to lower concentrations:
This is equivalent to writing
where is the Laplacian operator associated with . The Laplacian is a linear operator, so its action can be written as multiplication by a matrix11Note that this matrix is distinct from the graph Laplacian matrix associated with , which for traditional reasons is generally taken to be the negative of this matrix. Here we are concerned with the Laplacian operator and its matrix representation.:
This operator implements diffusion of a quantity across the graph . For instance, if initially is concentrated at one vertex, with and at all other vertices, under the influence of this diffusion dynamics the concentration at vertices neighboring will become positive, and the concentration at will decrease, until ultimately it has spread to all vertices reachable from .
To apply a similar dynamic to the structure of itself, where initially there is an edge connecting vertex to vertex , we would like that connectedness to “spill over” to neighboring locations, so that neighbors of become connected to , and becomes connected to neighbors of . The th column of records which edges are connected to vertex , so naively one might like to make this happen by applying the Laplacian directly to the matrix , which is equivalent to operating on each of its columns in just the same way as to :
or
In this system, if initially there is a connection from vertex to , with , and for other , this “concentration” of connectedness will diffuse to neighbors of , making for those and .
However, this operation has the drawback that it makes no connections to neighbors of : it only operates on arrow tails, leaving arrow heads alone. To make it operate symmetrically, it’s necessary to operate on both the rows and columns of , that is, to operate on the matrix from both the left and the right:
This double application of the graph Laplacian is a linear operator that acts on square matrices, rather than on the vectors on which the Laplacian acts. We may call this the graph’s matrix Laplacian operator, : using this notation we can rewrite the above equation as
For any square matrix the matrix Laplacian of is a linear operator on the space of matrices of the same size as :
or
where is the “out-degree Laplacian,” with vertices’ out degrees on the diagonal (equal to the defined above), and is the corresponding in-degree Laplacian:
This operation “diffuses” any nonzero edge to neighbors of both and . Note that the notation refers only to application of a linear operator , not to matrix multiplication.
The matrix Laplacian is a linear operator that preserves nonnegativity and symmetry of its matrix arguments, that is, when both and represent undirected graphs, the result does as well. The above matrix Laplacian differential equation transforms unweighted graphs — those with adjacency matrices containing only 0 and 1 — into weighted graphs whose adjacency matrix entries are real numbers in .
We study what the reflexive matrix Laplacian operation does to a graph’s structure over time, in three ways. First we use the above ordinary differential equation as is, which produces a continuously changing weighted graph. We consider the properties of this weighted graph itself, and then look at two ways of producing unweighted graphs from it. Then we turn to a stochastic process on unweighted graphs that is constructed from the same reflexive Laplacian operation on the graph’s adjacency matrix, and give the same consideration to the effects of this process on the graph’s structure.
In what follows, all the graph measures we use are defined in terms of the graph’s adjacency matrix, for mathematical clarity. Given adjacency matrix for graph , we define the density of as , where is the number of vertices in the graph and the indices of summation range from 1 to . This is equal to the standard measure of density, with loops — edges from a vertex to itself — included. Transitivity is defined as
that is, the proportion of all the paths of length two whose transitive edge is present in the graph. This is equivalent to the conventional clustering coefficient for undirected graphs,
except that it explicitly counts triangles and 2-paths that include loops, and can be used on directed graphs. The matrix Laplacian operations tend to create loops, so this formulation seems appropriate, in addition to being simple to compute in terms of an adjacency matrix.
2 Methods
2.1 Deterministic diffusion of weighted graph edges
To begin with, we will describe the behavior of the matrix ordinary differential equation
| (1) |
As we will see, this ODE is well-behaved in that when edge weights are contained in the interval , they remain in that interval, and in that undirected graphs remain undirected, that is, the space of symmetric matrices is an invariant region of the dynamics. The behavior of this system is straightforward and instructive.
2.2 Generation of unweighted graphs by Bernoulli sampling
The above differential equation defines a continuous-time process in which the weights of the graph’s edges, which are initially all either 1 or 0, become smoothly changing real values between 0 and 1. It is often desirable to generate graphs with unweighted edges, and one way to do this is to construe the weighted edges generated by the ODE as probabilities, and create unweighted random graphs by defining each edge to be a Bernoulli random variable (independent of the other edges) with the probability given by its counterpart in the weighted graph. As we will see, this process can be used to generate graphs with nontrivial clustering, but it does not seem to be as powerful as the fully stochastic process we describe next.
2.3 Stochastic diffusion of unweighted graph edges
After examining the above differential equation, which produces smoothly varying graph edge weights, we turn to a closely related model, in which edge weights are only 0 and 1, and flip on and off stochastically, at rates given by the graph’s matrix Laplacian applied reflexively.
We define this model by converting the above ODE’s rate of change
to an average rate of change. When all matrix entries are 0 or 1, this quantity can be seen to be nonnegative when is 0, and nonpositive when is 1. Therefore we can simply consider a stochastic model in which each adjacency matrix entry flips its state from 0 to 1 or vice versa at rate . We restrict this operation to undirected graphs by changing symmetric pairs of matrix entries as a unit.
We will show that the absorbing states of this model satisfy the same conditions as the equilibria of the ODE: all the edges among any given triangle of vertices must be equal — either all zero or all one — implying a union of disjoint cliques. Unlike the ODE, this system can and often does come to rest at a disconnected graph. Whether connected or not, of course, this clique structure maximizes transitivity.
3 Results
3.1 Deterministic diffusion of weighted graph edges
In the matrix differential equation (1), given an initial graph that connects all the graph’s vertices, the initial graph gradually transforms into one in which all possible edges are present with equal weight, and the total weight is equal to the total weight of the initial graph’s edges. First the transitive edges implied by the initial graph’s edges begin to appear, then the transitive edges generated by those, and so on, until the entire transitive closure of the graph is visible, and finally the edge weights all equalize. See below for a mathematical analysis of this process.
![]() | ![]() | ![]() |
3.1.1 Linear algebra of
is a linear operator on the -dimensional space of matrices, , and has eigenvalues and the same number of linearly independent eigenmatrices (rather than eigenvectors). If , are the eigenvectors of with eigenvalues , the eigenmatrices of are the matrices , with eigenvalues :
When is symmetric, its matrix Laplacian operator maps symmetric matrices to symmetric matrices, so that it can also be considered as a linear operator on , the -dimensional space of symmetric matrices. The eigenmatrices of this restricted Laplacian operator are the symmetrized combinations of the above matrices, .
In this section we consider only symmetric (equivalently, assume that the graph is undirected), so that is also symmetric.
When is symmetric, has nonnegative eigenvalues, so the only zero eigenvalues of come from adding zero eigenvalues of . If the graph is connected, the only null vector of the Laplacian is the vector of all ones, , so the only null matrix of is .
If the graph is not connected, then it is a union of disjoint subgraphs with adjacency matrices , with . The nullspace of contains orthogonal eigenvectors with if vertex is part of subgraph , otherwise. It follows that the nullspace of in is -dimensional and spanned by the eigenmatrices constructed by these nullvectors. The nullspace of in is the restriction of the above nullspace to , the span of the symmetric combinations of nullvectors.
It is sometimes helpful to write the Laplacian operator of a graph in matrix form,
where is when and otherwise. The corresponding expression for the matrix Laplacian is
This can be used directly to express the matrix Laplacian operation:
In this way we can think of the matrix Laplacian as a sort of hypermatrix — an object with four indices that operates on matrices the way a matrix operates on vectors. This notation will be useful in working with the Jacobian of the matrix Laplacian dynamics, below.
3.1.2 Equilibria of the matrix Laplacian differential equation
The differential equation , i.e.,
describes a square matrix whose entries change continuously, or equivalently, a weighted graph changing continuously in time on a fixed set of vertices. Equilibria of this system are matrices corresponding to particular graph structures. Simulation shows that given a starting graph that is connected, this system tends to relax to a matrix in which for all , that is, to a graph whose edge weights are all equal. Analysis reveals that the full set of equilibria is a bit larger.
An equilibrium solution of the ODE (1) is a matrix that is in the nullspace of its own matrix Laplacian. This provides the general symmetric equilibrium solution of (1): it is a matrix which on the one hand corresponds to an undirected graph partitioned into one or more disjoint subgraphs , and on the other hand can be expressed as a linear combination of the basis matrices of the nullspace of its own matrix Laplacian,
where and range over the nullvectors of the Laplacian of , as above. For to be partitioned, we must have when . Thus an equilibrium graph is a linear combination of disjoint complete graphs,
The entry of this matrix is
where is the indicator function for membership of vertex in subgraph . This gives us an -dimensional linear space of equilibrium solutions.
However, we can show that (1) conserves the sum of all edge weights, given that is symmetric:
Therefore the total edge weight at equilibrium must be the same as in the initial graph. This reduces the space of attainable equilibria to dimensions.
Also, as mentioned above, when all the matrix entries (edge weights) are in , it follows directly that when and when , which is sufficient to guarantee that entries remain within for all future times, including at equilibrium.
3.1.3 Stability of equilibria
To assess the stability of the ODE’s equilibria, we need to look at its Jacobian. Since
we have
and for and ,
We can encapsulate this by writing (for all )
As with a regular vector dynamical system, if is an equilibrium, at a point near the equilibrium the derivative is approximated by the linearization, , and we want to know if there is any such that grows rather than shrinking. Of course, this really is a regular vector dynamical system, notwithstanding the fact that the state variables are written in a square rather than a column, so all the linear theory applies, including the fact that is hyperbolically stable if and only if all the eigenvalues of the Jacobian are negative.
We analyze the eigenvalues by examining the quadratic form associated with the Jacobian, because if we can show that the quadratic form is never positive (that is, if it is a negative definite or negative semidefinite form) we can conclude that the eigenvalues of the Jacobian are all negative or non-positive. Because the ODE is restricted to symmetric matrices as long as the initial value is symmetric, we can restrict ourselves to the action of the Jacobian on symmetric perturbations . The quadratic form is
and for symmetric ,
Near the connected equilibrium,
but since we are considering only symmetric , we can write
and the third term of the above expression cancels in the same way as the second, leaving us with
which shows that is negative semidefinite. is zero when for all ; for symmetric this condition implies that all entries of are equal: . These are the eigenmatrices of the Jacobian corresponding to a zero eigenvalue, and all its other eigenvalues are negative.
Consequently this is a hyperbolically stable fixed point, except that it is neutral to the addition of a constant to all entries of the matrix. The ODE conserves the sum of all matrix entries, so in fact this fixed point is hyperbolically stable.
When is made of disjoint cliques, the result is different:
If has an edge from one clique to another, we can have a positive term at .
The linearized system is
and for this this has two cases: if and are in the same , i.e. if ,
and if and (),
We wish to construct an eigenmatrix with a positive eigenvalue, that is, a symmetric matrix such that with . This will demonstrate that a union of multiple disjoint cliques is not a stable equilibrium.
3.1.4 A positive eigenmatrix
Given an equilibrium matrix made of multiple disjoint cliques, let us choose two distinct cliques and , and let except that is for every edge connecting and (and vice versa), for every edge within and for every edge within .
Then for an edge from to
and the value is the same for an edge from to , while for an edge within
and within
For all other edges .
So for this to be an eigenmatrix we must have
We can satisfy these equalities by setting
and given this we set and , and the matrix is fully determined for any choice of .
Notice that the sum of all entries of is
confirming that the growth of takes place within the invariant manifold of matrices with sum of entries conserved.
(Note that is not itself a graph’s adjacency matrix, it is a perturbation to , so it can have negative entries. It adds weight to edges that are zero, and subtracts from edges that are positive.)
3.2 Generation of unweighted graphs by Bernoulli sampling
Figures 3–7 present the results of taking the real-valued edge weights given by the matrix Laplacian differential equation as probabilities for randomly sampled edges. In the early stages of the ODE system’s evolution, this sampling indeed adds structure to the graph, producing configurations that are similar to the initial graph but have nonzero transitivity. Later, however, the transitivity declines. This is not mysterious when one considers that in the final state of the ODE, all edge weights are equal. This implies that the final state of the random sampling process is an Erdős-Rényi random graph, which is known to have vanishing transitivity when the graph’s size is large relative to its average degree.
![]() | ![]() | ![]() |
3.3 Stochastic diffusion of unweighted graph edges
The stochastic matrix Laplacian system is defined by a Poisson rate of change for each possible graph edge :
| (2) | ||||
At that rate, each edge is added if it is not present and removed if it is present. Given an undirected graph, corresponding to a symmetric matrix , this rate is a symmetric function of and , so it does not matter in which order they are considered.
If edge is present, the signed rate of change is negative or zero, and if the edge is not present this rate is positive or zero. As a consequence, the instantaneous expected change in any given matrix entry corresponds to the matrix Laplacian differential equation:
It follows that the number of edges is a martingale:
and consequently the graph density is also a martingale.
This process’s absorbing states are the equilibria of the ODE, complete graphs and unions of disjoint complete graphs. These are graphs with transitivity of 1, and in simulations (e.g., figures 8, 9, and 10) the transitivity tends to increase quickly from 0 and approach 1 asymptotically.
It follows from the martingale that the graph’s initial density is an upper bound on the probability of ending at a single complete graph:
4 Discussion
The stochastic operation can probably be used for a short time to produce a graph that has a moderate amount of clustering and looks something like the original graph. The laplacian operation distorts the degree distribution (you can’t really see in the figures, but it adds a whole lot of zero-degree vertices), but maybe it’s possible to “tune” the transitivity and degree distribution at the same time?
These procedures may be useful for someone. Or they may inspire other useful ideas. Maybe the general idea of linear operations on entire graphs is a productive one. Maybe it’s worth generalizing from graphs to other metric spaces…
Some readers might wonder what these changes do to the spectrum of the graph’s Laplacian as the graph changes?
My main question right now is what does this manuscript need before I upload it to arXiv. I also want to send it to a journal, but that’ll be a month or more from now. I think i need to improve the intro, and add more citations, and obviously I need to say something reasonable here in the conclusions. I would also like to write something more about the stochastic process, and the figures should probably be improved and discussed more. What do you think?
5 Acknowledgements
[To do: Mention funding here.]
Supplemental material, including the source code for the above experiments and further unpublished results, is available at the first author’s online open lab notebook [1].
References
-
Reflexive Laplacian operations on graphs,Lee Worden Research Wiki.Note: \hrefhttp://lalashan.mcmaster.ca/theobio/worden/index.php/Laplacian_Paperhttp://lalashan.mcmaster.ca/theobio/worden/index.php/Laplacian_PaperCited by: 5.








