DeepWalk: Online Learning of
Social Representations
Bryan Perozzi, Rami Al-Rfou, Steven Skiena
ACM SIG-KDD 2014
1
Outline
• Introduction: Graphs as Features
• Language Modeling
• DeepWalk
• Evaluation: Network Classification
• Conclusions & Future Work
2
Introduction
• Deep Learning을 이용해 graph의 인접 행렬의
latent representation(social relations-> vector
space)을 학습함
3
Introduction
• 소셜 네트워크(커뮤니티) 상의 유저간의
상호작용을 vector space에서 표현하여 학습
모델에 적용
4
Zachary’s Karate Network
Language modeling
• Corpus 안에서 특정 word
sequence가 얼마나 나오는지
• 문서상에서 word의 latent
representation을
학습함(word co-occurrence):
– word2vec:
• 단어의 semantic한 의미를
나타낼 수 있다
5
From language modeling to graphs
• 자연어 corpus에서 단어의
빈도가 power law를 따른다
• scale-free graph의 Random
walk에서 vertex frequency
역시 power law를 따른다
6
From language modeling to graphs
• 각각의 random walk는 한
문장을 나타낸다
• Short random walks =
sentences
7
Framework
8
Random Walks
1. 각각의 vertex(root)에서 𝛾 개의 random
walks 를 생성한다
2. 각 random walk의 길이는 𝑡 이다
3. vertex의 이웃들로부터 다음으로 방문할
vertex를 선택한다(uniformly sample)
9
Framework
10
Representation Mapping
• 𝑣1 을 representation
vector에 mapping한다
-> Φ(𝑣1)
• 이웃 vertex들을 vector
space상에 mapping한다.
11
Maximize: Pr 𝑣3 Φ 𝑣1
Pr 𝑣5 Φ 𝑣1
Skip-gram model
12
한 문장에서 window size (w) 내에 등장하는
단어들의 동시 발생 확률을 최대화하는
언어 모델
Φ(𝑉1)
Maximize: Pr 𝑣3 Φ 𝑣1
Pr 𝑣5 Φ 𝑣1
Framework
13
Hierarchical Softmax
• Pr 𝑣3 Φ 𝑣1 을 계산하는 데에는 vertex의
수 만큼의 operation이 필요하다 -> 𝑂(𝑉)
14
• vertex를 binary tree에 표현
• Pr 𝑣3 Φ 𝑣1 를
최대화한다 = root에서
node까지 가는 path의 발생
확률을 최대화한다
• 𝑪 𝟏, 𝑪 𝟐, 𝑪 𝟑는 logistic binary
classifier
• 따라서, 𝑂(𝑉) -> 𝑂 log 𝑉
Learning
• Learned parameters:
– Vertex representations
– Tree binary classifiers weights
• vertex representation은 먼저 random하게
초기화한다.
• 𝑪 𝟏, 𝑪 𝟐, 𝑪 𝟑와 같은 classifier가 loss function을
계산한다
• Stochastic Gradient Descent(SGD) 를 이용해
parameter를 동시에 update한다.
15
Framework
16
Experiments
• Node Classification
– graph의 node중 일부만 label을 가지고 있을 때,
label이 없는 node들을 예측한다
• DataSet
– BlogCatalog
– Flickr
– YouTube
• Baselines
– SpectralClustering, MaxModularity, EdgeCluster(k-
means), weighted vote Relational Neighbor(wvRN)
17
Results: BlogCatalog
• DeepWalk 는 label이 있는 node가 적은 data에서도 잘
동작한다
18
Results: Youtube
• Scalable on very large graph!
19
Parallelization
• 모델 학습 과정에서 parameter를 공유하지
않으므로 각 부분을 병렬처리해도 성능에 영향을
주지 않는다
20
Conclusions
• Network로 표현되는 데이터를 continuous
vector space 상에서 표현하여 학습이
가능하다.
• Word sequence들을 graph로 표현하여
language model에 사용 가능하다.
• label이 부족한 경우에도 잘 작동하다.
• 큰 graph에도 Scalable하기 때문에 online
learning에 사용 가능하다
21
Thank you!
Q & A
22

