# Laplacianoid

## Introduction

After experimenting with using a graph's Laplacian on its own adjacency matrix in a straightforward way, I found that it was doing the blurring operation I want on the tail end of each graph edge, but not on the head ends. I designed a new operation that works on both ends of each edge.

I call this double operation "Laplacianoid" because it's made of two Laplacian operations, not one:

$\mathscr{L}(\mathbf{x})\mathbf{y}=\mathbf{L_{o}}(\mathbf{x})\mathbf{y}+\mathbf{y}\mathbf{L_{i}}(\mathbf{x})$,

that is,

$(-\mathscr{L}(\mathbf{x})\mathbf{y})_{{ij}}=\sum _{k}\left[x_{{ik}}(y_{{kj}}-y_{{ij}})+(y_{{ik}}-y_{{ij}})x_{{kj}}\right]$.

Note $\mathscr{L}(\mathbf{x})\mathbf{y}$ is not a product of two matrices; it's the operation of linear operator $\mathscr{L}(\mathbf{x})$ on matrix $\mathbf{y}$. Given an $n\times n$ matrix $\mathbf{x}$, $\mathscr{L}(\mathbf{x})$ is a linear operator on the space of $n\times n$ matrices. If both $\mathbf{x}$ and $\mathbf{y}$ are symmetric, then $\mathscr{L}(\mathbf{x})\mathbf{y}$ is also symmetric.

## Laplacianoid ODE

Note: I am also studying a stochastic process based on the Laplacianoid operation: see Laplacian Experiments/Stochastic for the analysis of that process.

The ODE

$\dot{\mathbf{e}}=-\mathscr{L}(\mathbf{e})\mathbf{e}$,

i.e.,

$\dot{e}_{{ij}}=\sum _{k}\left[e_{{ik}}(e_{{kj}}-e_{{ij}})+(e_{{ik}}-e_{{ij}})e_{{kj}}\right]$
$=\sum _{k}\left[2e_{{ik}}e_{{kj}}-(e_{{ik}}+e_{{kj}})e_{{ij}}\right]$

does what I want much better than the one-sided operations like $\mathbf{L}(\mathbf{e})\mathbf{e}$.

Simulation indicates that this tends to equilibrium at a multiple of the complete graph, that is at

$e_{{ij}}=k$ for all $i,j$.

Other equilibria include disconnected complete subgraphs, i.e. let the set of vertices $V$ be the union of disjoint $V_{s}$, and

$e_{{ij}}=k_{s}$ for $\{ i,j\}\subseteq V_{s}$, $0$ otherwise.

In either of these cases $e_{{ik}}(e_{{kj}}-e_{{ij}})$ and $e_{{kj}}(e_{{ik}}-e_{{ij}})$ are both zero for all $i,j,k$.

Q: Are there other equilibria? Which are stable?

## Linear algebra of ℒ

Let's assume that $\mathbf{e}$ is symmetric here (or equivalently, that the graph is undirected), so that $\mathbf{L_{o}}(\mathbf{e})=\mathbf{L_{i}}(\mathbf{e})=\mathbf{L}(\mathbf{e})$. Since $\mathscr{L}(\mathbf{e})$ is a linear operator on the $n^{2}$-dimensional space of $n\times n$ matrices, it has $n^{2}$ eigenvalues, and an eigenmatrix (rather than eigenvector) for each. If $\mathbf{v}_{i}$ are the eigenvectors of $\mathbf{L}(\mathbf{e})$ with eigenvalues $\lambda _{i}$, the eigenmatrices of $\mathscr{L}(\mathbf{e})$ are $\mathbf{x}_{{ij}}=\mathbf{v}_{i}\mathbf{v}^{{\mathrm{T}}}_{j}$ with eigenvalues $\lambda _{{ij}}=\lambda _{i}+\lambda _{j}$:

$\mathscr{L}(\mathbf{e})\mathbf{x}_{{ij}}=\mathbf{L}(\mathbf{e})\mathbf{x}_{{ij}}+\mathbf{x}_{{ij}}\mathbf{L}(\mathbf{e})$
$=(\lambda _{i}+\lambda _{j})\mathbf{x}_{{ij}}$.

