别催~ 在加载了 . . .

GNN_Embedding


GNN学习记录_2

Embedding

Why Embedding

Task: map nodes into an embedding space .

Similarity of embeddings between nodes indicates their similarity in the network.

For example:
Both nodes are close to each other (connected by an edge)
Encode network information
Potentially used for many downstream predictions

png

png

Random Walk

Random Walk is a method of embedding a graph.

png
png

We have got the aiming function.Then we want to minimize the value of it using the ‘Stochastic Gradient Descent’.

How should we randomly walk?

Node2vec:

We change every node in the graph into a vector using the random walk.

Goal:Embed nodes with similar network neighborhoods close in the feature space.

Steps:

  • Compute random walk probabilities.
  • Simulate r random walks of length / starting from each node u.
  •  Optimize the node2vec objective using Stochastic Gradient Descent.

BFS and DFS:

png

png

Embedding entire graphs

Approach 1:

Sum (or average) the node embeddings in the (sub)graph G
png

Approach 2:

Introduce a “virtual node” to represent the (sub)graph and run a standard
graph embedding technique.

png

Approach 3:

Anonymous Random Walk:

States in anonymous walks correspond to the index of the first time we visited the node in a random walk.

png

How many random walks m do we need?

png

Summary:

png


文章作者: codeYu233
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 codeYu233 !
评论
  目录