Вы находитесь на странице: 1из 22

Diffusion and random walks on graphs

Leonid E. Zhukov

School of Data Analysis and Artificial Intelligence


Department of Computer Science
National Research University Higher School of Economics

Structural Analysis and Visualization of Networks

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 1 / 22


Module 4

1 Diffusions and random walks on graphs


2 Epidemics on networks
3 Information flow
4 Diffusion of innovations
5 Social influence
6 Trust propagation
7 Segregation model on networks
8 Link prediction
9 Node labeling
10 Time evolution of networks

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 2 / 22


Lecture outline

1 Random walks on graph

2 Diffusion on graph
Diffusion equation
Laplace operator

3 Spectral graph theory


Normalized laplacian

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 3 / 22


Random walks on graph

A random walk on graph on graph G is a sequence of vertices


v0 , v1 , ...vt .., where each vt+1 is chosen to be a random neighbor of
vt , {vt , vt+1 } ∈ E (G ) and probability of the transition is given by

Pij = P(xt+1 = vj |xt = vi ),


P
where i Pij = 1, matrix P - row stochastic

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 4 / 22


Random walks on graph
2D grid (k=2 regular graph)

image from wikipedia.org


Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 5 / 22
Random walks on graph
We will be considering undirected connected unweighted graphs
Transition matrix

1/d(i) , if ∃ e(i, j), i and j adjacent,
Pij =
0 , otherwise
Using adjacency matrix
Aij
Pij = = Dii−1 Aij , where Dij = di δij
di
Let pi (t) - probability, that a walk is at node i at moment t
(probability distribution vector, value per node)
Random walk
X X pi (t)
pj (t + 1) = Pij pi (t) = Aij
di
i i
Matrix form
~p(t + 1) = ~p(t)P = ~p(t)(D−1 A)
Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 6 / 22
Random walks on graph

Starting from initial distribution ~p(0) after t steps

~p(t) = ~p(0)Pt

Random walk on connected non-bipartite graphs converges to limiting


distribution
lim ~p(t) = lim ~p(0)Pt = π
~
t→∞ t→∞

Limiting distribution = stationary distribution

lim ~p(t + 1) = lim ~p(t)P


t→∞ t→∞

~ =π
π ~P
Left eigenvalue corresponding to λ = 1

λ~ ~P
π=π

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 7 / 22


Random walks on graph

Random walk is reversible if

πi Pij = πj Pji

On undirected graph:
Aij Aji
πi = πj
di dj
πi πj
= = const
di dj
P
and i πi = 1
Stationary (stable) distribution

di di
πi = P =
j dj 2|E |

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 8 / 22


Random walks on graph

Lazy random walk

1 1 X pi (t)
pj (t + 1) = pj (t) + Aij
2 2 di
i

Matrix form
1
~p(t + 1) = ~p(t)(I + D−1 A)
2
Converges (always!) to the same stationary distribution

(2λ − 1)~ ~ (D−1 A)


π=π

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 9 / 22


Random walks on graph

Theorem
Let λ2 denote second largest eigenvalue of transition matrix P = D−1 A,
p(t) probability distribution vector and π stationary distribution. If walk
starts from the vertex i, pi (0) = 1, then after t steps for every vertex:
s
dj t
|pj (t) − πj | ≤ λ
di 2

For P = D−1 A, λ1 = 1, λ2 < 1


For P0 = 12 (I + D−1 A), λ02 = 21 (1 + λ2 )

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 10 / 22


Physics of Diffusion

Let Φ(r , t) -concentration


Fik’s Law
∂Φ
J = −C = −C ∇Φ
∂r
Continuity equation (conserved quantity)

∂Φ
+ ∇J = 0
∂t
Diffusion equation ( heat equation)

∂Φ(r , t)
= C ∆Φ(r , t)
∂t

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 11 / 22


Diffusion
Laplacian 2D
∂2f ∂2f
∆f = ∇2 f = +
∂x 2 ∂y 2
Discretized Laplacian in 2D

f (x + h, y ) + f (x − h, y ) + f (x, y + h) + f (x, y − h) − 4f (x, y )


∆f (x, y ) =
h2

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 12 / 22


Diffusion on network

