Definition

Node2Vec is an extension of DeepWalk that introduces more flexible random walks. The model can capture both local and global network structure

Algorithm

  1. Run short fixed-length biased random walks starting from each node in the graph using some random walk strategy .

Consider a random walk that just traversed edge and now resides at node . The unnormalized transition probability on edges is given by where:

  • is the return parameter, controlling the likelihood of immediately revisiting a node in the walk
  • is the in-out parameter controlling the search strategy (depth-first vs. breadth-first)
  • is the shortest path distance between node and
  1. These walks generate sequences of nodes for each node, similar to sentences in natural language processing.
  2. The sequences are then fed into a Word2Vec-like model to learn vector representations for each node.