• Tidak ada hasil yang ditemukan

Machine Learning with Graphs

N/A
N/A
Protected

Academic year: 2024

Membagikan "Machine Learning with Graphs"

Copied!
24
0
0

Teks penuh

(1)

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

(2)

Example: Node Classification

? ?

?

?

?

Machine Learning

(3)

Example: Node Classification

(4)

Example: Link Prediction

Machine Learning

?

?

?

x

(5)

Example: Link Prediction

?

Content recommendation is link prediction!

(6)

Feature Learning in Graphs

Goal:

Efficient feature learning for machine learning in networks!

vector node

𝑓: 𝑢 → ℝ𝑑

𝑑

feature representation, node embedding

u

(7)

Example: Feature Learning in Graphs

representation in feature space (node embedding) Graph input

(8)

Graph Laplacian (Spectral Graph Theory)

𝑳 = 𝑫 − 𝑾

(9)

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.

(10)

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 𝑓

(11)

Graphs and Graph Signals

𝒱 = 𝑣𝑖 𝑖 = 1, … , 𝑁}

ℰ = ℯ𝑖𝑗 𝑖, 𝑗 = 1, … , 𝑁}

𝒢 𝒱, ℰ = {𝒱, ℰ}

Graph Signal:

𝑁 × 1 vector for simplicity

= 𝑓 = 2 5 1. ..

6 4

𝑓1 𝑓2 𝑓3 𝑓4 𝑓5 𝑓6 𝑓7 𝑓

(12)

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

(13)

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

(14)

Laplacian Matrix as an Operator

Laplacian matrix is a difference operator:

𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇

(15)

Laplacian Matrix as an Operator

Laplacian matrix is a difference operator:

𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇

𝒊 = 𝑳𝒊 𝒇 = 𝑫𝒊 − 𝑨𝒊 𝒇 = 𝑫𝒊𝒇 − 𝑨𝒊𝒇

𝑨 𝑫

𝑓 = 𝑓1 𝑓2 ..

𝑓

(16)

Laplacian Matrix as an Operator

Laplacian matrix is a difference operator:

𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇

𝒊 = 𝑳𝒊 𝒇 = 𝑫𝒊 − 𝑨𝒊 𝒇 = 𝑫𝒊𝒇 − 𝑨𝒊𝒇

𝑨 𝑫

= 𝑫𝒊,𝒊𝑓𝒊 − 𝑨𝒊𝒇

𝑓 = 𝑓1 𝑓2 ..

𝑓

(17)

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 ..

𝑓

(18)

Laplacian Matrix as an Operator

Laplacian matrix is a difference operator:

𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇

𝑨 𝑫

𝒊 = ෍

𝒗𝒋∈𝓝(𝒗𝒊)

(𝑓𝒊 − 𝑓𝑗) meaning?

𝑓 = 𝑓1 𝑓2 ..

ℎ = 𝟒𝑓 − 𝑓 − 𝑓 − 𝑓 − 𝑓 𝑓

𝒊 = 𝑳𝒊 𝒇 = 𝑫𝒊 − 𝑨𝒊 𝒇 = 𝑫𝒊𝒇 − 𝑨𝒊𝒇

= 𝑫𝒊,𝒊𝑓𝒊 − 𝑨𝒊𝒇

(19)

Laplacian Matrix as an Operator

Laplacian matrix is a difference operator:

𝒉 = 𝑳𝒇 = 𝑫 − 𝑨 𝒇 = 𝑫𝒇 − 𝑨𝒇

𝑨 𝑫

meaning?

𝑓 = 𝑓1 𝑓2 ..

𝑓

𝒊 = ෍

𝒗𝒋∈𝓝(𝒗𝒊)

(𝑓𝒊 − 𝑓𝑗)

𝒊 = 𝑳𝒊 𝒇 = 𝑫𝒊 − 𝑨𝒊 𝒇 = 𝑫𝒊𝒇 − 𝑨𝒊𝒇

= 𝑫𝒊,𝒊𝑓𝒊 − 𝑨𝒊𝒇

