Shallow Representation Learning
Node Embedding
Unit Objectives
Node Embedding
Embedding Methods: Intuition
A good node representation should be able to reconstruct information that is desired to be preserved
mapping
Extractor
Reconstructor
Â
Â
Objective: Reconstruction Loss
Node Embedding: Visual Example
Input
Output
Zachary’s Karate Club Graph
Graph Embedding
Simple Graphs
Node Co-occurrence
Structural Role
Node status
Community Structure
Complex Graphs
Heterogeneous Graphs
Bipartite Graphs
Multi-dimensional Graphs
Signed Graphs
Hypergraphs
Dynamic Graphs
Embedding Simple Graphs
Node Co-occurrence Methods
Notions of Co-occurrence
… if the degree distribution of a connected graph follows a power law, we observe that the frequency which vertices appear in the short random walks will also follow a power-law distribution …
Language
Co-occurrence is the basis of fundamental representations in NLP: Vector representation of words or neural language models
Notion of Co-Occurrence
Source: School of Information, Pratt Institute
Co-Authorship Network
An author is connected to limited set of authors
This can be used as a notion of Co-occurrence
Can we use learn node representations that preserves the co-occurrence relations in the network?
Language Models
Word Frequency in Natural Language
Word frequency in natural language follows a power law
Slide from Bryan Perozzi et al.
Â
Â
The second most used word appears half as often as the most used word.
The third most used word appears one-third the number of times the most used word appears, and so on
Connection: Language and Graphs
Scale Free Graph
Artificial Language: Short truncated random walks as sentences
Random Walk on Graph
Â
Short random walks
Vertex frequency in random walks on
scale free graphs also follows a power
law.
Connection: Language and Graph
Language Model in Concrete Terms
The Problems
Â
The Hope
DeepWalk
DeepWalk: Online Learning of Social Representations, Perozzi et al., KDD’14
DeepWalk Method
1) Input graph
3) Representation Mapping
4) Hierarchical Softmax
5) Output: Representation
2) Random Walks
SkipGram: Details
Random Walks
Â
Â
Â
Otherwise
https://towardsdatascience.com/node2vec-explained-graphically-749e49b7eb6b
Learning the Parameters
Learning Objective
Learning Objective (Cntd..)
Learning Objective (Cntd …)
SkipGram Architecture
Â
Â
Â
Hierarchical Softmax
Hierarchical Softmax
Hierarchical Softmax
Â
Â
Algorithm
Negative Sampling
Negative Sampling
Negative sampling
| | Target |
| | |
| | |
| | |
| | |
| | |
| | |
Supervised Learning: Logistic Regression Model
Â
Â
Â
Â
Objective Function
Â
Â
Â
Â
Sampling Distribution
Â
Selecting Negative Samples
Â
Increases the probability of choosing low degree nodes
Empirical frequency
Social and Structural Aspect
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
node2vec
node2vec: Scalable Feature Learning for Networks, Grover and Leskovec, SIGKDD’16
Node2vec Objective
Biased Random Walk
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Local microscopic view
Â
Global macroscopic view
BFS - DFS Tradeoff with Interpolation
Biased (2nd Order) Random Walk
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
First order random walk probability:
Â
Second order biased random walk probability:
Â
Â
Â
Â
Simulating BFS vs DFS
Â
Â
DFS
BFS
Performance Comparison
Performance Comparison
Multi-Label Node Classification (Macro-F1 scores)
Performance Comparison
(a)
(b)
(c)
(d)
Link Prediction(AUC scores)
struc2vec
struc2vec: Learning Node Representations from Structural Identity, Ribeiro et al., KDD’17
Representation Context
Â
Similar degree values – 5 and 4
Connected to similar no of triangles – 3 and 2
Connected to the rest of the network by two nodes
Â
struc2vec: Core Ideas
struc2vec: Steps
struc2vec: Steps
Hierarchical Structural Similarity
RED, GREEN 🡪 Automorphism
PURPLE, BROWN 🡪 Structurally Similar
Hierarchical Structural Similarity
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Hierarchical Structural Similarity
Â
Â
Â
Â
Â
Â
Â
Â
Â
Hierarchical Structural Similarity
Â
Â
Â
Â
Â
Dynamic Time Warping (DWT)
Â
DWT computes element-wise match such that the distance between matched elements are minimized
Â
Hierarchical Structural Similarity
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Constructing Multi-Layer Graph (M)
Layer 1
Layer 2
Â
Generate Context from M
Performance
DeepWalk
Node2vec
Struc2vec
Barbell Graph (10,10)
Mirrored Karate Network
DeepWalk
Node2vec
Struc2vec
Classification Performance
Graph Embedding
Simple Graphs
Node Co-occurrence
Structural Role
Node status
Community Structure
Complex Graphs
Heterogeneous Graphs
Bipartite Graphs
Multi-dimensional Graphs
Signed Graphs
Hypergraphs
Dynamic Graphs