2025-01-27 graphs lecture 2

Data

2025-01-27

See [[School/Archived/Equivariant Machine Learning/course_PDFs/Lecture 2.pdf]]

Today

Housekeeping

  • Scribing sign-up sheet, choose whichever lecture you want by Wednesday
  • A few lectures cancelled

Last time

  • [[graph]]s
  • [[graph signals]]/data with graphs
  • [[network diffusion process]]/ the way we can process data
  • general definition of graph diffusion with graph shift operators

Today

1. [[Graph Signals and Graph Signal Processing]]

1.1 Interpretation of the (left)/directed [[graph laplacian]]

We begin with an example

Example

2025-01-27_graph0.png
Consider a 5-cycle digraph with some signal x. We can think of this as a periodic signal x sampled at 5 discrete time intervals.

  • For an n-cycle digraph, we can think of the graph as a periodic signal sampled at n discrete time intervals

Recall the definition of the [[adjacency matrix]]:

Adjacency Matrix

Aij={W(j,i) if (j,i)E0 otherwise

the adjacency matrix for the 5-cycle digraph is $$A = \begin{bmatrix}
0 & 0 & 0 & 0 & w \
w & 0 & 0 & 0 & 0 \
0 & w & 0 & 0 & 0 \
0 & 0 & w & 0 & 0 \
0 & 0 & 0 & w & 0
\end{bmatrix}$$
The (left) laplacian is

L=DoutA=diag(A1)A=[w000www0000ww0000ww0000ww]

Let w=1Δt. Then x=[x1,x2,x3,x4,x5] is sampled with period Δt. Let z=Lx. Then

zi={1Δt(xixi1),zi51Δt(x1x5),i=5
Question

What does this definition of zi remind us of?

Answer

This looks like the [[derivative]] of a function x(t) (!!!)

Interpretation of the (left) Graph Laplacian

The [[graph laplacian]] generalizes differentiation to arbitrary graphs.

1.2 Interpretation for the normalized symmetric laplacian

Similar to the [[graph laplacian]], we can build an interpretation for the normalized symmetric laplacian.

Symmetric Laplacian

The symmetric laplacian using the symmetrized adjacency matrix

(see [[symmetric laplacian]])

We will see that the (normalized) [[symmetric laplacian]] generalizes the idea of [[total variation energy]] for [[graph signals]].

Total Variation Energy

The total variation energy of discrete-time signals is defined as

TV(x)=i|xixi1|

This is a good proxy for the signal frequency (and in fact can be used to estimate it)

Example

2024-01-27_graph1.jpg
The example on the left with longer period has lower TV. The example on the right with shorter period has higher

High TV -> high frequency
Low TV -> low frequency

see also [[total variation distance]]

(see [[total variation energy]])

We first start with our interpretation of signals on digraphs as discrete time periodic data.

Claim

The laplacian kernel.
ie. Let G be an n-cycle digraph signal. Let L be the symmetric laplacian of G. Then

TV(x)=xTLx=x,xL
Proof

xTLx=xT(Lx)=x,Lx

For a di-graph on n nodes, this becomes

(x1xn)2+(x2x1)2+(x3x2)2++(xnxn1)2=i(xixi1)2=TV(x)
Example (using our 5-cycle digraph)

2025-01-27_graph2.jpg

Interpretation of the Laplacian Inner Product

TV(x)=xTLx generalizes the notion of [[total variation energy]] (and thus of signal frequency) to arbitrary graphs.

(see [[interpretation of the symmetric graph laplacian]])

General method for getting our interpretations:

  1. Recognizing that can represent time signals as cycle graphs ->
  2. Dy using the definitions of notions of differentiation and TVE/inner product, we can recover the classical definitions in this setting
  3. We then carry these interpretations to arbitrary graphs.
Question

What if the signal frequency is higher than the number of nodes graph?

Answer

This is addressed in signal processing by the nyquist-shannon theorem. The gist is that we need the sampling period to be small enough to meaningfully capture the signal. And, for periodic signals, we can calculate this explicitly.

1.3 Building to the graph fourier transform 😀

Recall for (now arbitrary) signal on graph G we have TV(x)=xTLx. Suppose ||x||L=1

Question

What are the lowest and highest values TV(x) can take?

Answer

Let λ1,λ2,,λn be the eigenvalues of L, ordered by increasing value.

  • Note that L1=0 and L is positive semidefinite λ1=0 and this is the minimum value for TV(x)
  • The highest value TV(x) can take is λn
Exercise

Show the symmetrized laplacian is positive semidefinite

Important

The TVE gives us a range of values for the frequency of the signal of the graph.

  • The eigenvalues are the graph's canonical frequencies
  • the eigenvectors are the oscillation modes of those frequencies.
Tip

From now on, we will assume that the laplacian is the symmetrized version.

Example

Now, let's consider the 4 digraph. Then

L=[2101121001211012]

2025-01-27_graph3.jpg

Since L is symmetric, it is always diagonalizable (see why). As we saw above, λ1=0 and its corresponding eigenvector is 1. Thus, the eigenvector will be some multiple of 1

For the example above,
λ1=0,v1=[12,12,12,12]
λ2=2,v2=[22,0,22,0]
λ3=2,v3=[0,22,0,22]
λ4=4,v4=[12,12,12,12]

--- start-multi-column

number of columns: 2  
Shadow: off
Border: on
Column Spacing: 0

We can visualize these vectors as (discrete) time signals, where each of the nodes of the graphs correspond to the sampled locations.

What do we notice?

--- end-column ---

2025-01-27_graph4.jpg

--- end-multi-column

An arbitrary graph is an algebraic extension of a cyclic graph. We can think of a general graph as a discrete sampling of some underlying data manifold.

Notes

Since L=VΛVT and V is orthogonal, its columns/the eigenvectors (or oscillation modes) form a basis for Rn

  • ie, we can represent any graph signal x in this basis

More generally, this is true not just for the laplacian (which is symmetric and thus always diagonalizable), but for any diagonalizable graph shift operator S.

Example

(recall that a matrix is diagonalizable if it has all distinct eigenvalues)

Graph Fourier Transform

Given a signal x, the projection of x onto V is called the graph fourier transform of x. ie,

FS(x)=x^=Vx,x^Rn

and x^i=vixi=vi,x (where vi is the ith column of V)

(see [[graph fourier transform]])

Example

Back to our 5 cycle example. Let's define a diagonalizable operator as follows:

  • The eigenvalues are the complex exponentials λj=exp{i2π5(j1)}
  • The eigenvectors are given by the fourier basis, ie V is given by
Vjk=exp{i2π5(j1)(k1)}

The GFT here is then

x^k=15n=04xn+1exp{i2π5(nk)}

And for general cyclical graphs on N nodes:

x^k=1Nn=0N1xn+1exp{i2πN(nk)}

And this is precisely the definition of the discrete Fourier transform(!!) ie, we can recover the classical definition for the (discrete) Fourier transform using our definition for the graph version.

Main Takeaway

The Fourier Transform in euclidian space into graph signal space.

Notes

  • In general, the interpretation of the adjacency eigenvalues as graph frequencies is not as clean as it is for the laplacian.

    • The eigenvectors of A and L do not generally match, and there is no alternative definition in terms of A.
  • In practice, it is generally true that low-magnitude adjacency eigenvalues correspond to high graph frequencies and vice versa.

  • When considering the normalized adjacency matrix and the normalized laplacian, it is easy to see that the eigenvectors are the same.

    • But in this case, the adjacency eigenvalues can NOT be interpreted as graph frequencies.