Some substance that occupy vertices, on each time step diffuses out
φi (t) - quantity per node

X
φi (t + 1) = φi (t) + Aij (φj (t) − φi (t))C δt
j
dφi (t) X
= C Aij (φj (t) − φi (t))
dt
j

dφi X X X X
= C( Aij φj − Aij φi ) = C ( Aij φj −di φi ) = C (Aij −δij dj )φj
dt
j j j j

dφi X
= −C Lij φj
dt
j

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 13 / 22


Graph Laplacian

Graph Laplacian

Lij = dj δij − Aij = Dij − Aij , Dij = dj δij



 d(i) , if i = j,
Lij = −1 , if ∃ e(i, j) − i and j adjacent,
0 , otherwise

Matrix form
L=D−A

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 14 / 22


Diffusion on Graph
Diffusion equation

+ C Lφ = 0
dt
Eigenvector basis
Lvk = λvk
X
φ(t) = ak (t)vk , ak (t) = φ(t)T vk
k
ODE
X  dak (t) 
+ C λk ak (t) vk = 0
dt
k
dak (t)
+ C λk ak (t) = 0
dt

ak (t) = ak (0)e −C λk t
Solution X
φ(t) = ak (0)vk e −C λk t
Leonid E. Zhukov (HSE) k 11
Lecture 31.03.2015 15 / 22
Laplace matrix

L - symmetric positive semidefinite


X X 1X
φT Lφ = Lij φi φj = (di δij − Aij )φi φj = Aij (φi − φj )2
2
ij ij ij

Spectral properties
Lvi = λvi
real non-negative eigenvalues λi ≥ 0 and orthogonal eigenvectors vi
smallest eigenvalue always λ1 = 0 for v1 = e = [1, 1, 1...1]T

Le = (D − A)e = 0
Number of zero eigenvalues = number of connected components
In connected graph λ2 6= 0 - algebraic connectivity of a graph
(spectral gap), v2 - Fiedler vector

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 16 / 22


Diffusion on Graph

Solution X
φ(t) = ak (0)vk e −C λk t
k
all λi > 0 for i > 1, λ1 = 0:

lim φ(t) = a1 (0)v1


t→∞

Normalized solution v1 = √1 e
N

1 X
a1 (0) = φ(0)T v1 = √ φj (0)
N j

Steady state
1 X
lim φ(t) = ( φj (0))e = const
t→∞ N
j

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 17 / 22


Diffusion on Graph

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 18 / 22


Smoothing operator

Smoothing operator
X X 1 X
(Lφ)i = (Dij − Aij )φj = (di δij φj − Aij φj ) = di (φi − Aij φj )
di
j j j

Laplace equation ∇φ = 0, (Lφ)i = 0, solution - harmonic function

1 X
φi = Aij φj
di
j

Regression on graphs

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 19 / 22


Normalized Laplacian

Normalized Laplacian

L = D −1/2 LD −1/2

 1
 , if i = j,
√ 1
Lij = − , if ∃ e(i, j) − i and j adjacent,
 di dj
0 , otherwise

Connection to random walks:

P = D −1 A = D −1/2 (I − L)D 1/2

Similar matrices, share properties of represented linear operators, i.e.


eigenvalues: λmax (P) = 1, λ1 (L) = 0.

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 20 / 22


Normalized Laplacian

Conductance of a vertex set S


cut(S, V \S)
φ(S) =
min(vol(S), vol(V \S))
P
where vol(S) = i∈S ki - sum of all node degrees in the set

Cheeger’s inequality
p
λ2 (L)/2 ≤ min φ(S) ≤ 2λ2 (L)
S

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 21 / 22


References

Chung, Fan R.K. (1997). Spectral graph theory (2ed.). Providence,


RI: American Math. Soc.
Daniel A. Spielman. Spectral Graph theory. Combinatorial Scientific
Computing. Chapman and Hall/CRC Press. 2011
Lovasz, L. (1993). Random walks on graphs: a survey. In
Combinatorics, Paul Erdos is eighty (pp. 353 – 397). Budapest:
Janos Bolyai Math. Soc.

Leonid E. Zhukov (HSE) Lecture 11 31.03.2015 22 / 22

Вам также может понравиться