When $\mathbf{e}$ is symmetric, $\mathbf{L}(\mathbf{e})$ has nonnegative eigenvalues, so the only zero eigenvalues of $\mathscr{L}(\mathbf{e})$ come from zero eigenvalues of $\mathbf{L}(\mathbf{e})$. If $\mathbf{e}$ is connected, the only zero eigenvector of the Laplacian is the vector of all ones, $\mathbf{1}$, so the only zero eigenmatrix of $\mathscr{L}(\mathbf{e})$ is $\mathbf{1}\text{ }\mathbf{1}^{{\mathrm{T}}}$.

If the graph is not connected, it's a union of disjoint subgraphs $G_{1},\ldots,G_{k}$ with adjacency matrices $\mathbf{e}_{1},\ldots,\mathbf{e}_{k}$ with $\mathbf{e}=\mathbf{e}_{1}+\cdots+\mathbf{e}_{k}$. The null space of $\mathbf{L}(\mathbf{e})$ contains $k$ orthogonal eigenvectors $\mathbf{v}_{i}$ with $(\mathbf{v}_{i})_{j}=1\text{ if vertex }j\text{ is part of subgraph }i\text{, }0\text{ otherwise}$. It follows that the nullspace of $\mathscr{L}(\mathbf{e})$ is $k^{2}$-dimensional and the corresponding eigenmatrices are constructed from pairs of these $\mathbf{v}_{i}$ as above.

We know already that $\sum _{{i,j}}(\mathbf{L_{o}}(\mathbf{e})\mathbf{e})_{{ij}}=0$ because it's zero for each $j$ provided $\mathbf{e}$ is symmetric, and $\sum _{{i,j}}(\mathbf{e}\mathbf{L_{i}}(\mathbf{e}))_{{ij}}=0$ by the same process on each $i$, so in the $\mathscr{L}$ ODE the sum of all edge weights is conserved. If the equilibrium matrix $\mathbf{e}(\infty)$ is connected, then, it must be that $\mathbf{e}(\infty)=\frac{\sum _{{i,j}}e_{{ij}}(0)}{n^{2}}\mathbf{1}\text{ }\mathbf{1}^{{\mathrm{T}}}$.

It seems like it ought to be straightforward to show that if $\mathbf{e}$ is connected at time 0, it stays connected.

It's sometimes helpful to write the regular Laplacian of a graph $\mathbf{e}$ in the form

$-\mathbf{L}(\mathbf{e})_{{ij}}=e_{{ij}}-\sum _{k}e_{{ik}}\delta _{{ij}}$

where $\delta _{{ij}}$ is $1$ when $i=j$ and $0$ otherwise. The corresponding expression for the Laplacianoid is

$-\mathscr{L}(\mathbf{e})_{{ij,k\ell}}=e_{{ik}}\delta _{{\ell j}}+e_{{\ell j}}\delta _{{ik}}-\sum _{p}(e_{{ip}}+e_{{pj}})\delta _{{ik}}\delta _{{\ell j}}$.

This can be plugged in to give us the Laplacianoid operation we know:

\begin{aligned}\displaystyle(-\mathscr{L}(\mathbf{e})\mathbf{x})_{{ij}}&\displaystyle=\sum _{{k\ell}}-\mathscr{L}(\mathbf{e})_{{ij,k\ell}}x_{{k\ell}}\\&\displaystyle=\sum _{k}e_{{ik}}x_{{kj}}+\sum _{{\ell}}e_{{\ell j}}x_{{i\ell}}-\sum _{p}(e_{{ip}}+e_{{pj}})x_{{ij}}\end{aligned}

In this way we can think of the Laplacianoid as a sort of hypermatrix - an object with four indices that operates on matrices the way a matrix operates on vectors.

### The Jacobian of the dynamics

To assess the stability of the ODE's equilibria, we need to look at its Jacobian. Since

$\dot{e}_{{ij}}=\sum _{k}\left[2e_{{ik}}e_{{kj}}-(e_{{ik}}+e_{{kj}})e_{{ij}}\right]$,

we have

$\frac{\partial\dot{e}_{{ij}}}{\partial e_{{ij}}}=2e_{{ii}}+2e_{{jj}}-2e_{{ij}}-\sum _{k}(e_{{ik}}+e_{{kj}})$,
$\frac{\partial\dot{e}_{{ij}}}{\partial e_{{i\ell}}}=2e_{{\ell j}}-e_{{ij}}$,
$\frac{\partial\dot{e}_{{ij}}}{\partial e_{{kj}}}=2e_{{ik}}-e_{{ij}}$,
$\frac{\partial\dot{e}_{{ij}}}{\partial e_{{k\ell}}}=0$.

