node2vec and Learning Graph Embeddings

A visual companion to the episode: how biased random walks turn a graph into pseudo-language, how p and q reshape context, and why node2vec became the practical shallow baseline before graph neural methods took over.

Paper: Grover & Leskovec, 2016 arXiv: 1607.00653 KDD 2016 Live Viz Link
Extracted arXiv IDs: 1607.00653 Theme: word2vec → random walks → node vectors
Core Move2nd-order walk
tune context, not loss
InterpretationBFS ↔ DFS
Small q
Explore outward
Large q
Stay local
Small p
Return often

Graph → Walk Corpus → Skip-gram → Embeddings

node2vec keeps the word2vec objective and rewires the context generator. The page below draws the full pipeline as a moving graph system rather than a text recipe.

Bias the walk, change the notion of similarity

This second-order transition depends on the previous node. Hover the heatmap and the graph to see how return, in-neighborhood, and outward moves reweight context under different p and q settings.

Interactive: sliders + hover
large q → BFS-like small q → DFS-like

Benchmark gains, conceptual caution

The paper’s influence came from useful benchmark improvements. The harder claim is stronger: whether those gains isolate flexible role-versus-community capture, or mostly show that biased sampling is a better shallow baseline.

Homophily clusters versus structural roles

This mock embedding map contrasts two geometric stories. In one, nodes of the same community bunch together. In the other, far-apart hubs or bridges can align by role even when their local neighborhoods differ.

References

node2vec: Scalable Feature Learning for Networks

Aditya Grover, Jure Leskovec, 2016 · arXiv 1607.00653

DeepWalk: Online Learning of Social Representations

Bryan Perozzi, Rami Al-Rfou, Steven Skiena, 2014 · predecessor walk corpus idea

LINE: Large-scale Information Network Embedding

Jian Tang et al., 2015 · shallow embedding baseline focused on proximity

GraphSAGE: Inductive Representation Learning on Large Graphs

William Hamilton, Rex Ying, Jure Leskovec, 2017 · later inductive shift in graph learning

word2vec Explained

Yoav Goldberg, Omer Levy, 2014 · skip-gram with negative sampling intuition

RolX: Structural Role Extraction and Mining in Large Graphs

Keith Henderson et al., 2012 · structural-role framing behind the paper’s stronger claim