Revisit: Machine Learning with Graphs
Node classification (semi-supervised Learning)
Predict a type of a given node
Link prediction
Predict whether two nodes are linked
Community detection (node clustering, unsupervised learning)
Identify densely linked clusters of nodes
Network similarity
How similar are two (sub)networks
Ranking
Page ranking in Web
1 4
2 3
6 5 7
node edge
Example: Node Classification
? ?
?
?
?
Machine Learning
Example: Node Classification
Example: Link Prediction
Machine Learning
?
?
?
x
Example: Link Prediction
?
Content recommendation is link prediction!
Feature Learning in Graphs
Goal:
Efficient feature learning for machine learning in networks!
vector node
𝑓: 𝑢 → ℝ𝑑
ℝ𝑑
feature representation, node embedding
u
Example: Feature Learning in Graphs
representation in feature space (node embedding) Graph input
Graph Laplacian (Spectral Graph Theory)
𝑳 = 𝑫 − 𝑾
Graphs and Graph Signals
𝑣3
𝑣2
𝑣4
𝑣5 𝑣6
𝑣7 𝑣8 𝑣1
𝒱 = 𝑣𝑖 𝑖 = 1, … , 𝑁}
ℰ = ℯ𝑖𝑗 𝑖, 𝑗 = 1, … , 𝑁}
𝒢 𝒱, ℰ = {𝒱, ℰ}
AAAI 2020 Tutorial (Yao Ma, et al.): Spectral graph theory. American Mathematical Soc.; 1997.
Graphs and Graph Signals (Functions)
𝒱 = 𝑣𝑖 𝑖 = 1, … , 𝑁}
ℰ = ℯ𝑖𝑗 𝑖, 𝑗 = 1, … , 𝑁}
𝒢 𝒱, ℰ = {𝒱, ℰ}
Graph Signal:
= 𝑓 =
2 3 … 2
1 . . . 2
5 . . . 6
… 4 . . .
… 3
𝑁 × 𝑑 dim. Matrix 𝐺𝑁𝑁 input Matrix
𝑓1 𝑓2 𝑓3 𝑓4 𝑓5 𝑓6 𝑓
Graphs and Graph Signals
𝒱 = 𝑣𝑖 𝑖 = 1, … , 𝑁}
ℰ = ℯ𝑖𝑗 𝑖, 𝑗 = 1, … , 𝑁}
𝒢 𝒱, ℰ = {𝒱, ℰ}
Graph Signal:
𝑁 × 1 vector for simplicity
= 𝑓 = 2 5 1. ..
6 4
𝑓1 𝑓2 𝑓3 𝑓4 𝑓5 𝑓6 𝑓7 𝑓
Matrix Representations of Graphs
𝑣3
𝑣2
𝑣4
𝑣5 𝑣6
𝑣7 𝑣8 𝑣1
𝑨 =
Adjacency Matrix
Adjacency Matrix: 𝐴 𝑖, 𝑗 = 1 if 𝑣𝑖 is adjacent to 𝑣𝑗 𝐴 𝑖, 𝑗 = 0, otherwise
or Affinity Matrix
Matrix Representations of Graphs
𝑣3
𝑣2
𝑣4
𝑣5 𝑣6
𝑣7 𝑣8 𝑣1
− =
Adjacency Matrix
Degree Matrix Laplacian Matrix
Degree Matrix:
Adjacency Matrix: 𝐴 𝑖, 𝑗 = 1 if 𝑣𝑖 is adjacent to 𝑣𝑗 𝐴 𝑖, 𝑗 = 0, otherwise
Laplacian Matrix as an Operator
Laplacian matrix is a difference operator:
𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇
Laplacian Matrix as an Operator
Laplacian matrix is a difference operator:
𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇
ℎ𝒊 = 𝑳𝒊 𝒇 = 𝑫𝒊 − 𝑨𝒊 𝒇 = 𝑫𝒊𝒇 − 𝑨𝒊𝒇
𝑨 𝑫
𝑓 = 𝑓1 𝑓2 ..
𝑓
Laplacian Matrix as an Operator
Laplacian matrix is a difference operator:
𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇
ℎ𝒊 = 𝑳𝒊 𝒇 = 𝑫𝒊 − 𝑨𝒊 𝒇 = 𝑫𝒊𝒇 − 𝑨𝒊𝒇
𝑨 𝑫
= 𝑫𝒊,𝒊𝑓𝒊 − 𝑨𝒊𝒇
𝑓 = 𝑓1 𝑓2 ..
𝑓
Laplacian Matrix as an Operator
Laplacian matrix is a difference operator:
𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇
ℎ𝒊 = 𝑳𝒊 𝒇 = 𝑫𝒊 − 𝑨𝒊 𝒇 = 𝑫𝒊𝒇 − 𝑨𝒊𝒇
𝑨 𝑫
= 𝑫𝒊,𝒊𝑓𝒊 − 𝑨𝒊𝒇
ℎ6= 𝟒𝑓6 − 𝑓2 − 𝑓3 − 𝑓5 − 𝑓𝟕
= (𝑓6−𝑓2) + (𝑓6−𝑓3) + (𝑓6−𝑓5) + (𝑓6−𝑓𝟕)
𝑓 = 𝑓1 𝑓2 ..
𝑓
Laplacian Matrix as an Operator
Laplacian matrix is a difference operator:
𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇
𝑨 𝑫
ℎ𝒊 =
𝒗𝒋∈𝓝(𝒗𝒊)
(𝑓𝒊 − 𝑓𝑗) meaning?
𝑓 = 𝑓1 𝑓2 ..
ℎ = 𝟒𝑓 − 𝑓 − 𝑓 − 𝑓 − 𝑓 𝑓
ℎ𝒊 = 𝑳𝒊 𝒇 = 𝑫𝒊 − 𝑨𝒊 𝒇 = 𝑫𝒊𝒇 − 𝑨𝒊𝒇
= 𝑫𝒊,𝒊𝑓𝒊 − 𝑨𝒊𝒇
Laplacian Matrix as an Operator
Laplacian matrix is a difference operator:
𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇
𝑨 𝑫
meaning?
𝑓 = 𝑓1 𝑓2 ..
𝑓
ℎ𝒊 =
𝒗𝒋∈𝓝(𝒗𝒊)
(𝑓𝒊 − 𝑓𝑗)
ℎ𝒊 = 𝑳𝒊 𝒇 = 𝑫𝒊 − 𝑨𝒊 𝒇 = 𝑫𝒊𝒇 − 𝑨𝒊𝒇
= 𝑫𝒊,𝒊𝑓𝒊 − 𝑨𝒊𝒇
= (𝑓
Laplacian Matrix as an Operator
Laplacian quadratic form:
𝑨 𝑫
𝒉 = 𝑳𝒇, ℎ𝑖 =
𝒗𝒋∈𝓝(𝒗𝒊)
(𝑓𝑖 − 𝑓𝑗) 𝒇𝑻𝑳𝒇 =
𝒊
𝑓𝑖ℎ𝑖 =
𝒊
𝒗𝒋∈𝓝(𝒗𝒊)
𝑓𝑖(𝑓𝑖 − 𝑓𝑗)
𝑓 = 𝑓1 𝑓2 ..
𝑓
Laplacian Matrix as an Operator
Laplacian quadratic form: 𝑨
𝒉 = 𝑳𝒇, ℎ𝑖 =
𝒗𝒋∈𝓝(𝒗𝒊)
(𝑓𝑖 − 𝑓𝑗) 𝒇𝑻𝑳𝒇 =
𝒊
𝑓𝑖ℎ𝑖 =
𝒊
𝒗𝒋∈𝓝(𝒗𝒊)
𝑓𝑖(𝑓𝑖 − 𝑓𝑗)
= 𝟏
𝟐
𝒊,𝒋
𝑨(𝒊, 𝒋)𝑓𝑖(𝑓𝑖 − 𝑓𝑗) + 𝟏
𝟐
𝒊,𝒋
𝑨(𝒋, 𝒊)𝑓𝑖(𝑓𝑖 − 𝑓𝑗)
Laplacian Matrix as an Operator
Laplacian quadratic form: 𝑨
𝒉 = 𝑳𝒇, ℎ𝑖 =
𝒗𝒋∈𝓝(𝒗𝒊)
(𝑓𝑖 − 𝑓𝑗) 𝒇𝑻𝑳𝒇 =
𝒊
𝑓𝑖ℎ𝑖 =
𝒊
𝒗𝒋∈𝓝(𝒗𝒊)
𝑓𝑖(𝑓𝑖 − 𝑓𝑗)
= 𝟏
𝟐
𝒊,𝒋
𝑨(𝒊, 𝒋)𝑓𝑖(𝑓𝑖 − 𝑓𝑗) + 𝟏
𝟐
𝒊,𝒋
𝑨(𝒋, 𝒊)𝑓𝑖(𝑓𝑖 − 𝑓𝑗)
= 𝟏
𝟐
𝒊,𝒋
𝑨 𝒊, 𝒋 𝑓𝑖 𝑓𝑖 − 𝑓𝑗 − 𝟏
𝟐
𝒊,𝒋
𝑨(𝒊, 𝒋)𝑓𝑗(𝑓𝑖 − 𝑓𝑗)
Laplacian Matrix as an Operator
Laplacian quadratic form:
𝒉 = 𝑳𝒇, ℎ𝑖 = 𝑨
𝒗𝒋∈𝓝(𝒗𝒊)
(𝑓𝑖 − 𝑓𝑗) 𝒇𝑻𝑳𝒇 =
𝒊
𝑓𝑖ℎ𝑖 =
𝒊
𝒗𝒋∈𝓝(𝒗𝒊)
𝑓𝑖(𝑓𝑖 − 𝑓𝑗)
= 𝟏
𝟐
𝒊,𝒋
𝑨(𝒊, 𝒋)𝑓𝑖(𝑓𝑖 − 𝑓𝑗) + 𝟏
𝟐
𝒊,𝒋
𝑨(𝒋, 𝒊)𝑓𝑖(𝑓𝑖 − 𝑓𝑗)
= 𝟏
𝟐
𝒊,𝒋
𝑨 𝒊, 𝒋 𝑓𝑖 𝑓𝑖 − 𝑓𝑗 − 𝟏
𝟐
𝒊,𝒋
𝑨(𝒊, 𝒋)𝑓𝑗(𝑓𝑖 − 𝑓𝑗)
𝟏 𝟐
Summary: Laplacian Matrix as an Operator
Laplacian matrix is a difference operator:
𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇 𝒉(𝒊) =
𝒗𝒋∈𝓝(𝒗𝒊)
(𝑓𝑖 − 𝑓𝑗) Laplacian quadratic form:
𝒇𝑻𝑳𝒇 = 𝟏
𝟐
𝒊,𝒋
𝑨 𝒊, 𝒋 𝑓𝑖 − 𝑓𝑗 𝟐 It can represent
“Smoothness” or “Frequency” of the signal 𝑓
Low frequency graph signal