We can encapsulate this by writing (for all $k,\ell$)

$\frac{\partial\dot{e}_{{ij}}}{\partial e_{{k\ell}}}=(2e_{{\ell j}}-e_{{ij}})\delta _{{ik}}+(2e_{{ik}}-e_{{ij}})\delta _{{\ell j}}-\sum _{p}(e_{{ip}}+e_{{pj}})\delta _{{ik}}\delta _{{\ell j}}.$

As with a regular vector dynamical system, if $\mathbf{e}^{*}$ is an equilibrium, a point near the equilibrium $\mathbf{e}=\mathbf{e}^{*}+\mathbf{x}$ has derivative $\dot{e}_{{ij}}=\dot{x}_{{ij}}\approx\sum _{{k,\ell}}\frac{\partial\dot{e}_{{ij}}}{\partial e_{{k\ell}}}x_{{k\ell}}$, and we want to know if there is any such $\mathbf{x}$ that grows rather than shrinking. 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 $\mathbf{e}^{*}$ is hyperbolically stable if and only if all the eigenvalues of the Jacobian are negative.

So let's look at the quadratic form associated with the Jacobian, because if we can show that the quadratic form is never positive (that is, if it's 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 $\mathbf{x}$. The quadratic form is

$\displaystyle Q(\mathbf{x})=\sum _{{i,j,k,\ell}}x_{{ij}}\frac{\partial\dot{e}_{{ij}}}{\partial e_{{k\ell}}}x_{{k\ell}}$

and for symmetric $\mathbf{x}$,

$\displaystyle Q(\mathbf{x})=\sum _{{a,b,c}}e_{{ab}}\left(4x_{{ac}}x_{{bc}}-x_{{ab}}x_{{ac}}-x_{{ab}}x_{{bc}}-x_{{ac}}^{2}-x_{{bc}}^{2}\right)$

This does not seem to be negative semidefinite necessarily, and it seems like it might have positive values at at least some equilibrium values of $\mathbf{e}^{*}$.

Let's investigate the complete-graph equilibrium, since I think it ought to be stable. In this case

$\displaystyle Q(\mathbf{x})=\sum _{{a,b,c}}k\left(-(x_{{ac}}-x_{{bc}})^{2}-x_{{ac}}(x_{{ab}}-x_{{bc}})-x_{{bc}}(x_{{ab}}-x_{{ac}})\right)$

but since we are considering only symmetric $\mathbf{x}$, we can write

$\displaystyle\sum _{{a,b,c}}x_{{ac}}(x_{{ab}}-x_{{bc}})=\sum _{{a,b,c}}x_{{ac}}x_{{ab}}-\sum _{{a,b,c}}x_{{ac}}x_{{bc}}$

this works for the third term of the above expression as well as for the second, so we conclude that

$\displaystyle Q(\mathbf{x})=-k\sum _{{a,b,c}}(x_{{ac}}-x_{{bc}})^{2},$

and so it is negative semidefinite. $Q(\mathbf{x})$ is zero when $x_{{ac}}=x_{{bc}}$ for all $a,b,c$; for symmetric $\mathbf{x}$ this condition implies that all entries of $\mathbf{x}$ are equal: $x_{{ij}}=x_{{\ell~{}j}}=x_{{j\ell}}=x_{{k\ell}}$. These are the zero eigenmatrices of the Jacobian, and all other eigenvalues are negative.

Consequently this $\mathbf{e}^{*}$ is a hyperbolically stable fixed point, except that it's neutral to the addition of a constant to all entries of the matrix. The dynamics conserves the sum of all matrix entries, so in fact it's entirely stable.

Now when $\mathbf{e}^{*}$ is made of disjoint cliques, it's different:

$\displaystyle Q(\mathbf{x})=\sum _{s}\sum _{{a,b\in V_{s},c\in V}}k_{s}\left(-(x_{{ac}}-x_{{bc}})^{2}-x_{{ac}}(x_{{ab}}-x_{{bc}})-x_{{bc}}(x_{{ab}}-x_{{ac}})\right)$

If $\mathbf{x}$ has an edge $x_{{ij}}>0$ from one clique to another, we can have a positive term at $(a,b,c)=(i,i,j)$.