DeepWalk: Online Learning of Social Representations

  • 1.
    DeepWalk: Online Learningof Social Representations Bryan Perozzi, Rami Al-Rfou, Steven Skiena ACM SIG-KDD 2014 1
  • 2.
    Outline • Introduction: Graphsas Features • Language Modeling • DeepWalk • Evaluation: Network Classification • Conclusions & Future Work 2
  • 3.
    Introduction • Deep Learning을이용해 graph의 인접 행렬의 latent representation(social relations-> vector space)을 학습함 3
  • 4.
    Introduction • 소셜 네트워크(커뮤니티)상의 유저간의 상호작용을 vector space에서 표현하여 학습 모델에 적용 4 Zachary’s Karate Network
  • 5.
    Language modeling • Corpus안에서 특정 word sequence가 얼마나 나오는지 • 문서상에서 word의 latent representation을 학습함(word co-occurrence): – word2vec: • 단어의 semantic한 의미를 나타낼 수 있다 5
  • 6.
    From language modelingto graphs • 자연어 corpus에서 단어의 빈도가 power law를 따른다 • scale-free graph의 Random walk에서 vertex frequency 역시 power law를 따른다 6
  • 7.
    From language modelingto graphs • 각각의 random walk는 한 문장을 나타낸다 • Short random walks = sentences 7
  • 8.
  • 9.
    Random Walks 1. 각각의vertex(root)에서 𝛾 개의 random walks 를 생성한다 2. 각 random walk의 길이는 𝑡 이다 3. vertex의 이웃들로부터 다음으로 방문할 vertex를 선택한다(uniformly sample) 9
  • 10.
  • 11.
    Representation Mapping • 𝑣1을 representation vector에 mapping한다 -> Φ(𝑣1) • 이웃 vertex들을 vector space상에 mapping한다. 11 Maximize: Pr 𝑣3 Φ 𝑣1 Pr 𝑣5 Φ 𝑣1
  • 12.
    Skip-gram model 12 한 문장에서window size (w) 내에 등장하는 단어들의 동시 발생 확률을 최대화하는 언어 모델 Φ(𝑉1) Maximize: Pr 𝑣3 Φ 𝑣1 Pr 𝑣5 Φ 𝑣1
  • 13.
  • 14.
    Hierarchical Softmax • Pr𝑣3 Φ 𝑣1 을 계산하는 데에는 vertex의 수 만큼의 operation이 필요하다 -> 𝑂(𝑉) 14 • vertex를 binary tree에 표현 • Pr 𝑣3 Φ 𝑣1 를 최대화한다 = root에서 node까지 가는 path의 발생 확률을 최대화한다 • 𝑪 𝟏, 𝑪 𝟐, 𝑪 𝟑는 logistic binary classifier • 따라서, 𝑂(𝑉) -> 𝑂 log 𝑉
  • 15.
    Learning • Learned parameters: –Vertex representations – Tree binary classifiers weights • vertex representation은 먼저 random하게 초기화한다. • 𝑪 𝟏, 𝑪 𝟐, 𝑪 𝟑와 같은 classifier가 loss function을 계산한다 • Stochastic Gradient Descent(SGD) 를 이용해 parameter를 동시에 update한다. 15
  • 16.
  • 17.
    Experiments • Node Classification –graph의 node중 일부만 label을 가지고 있을 때, label이 없는 node들을 예측한다 • DataSet – BlogCatalog – Flickr – YouTube • Baselines – SpectralClustering, MaxModularity, EdgeCluster(k- means), weighted vote Relational Neighbor(wvRN) 17
  • 18.
    Results: BlogCatalog • DeepWalk는 label이 있는 node가 적은 data에서도 잘 동작한다 18
  • 19.
    Results: Youtube • Scalableon very large graph! 19
  • 20.
    Parallelization • 모델 학습과정에서 parameter를 공유하지 않으므로 각 부분을 병렬처리해도 성능에 영향을 주지 않는다 20
  • 21.
    Conclusions • Network로 표현되는데이터를 continuous vector space 상에서 표현하여 학습이 가능하다. • Word sequence들을 graph로 표현하여 language model에 사용 가능하다. • label이 부족한 경우에도 잘 작동하다. • 큰 graph에도 Scalable하기 때문에 online learning에 사용 가능하다 21
  • 22.