= (𝑓

(20)

Laplacian Matrix as an Operator

Laplacian quadratic form:

𝑨 𝑫

𝒉 = 𝑳𝒇,𝑖 = ෍

𝒗𝒋∈𝓝(𝒗𝒊)

(𝑓𝑖 − 𝑓𝑗) 𝒇𝑻𝑳𝒇 = ෍

𝒊

𝑓𝑖𝑖 = ෍

𝒊

𝒗𝒋∈𝓝(𝒗𝒊)

𝑓𝑖(𝑓𝑖 − 𝑓𝑗)

𝑓 = 𝑓1 𝑓2 ..

𝑓

(21)

Laplacian Matrix as an Operator

Laplacian quadratic form: 𝑨

𝒉 = 𝑳𝒇,𝑖 = ෍

𝒗𝒋∈𝓝(𝒗𝒊)

(𝑓𝑖 − 𝑓𝑗) 𝒇𝑻𝑳𝒇 = ෍

𝒊

𝑓𝑖𝑖 = ෍

𝒊

𝒗𝒋∈𝓝(𝒗𝒊)

𝑓𝑖(𝑓𝑖 − 𝑓𝑗)

= 𝟏

𝟐 ෍

𝒊,𝒋

𝑨(𝒊, 𝒋)𝑓𝑖(𝑓𝑖 − 𝑓𝑗) + 𝟏

𝟐 ෍

𝒊,𝒋

𝑨(𝒋, 𝒊)𝑓𝑖(𝑓𝑖 − 𝑓𝑗)

(22)

Laplacian Matrix as an Operator

Laplacian quadratic form: 𝑨

𝒉 = 𝑳𝒇,𝑖 = ෍

𝒗𝒋∈𝓝(𝒗𝒊)

(𝑓𝑖 − 𝑓𝑗) 𝒇𝑻𝑳𝒇 = ෍

𝒊

𝑓𝑖𝑖 = ෍

𝒊

𝒗𝒋∈𝓝(𝒗𝒊)

𝑓𝑖(𝑓𝑖 − 𝑓𝑗)

= 𝟏

𝟐 ෍

𝒊,𝒋

𝑨(𝒊, 𝒋)𝑓𝑖(𝑓𝑖 − 𝑓𝑗) + 𝟏

𝟐 ෍

𝒊,𝒋

𝑨(𝒋, 𝒊)𝑓𝑖(𝑓𝑖 − 𝑓𝑗)

= 𝟏

𝟐 ෍

𝒊,𝒋

𝑨 𝒊, 𝒋 𝑓𝑖 𝑓𝑖 − 𝑓𝑗 − 𝟏

𝟐 ෍

𝒊,𝒋

𝑨(𝒊, 𝒋)𝑓𝑗(𝑓𝑖 − 𝑓𝑗)

(23)

Laplacian Matrix as an Operator

Laplacian quadratic form:

𝒉 = 𝑳𝒇,𝑖 = ෍ 𝑨

𝒗𝒋∈𝓝(𝒗𝒊)

(𝑓𝑖 − 𝑓𝑗) 𝒇𝑻𝑳𝒇 = ෍

𝒊

𝑓𝑖𝑖 = ෍

𝒊

𝒗𝒋∈𝓝(𝒗𝒊)

𝑓𝑖(𝑓𝑖 − 𝑓𝑗)

= 𝟏

𝟐 ෍

𝒊,𝒋

𝑨(𝒊, 𝒋)𝑓𝑖(𝑓𝑖 − 𝑓𝑗) + 𝟏

𝟐 ෍

𝒊,𝒋

𝑨(𝒋, 𝒊)𝑓𝑖(𝑓𝑖 − 𝑓𝑗)

= 𝟏

𝟐 ෍

𝒊,𝒋

𝑨 𝒊, 𝒋 𝑓𝑖 𝑓𝑖 − 𝑓𝑗 − 𝟏

𝟐 ෍

𝒊,𝒋

𝑨(𝒊, 𝒋)𝑓𝑗(𝑓𝑖 − 𝑓𝑗)

𝟏 𝟐

(24)

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

Gambar

Graph Laplacian (Spectral Graph Theory)
Graph Signal:
Graph Signal:

Referensi

Dokumen terkait

Research purpose in this research are : to know whether student ’ s Mathematical Representation Ability taught by using Cooperative Learning TPS type is higher

To train the supervised classifiers, we extract the ensemble of feature sets grouped into five different categories, including twitter specific features, textual

In the Spark standalone cluster, prior to Spark 1.4, the number of executors per worker node per application was limited to 1. However, we could increase the number of worker

In order to overcome this problem and enhance the state of the art in supervised learning, in this paper, we proposed a hybrid feature engineering method that will be used in ML