The linearized system is

$\displaystyle\dot{x}_{{ij}}=\sum _{{k,\ell}}\frac{\partial\dot{e}_{{ij}}}{\partial e_{{k\ell}}}x_{{k\ell}}$

and for this $\mathbf{e}^{*}$ this has two cases: if $i$ and $j$ are in the same $V_{s}$, i.e. if $e_{{ij}}>0$,

$\displaystyle\dot{x}_{{ij}}=\sum _{{\ell\in V_{s}}}k_{s}x_{{i\ell}}-\sum _{{\ell\not\in V_{s}}}k_{s}x_{{i\ell}}+\sum _{{k\in V_{s}}}k_{s}x_{{kj}}-\sum _{{k\not\in V_{s}}}k_{s}x_{{kj}}-\sum _{{p\in V_{s}}}2k_{s}x_{{ij}}$
$\displaystyle\dot{x}_{{ij}}=\sum _{{\ell\in V_{t}}}2k_{t}x_{{i\ell}}+\sum _{{k\in V_{s}}}2k_{s}x_{{kj}}-\sum _{{p\in V_{s}}}k_{s}x_{{ij}}-\sum _{{p\in V_{t}}}k_{t}x_{{ij}}$

I wish to construct an eigenmatrix with a positive eigenvalue, that is $\dot{\mathbf{x}}=\lambda\mathbf{x}$ with $\lambda>0$. This will demonstrate that the union of multiple disjoint cliques is not a stable equilibrium.

#### A positive eigenmatrix

Given an equilibrium matrix $\mathbf{e}^{*}$ made of multiple disjoint cliques, let us choose two distinct cliques $V_{s}$ and $V_{t}$, and let $x_{{ij}}=0$ except that $x_{{ij}}$ is $z$ for every edge connecting $V_{s}$ and $V_{t}$, $u$ for every edge within $V_{s}$ and $v$ for every edge within $V_{t}$.

Then for an edge from $V_{s}$ to $V_{t}$

$\displaystyle\dot{x}_{{ij}}=(|V_{s}|k_{s}+|V_{t}|k_{t})z,$
$\displaystyle\dot{x}_{{ij}}=(|V_{t}|k_{t}+|V_{s}|k_{s})z,$

while for an edge within $V_{s}$

$\displaystyle\dot{x}_{{ij}}=-|V_{t}|k_{s}z$
$\displaystyle\dot{x}_{{ij}}=-|V_{s}|k_{t}z.$

For all other edges $\dot{x}_{{ij}}=0$.

So if this is going to be an eigenmatrix we must have

$\lambda=|V_{s}|k_{s}+|V_{t}|k_{t}$;

and given this we require

$-|V_{t}|k_{s}z=\lambda u$

and

$-|V_{s}|k_{t}z=\lambda v$,

so we simply set $u=-|V_{t}|k_{s}z/\lambda$ and $v=-|V_{s}|k_{t}z/\lambda$, and there it is!

(Note that $\mathbf{x}$ is not a graph's adjacency matrix itself, it's a perturbation to $\mathbf{e}^{*}$, so it's fine for it to have negative entries. It adds weight to edges that are zero, and subtracts from edges that are positive.)

## A corrected Laplacianoid

Here's a variation on the Laplacianoid, with a correction term so that it does the same thing but doesn't create loops, i.e. nonzero $e_{{ii}}$. The Laplacanoid equation does, because of lots of terms like $\dot{e}_{{11}}=\cdots+e_{{12}}e_{{21}}+\cdots$. So to remove those:

$(\mathscr{L}_{c}(\mathbf{x})\mathbf{y})_{{ij}}=\begin{cases}0&\text{ if }i=j\\ \sum _{k}\left[x_{{ik}}(y_{{kj}}-y_{{ij}})+(y_{{ik}}-y_{{ij}})x_{{kj}}\right]+2x_{{ij}}y_{{ij}}&\text{ otherwise}.\end{cases}$

This should be a lot like the uncorrected Laplacianoid, preserving symmetry of $\mathbf{y}$, and

$\dot{\mathbf{e}}=-\mathscr{L}_{c}(\mathbf{e})\mathbf{e}$

should conserve the sum of edge weights, and hopefully will go to all edges equal, but with no loops.

This is also a linear operator. I haven't done any simulations or analysis on it yet...