Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Omni-Prop: Seamless Node Classification on Arbitrary Label Correlation
1. Yuto Yamaguchi
University of Tsukuba
OMNI-Prop:
Seamless Node Classification on Arbitrary
Label Correlation
AAAI 2015
Hiroyuki Kitagawa
University of Tsukuba
Christos Faloutsos
Carnegie Mellon University
2. Background
– Given a partially labeled graph G=(V,E)
– Find correct label of unlabeled nodes
?
?
Node Classification
1
15. Label Propagation
Y(t)
=PT
Y(t−1)
● Iterative approach
until convergeupdate
4
A=
[AL L AL U
AU L AU U
] A'=
[I AL U
0 AU U
]
P=
[I PLU
0 PU U
] normalize on column
aggregation of in-edges
22. Related Work
● Label Propagation
● Random Walk with Restarts
● Belief Propagation
23. Random Walk with Restarts
● Main Idea
? = the most frequently encountered label
5
?start from , ends at labeled node
24. Random Walk with Restarts
● Main Idea
?start from , ends at labeled node
? = the most frequently encountered label
Y
(t)
=(1−c)PY
(t−1)
+cY
(0)
until converge
● Keep update
P=
[ I 0
PU L PU U
]
5
25. Random Walk with Restarts
● Main Idea
? = the most frequently encountered label
Y
(t)
=(1−c)PY
(t−1)
+cY
(0)
until converge
● Keep update
P=
[ I 0
PU L PU U
]
5
aggregation of out-edges
?start from , ends at labeled node
26. Related Work
● Label Propagation
● Random Walk with Restarts
● Belief Propagation
28. Belief Propagation
P(Y i )= ∑
Y j=lk , j≠i
P(Y 1,... ,Y n)
?
?
G
Homophily
from
to
0.10.9
0.90.1
6
29. Belief Propagation
P(Y i )= ∑
Y j=lk , j≠i
P(Y 1,... ,Y n)
?
?
G
Heterophily
from
to
0.90.1
0.10.9
6
30. Problem Formulation
● Node Classification
– Given a partially labeled graph
– Find correct label of unlabeled nodes
● Requirement
– works on mixed label correlation
G=(V , E)
of
7
31. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
?
8
32. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
?
8
33. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
?
8
34. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
?
8
35. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
?
8
36. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
8
37. ● Propagating two variables
si j = how likely node i has label j
ti j = how likely neighbors of node i has label j
● Output
– label of node i = argmax
j
(si j)
Algorithm
– until converge
9
38. Algorithm
● s-propagation (only for unlabeled nodes)
● t-propagation
sik
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
t jk
∑
i=1
N
Ai j si k +λbk
∑
i=1
N
Ai j+ λ
si, jt
t
t
t
ti, j
s
s
s
s
prior
10
39. Algorithm
● s-propagation (only for unlabeled nodes)
● t-propagation
sik
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
t jk
∑
i=1
N
Ai j si k +λbk
∑
i=1
N
Ai j+ λ
si, jt
t
t
t
ti, j
s
s
s
s
out-edge
10in-edge
40. Algorithm
● s-propagation (only for unlabeled nodes)
● t-propagation
sik
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
t jk
∑
i=1
N
Ai j si k +λbk
∑
i=1
N
Ai j+ λ
si, jt
t
t
t
ti, j
s
s
s
s
followee
10follower
follower-score
45. Analysis
● Time complexity
– at each iteration O(K(N +M ))
sik
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
● O(M) to get∀i ,sik
13
46. Analysis
● Time complexity
– at each iteration O(K(N +M ))
sik
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
● O(M) to get∀i ,sik
● O(N) to combined into a score
13
47. Analysis
● Time complexity
– at each iteration O(K(N +M ))
sik
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
● O(M) to get∀i ,sik
● O(N) to combined into a score
● O(K) ∀ k 13
57. Analysis
● Connection to Label Propagation
– LP is a special case of OMNI-Prop when λ=0
Y
(t)
=P
T
Y
(t−1)
● Keep update
until converge
1
2
3
G 3
2
S
3
1
2
T
1
16
58. Analysis
● Connection to Random Walk
– RWR is a special case of OMNI-Prop when λ=0
Y
(t)
=(1−c)PY
(t−1)
+cY
(0)
until converge
● Keep update
1
2
3
G 3
2
S
1
T
1
2
3
17
60. Experiment
● Q1 – Parameter
– How does parameter affect performance?
● Q2 – convergence
– How many iterations does OMNI-Prop need to
converge?
● Q3 – accuracy
– How accurate OMNI-Prop compared to LP and BP?
18
66. Yuto Yamaguchi
University of Tsukuba
OMNI-Prop:
Seamless Node Classification on Arbitrary
Label Correlation
AAAI 2015
Hiroyuki Kitagawa
University of Tsukuba
Christos Faloutsos
Carnegie Mellon University
69. Motivation
?
?
”every node has the same label correlation”
Existing Algorithms makes strong assumption
3
目前 node classification 的方法基本上都是 based on
label correlation 的假設
但他們的假設太強,要求 graph 上所有 node 都有相
同的 label correlation
70. Motivation
?
?
”every node has the same label correlation”
Existing Algorithms makes strong assumption
on real graph
3
但這不合理 比如舉剛剛的伴侶的例子 大部份人是異性
戀 但也存在同性 雙性戀阿 這會是個人選擇
所以目前 node classification 演算法在 real graph 上表
現不好 很大原因是因為假設太強
關於這個缺陷 甚至有 paper 特地分析 如果 label
correlation 假設不對的話 對 performance 有多少的
傷害
那這篇就是從根本解決這個缺點
71. Related Work
● Label Propagation
● Random Walk with Restarts
● Belief Propagation
他們是第 1 篇提出一個可以不假設 label correlation 做
node classification 的方法
下面這張表 summarize 了 node classification 中最主
流三種作法和 OMNI-Prop 的比較
LP,RWR 是 based on page rank 的演算法 所以很快
但只能用在所以 node 都是 homophily correlated 的
圖上
BP 能多用在 heterophily 的情況 但不能用在 mix 的情
況 而且在有 cycle 的圖 belief propagation 演算法不
保證會收斂 所以可能會跑很久
OMNI-Prop 不依賴 label correlation 所以在 label
correlation 混雜的圖上也表現地很好
而且和 LP,RWR 一樣是有保證會收斂的 iterative
algorithm 所以跑起來很快
72. Related Work
● Label Propagation
● Random Walk with Restarts
● Belief Propagation
73. Label Propagation
● Main Idea
min
Y
∑
k=1
K
Ai j(Yik−Y j k)
2
● Objective
such that Y L=YL
(0)
If nodes are near, their label should be similiar
4
LP 主要想法可以說是 KNN 他假設如果今天有兩個
node 在空間上很靠近 那他們的 label 就會很像 看
main idea 就知道假設整張圖都是 homophily
correlated
把 main idea 寫成 objective function 就是這樣: A 是
adjacency matrix 你也可以 generalize 成表示距離上
有多靠近的 weight matrix 愈靠近 weight 就愈大
Yik 表示第 i 個 node 是 label k 的機率
如果很靠近的 node 但 label 差很遠 那 penality 就會很
大 所以 minimize 這個 objective 找到的 label
assignment 就會讓愈近的 node label 愈像
唯一的 constraint 是本來就有 label 的 node 的 label
不能更改
重點來了 要怎麼解這個 objective function 你可以做微
分解連立方程 也可以用 iterative 方法
75. Label Propagation
Y
(t)
=P
T
Y
(t−1)
● Iterative approach
until convergeupdate
aggregation of in-edges
4
P 是 propagation matrix 是 第 i 個 row 第 j 個 column
表示 node i 走到 node j 的機率 每個 node i 更新時
會看所有可以走到他的其他 node 的 label
avg 起來 取機率最高的當作是這個 node 的 label
這就是 LP propagation 的方式
現在來看怎麼得到 P
76. Label Propagation
Y
(t)
=P
T
Y
(t−1)
● Iterative approach
until convergeupdate
4
A=
[AL L AL U
AU L AU U
]
aggregation of in-edges
假設 A 是 adjacency matrix 把 label node 放前面
unlabel node 放後面 A_LL 是 label node 到 label
node 的 sub-adjacency matrix
77. Label Propagation
Y
(t)
=P
T
Y
(t−1)
● Iterative approach
until convergeupdate
4
A=
[AL L AL U
AU L AU U
] A'=
[I AL U
0 AU U
]
aggregation of in-edges
根據 label propagtion 設計新的用來 propagate 的
adjacency matrix A'
78. Label Propagation
Y
(t)
=P
T
Y
(t−1)
● Iterative approach
until convergeupdate
4
A=
[AL L AL U
AU L AU U
] A'=
[I AL U
0 AU U
]
aggregation of in-edges
labeled nodes don't update
先來看有 label 的 node 根據 constraint 不能改變他
的 label 所以 in-edge 就只有他自己
79. Label Propagation
Y
(t)
=P
T
Y
(t−1)
● Iterative approach
until convergeupdate
4
A=
[AL L AL U
AU L AU U
] A'=
[I AL U
0 AU U
]
aggregation of in-edges
propagation
而 unlabeled 的 node 需要被 propagate 所以只要維
持不變 他就能被有 labeled 的 node propage 到
80. Label Propagation
Y
(t)
=P
T
Y
(t−1)
● Iterative approach
until convergeupdate
4
A=
[AL L AL U
AU L AU U
] A'=
[I AL U
0 AU U
]
P=
[I PLU
0 PU U
] normalize on column
aggregation of in-edges
因為 Y 是 label 的機率 所以把 A' 對 column 做
normalized 後 就得到了更新 Y 的 update matrix
再來說明為何更新時是用 P 的 transpose
因為我們更新一個 node 是收集他所有的 in-edge
可是 P 的 row 比如第 i 個 row 是 i 這個 node 的 out-
edge 但我們要的是 i 的 in-edge 所以你就把 P 做
transpose 就會收集到 i 的 in-edge 了
82. Label Propagation
?
?
P=
[I PLU
0 PU U
]
Y
(t)
=P
T
Y
(t−1)
● Iterative approach
until convergeupdate
?
?
G
Y
4
根據 P 可以畫出右邊這張圖 有 edge 表示 P 對應的那
個 element > 0
83. Label Propagation
?
?
P=
[I PLU
0 PU U
]
Y
(t)
=P
T
Y
(t−1)
● Iterative approach
until convergeupdate
?
?
G
Y
4
來看經過一次 iteration propagate 的情形 第一個 node
有 label 所以還是紅色
看第二個 node 他是 unlabeled node 所以會看所有能
走到他的 node 的 label
84. Label Propagation
?
?
P=
[I PLU
0 PU U
]
Y
(t)
=P
T
Y
(t−1)
● Iterative approach
until convergeupdate
?
?
G
Y
4
avg 後 機率最高的當他的 label 的話 更新成紅色
87. Related Work
● Label Propagation
● Random Walk with Restarts
● Belief Propagation
88. Random Walk with Restarts
● Main Idea
? = the most frequently encountered label
5
?start from , ends at labeled node
RWR 跟 LP 想法剛好互補 LP 從有 label 的 node 做更
新 RWR 是從 unlabeled node 做更新
Main idea 是這樣的 他從 unlabeled node 出發做
random walk 每次移動到一個 neighbor node 直到
移動到有 label 的 node
那為了讓他能走很多次 所以每次能移動的 node 除了
neighbor 外 也可以選擇回到出發點
就這樣走直到 converge 那 unlabeled node 的 label
就是在做 random walk 過程中最常碰到的 label
89. Random Walk with Restarts
● Main Idea
?start from , ends at labeled node
? = the most frequently encountered label
Y(t)
=(1−c)PY(t−1)
+cY(0)
until converge
● Keep update
P=
[ I 0
PU L PU U
]
5
每次移動可以選擇走到 neighbor 或原點上 c 是回原點
的機率 而 P 是跟 LP 很像的 update matrix
90. Random Walk with Restarts
● Main Idea
? = the most frequently encountered label
Y(t)
=(1−c)PY(t−1)
+cY(0)
until converge
● Keep update
P=
[ I 0
PU L PU U
]
5
aggregation of out-edges
?start from , ends at labeled node
只差在 RWR 更新 node 時會看他能走到的 node
所以 P 在設計時有 label 的 node 除了本身外沒有 out-
edge
91. Related Work
● Label Propagation
● Random Walk with Restarts
● Belief Propagation
他們是第 1 篇提出一個可以不假設 label correlation 做
node classification 的方法
下面這張表 summarize 了 node classification 中最主
流三種作法和 OMNI-Prop 的比較
LP,RWR 是 based on page rank 的演算法 所以很快
但只能用在所以 node 都是 homophily correlated 的
圖上
BP 能多用在 heterophily 的情況 但不能用在 mix 的情
況 而且在有 cycle 的圖 belief propagation 演算法不
保證會收斂 所以可能會跑很久
OMNI-Prop 不依賴 label correlation 所以在 label
correlation 混雜的圖上也表現地很好
而且和 LP,RWR 一樣是有保證會收斂的 iterative
algorithm 所以跑起來很快
92. Belief Propagation
P(Y i )= ∑
Y j=lk , j≠i
P(Y 1,... ,Y n)
?
?
G
6
一個 node 是哪種 label 的機率 比如說紅色 那方法就
是 marginal on joint probability
對於每一種 label 的組合 都可以算出一個 joint
probability 固定這個 node 是紅色 把其他 node 所有
組合 sum 起來 得到的就是這個 node 是紅色的機率
93. Belief Propagation
P(Y i )= ∑
Y j=lk , j≠i
P(Y 1,... ,Y n)
?
?
G
Homophily
from
to
0.10.9
0.90.1
6
所以就設計這張如果 neighbor 是紅色或藍色 那這個
node 是紅色或藍色的機率
94. Belief Propagation
P(Y i )= ∑
Y j=lk , j≠i
P(Y 1,... ,Y n)
?
?
G
Heterophily
from
to
0.90.1
0.10.9
6
95. Problem Formulation
● Node Classification
– Given a partially labeled graph
– Find correct label of unlabeled nodes
● Requirement
– works on mixed label correlation
G=(V , E)
of
7
講完 related work 問題來了
要怎麼設計新的能在 label correlation 是 homophily 和
heterophily mix 的關係的圖上做 classification 呢?
96. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
?
8
把 neighbor 有什麼 label 和 node 本身是什麼 label 之
間不要假設直接關聯
主要想法就是這一句話:如果你看到大部份 neighbor
都有相同的 label 那麼只說明剩下的 neighbor 很可
能也會有相同的 label
舉例來說
97. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
?
8
中間這個 node 的 3 個 neighbor 都是紅色 所以第 4 個
node 也會是紅色
那要怎麼決定中間這個 node 的 label 呢?
換位思考 對於這 4 個 neighbor 中間這個 node 是他的
neighbor
98. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
?
8
所以比如左上角這個 node 他的 neighbor 都是藍色
99. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
?
8
你會猜中間這個 node 是藍色 但你還有另外 3 個
neighbor
100. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
?
8
假設中間 node 的 neighbor 的 neighbor 都是紅色
101. Main Idea
● If most of neighbors of have same label,
→ so do the rest of neighbors
?
8
那中間這個 node 就該是紅色
102. ● Propagating two variables
si j = how likely node i has label j
ti j = how likely neighbors of node i has label j
● Output
– label of node i = argmax
j
(si j)
Algorithm
– until converge
9
為了把 neighbor 有什麼 label 和自己的 label 分開 使
用兩個變數
S 是 self score 表示 node 有第 j 個 label 的機率
T 是 neighbor score 表示 neighbor 有第 j 個 label 的
機率
設計如何更新這兩個變數 就能 iterative 的更新直到
converge
那每個 node 的 label 就是 self score 最高的那個 label
103. Algorithm
● s-propagation (only for unlabeled nodes)
● t-propagation
sik
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
t jk
∑
i=1
N
Ai j si k +λbk
∑
i=1
N
Ai j+ λ
si, jt
t
t
t
ti, j
s
s
s
s
prior
10
self socre 的更新會考慮所有 neighbor 的 neighbor
score
而 neighbor score 則考慮 neighbor 的 self score
至於加上 lambda 倍的 prior 原因是有些 node 沒有
neighbor 無法被 propagate 到 那解決方法就是讓他
們的 label 是預設的 prior 值
而 lambda 控制的是 prior 的強度
104. Algorithm
● s-propagation (only for unlabeled nodes)
● t-propagation
sik
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
t jk
∑
i=1
N
Ai j si k +λbk
∑
i=1
N
Ai j+ λ
si, jt
t
t
t
ti, j
s
s
s
s
out-edge
10in-edge
你們可能會想為何 self-score 是 aggregate on out-
edge 而 neighbor-socre 是 aggregate on in-edge
原因是多考慮有向圖 比如說 twitter 的 follower 和
followee 的關係
如果 a 有個 link 指向 b 表示 a follow b 的話
105. Algorithm
● s-propagation (only for unlabeled nodes)
● t-propagation
sik
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
t jk
∑
i=1
N
Ai j si k +λbk
∑
i=1
N
Ai j+ λ
si, jt
t
t
t
ti, j
s
s
s
s
followee
10follower
follower-score
那 t 收集的就是 follower 的 label 所以 t 是在算 follow
這個 node 的那些 node 的 label 簡稱 follower-
score
而 s 就該 aggregation on 那些被他 follow 的 node 的
follower score
被一個 node follow 的那些 node 就看 node 的 out-
edge
108. Analysis
● Time complexity
– at each iteration O(K(N +M ))
13
那現在來分析 演算法需要的時間 一次 iteration 需要的
時間 linear to #node+#edge
109. Analysis
● Time complexity
– at each iteration O(K(N +M ))
si k
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
13
s 和 t 複雜度類似 所以算 s 來說明
110. Analysis
● Time complexity
– at each iteration O(K(N +M ))
si k
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
● O(M) to get∀i ,sik
13
看一次圖上所有 edge 就可以知道 每個 node 有哪些
follower 能算出每個 node self score 的分子和分母
111. Analysis
● Time complexity
– at each iteration O(K(N +M ))
si k
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
● O(M) to get∀i ,sik
● O(N) to combined into a score
13
花 O(number of nodes) 的時間 把每個 node 分子分母
相除組合成 self-score
112. Analysis
● Time complexity
– at each iteration O(K(N +M ))
si k
∑
j=1
N
Ai jt jk +λbk
∑
j=1
N
Ai j+ λ
● O(M) to get∀i ,sik
● O(N) to combined into a score
● O(K) ∀ k 13
以上是一種 label 的 time complexity 我們有 K 種 那就
再 *K 不過 K 是定值 所以一次 iteration time
complexity linear to #node+#edge
113. Analysis
● Time complexity
– at each iteration
– if converges after h iteration
O(K(N +M ))
13
O(hK (N +M ))
假設演算法會 converge 的話 那整體複雜度就是再
*iteration 次數
O(iteration 次數 * 有幾種 Label*(node 數 +edge 數 ))
就是整個演算法的複雜度
那來看演算法是否會 converge
114. Analysis
● OMNI-Prop always converges if λ>0
14
先講結果 只要唯一的參數 那個用來控制 prior 強度的
lambda>0 就會 converge
證明方法很簡單
我們先來看經過一次 iteration 後 S 跟上個 iteration 的
S 有什麼關係
你就把 T 代入 S 中
115. Analysis
● OMNI-Prop always converges if λ>0
14
整理一下 先把 S 前面那一駝係數寫成考慮了所有
label 和 unlabel node 的形式 Q 再挑出想要的 就變
成前面兩項 而其他跟 S 無關的全部丟在第 3 項
122. Analysis
● Connection to Label Propagation
– LP is a special case of OMNI-Prop when λ=0
Y
(t)
=P
T
Y
(t−1)
● Keep update
until converge
1
2
3
G 3
2
S
3
1
2
T
1
16
OMNI-Prop 和 LP 前面提到都是 page rank like 的
iterative algorithm 那來講講他們之間的關聯 LP 是
OMNI-Prop 的 special case
可以由這張圖說明 主要想法是 LP 只算 self-score 而
OMNI-Prop 算兩個 score
那你就把 node 複製一份 原本那份維持原樣算 self-
score 新複製的那份的 score 算的是 neighbor score
所以 OMNI-Prop 可以 degerate 成 LP
123. Analysis
● Connection to Random Walk
– RWR is a special case of OMNI-Prop when λ=0
Y
(t)
=(1−c)PY
(t−1)
+cY
(0)
until converge
● Keep update
1
2
3
G 3
2
S
1
T
1
2
3
17
同理 當然也可以 degenerate 成 RWR