DeepWalk — Talks, Press, and Discussion
Press & Blog Coverage
-
phanein/deepwalk, GitHub. The authors’ implementation; its README says “DeepWalk uses short random walks to learn representations for vertices in graphs.”
-
node2vec project page, Stanford SNAP. The page for node2vec, the 2016 method that generalises DeepWalk’s uniform walks with biased walks.
-
Node2Vec in PyTorch Geometric, documentation. A library implementation of random-walk node embeddings; with p = q = 1 its walks are DeepWalk’s uniform walks.
Q&A (answers from the paper)
Q1: Why treat random walks as sentences? If a graph’s degree distribution follows a power law, the frequency of nodes in short random walks also follows a power law, much like word frequency in natural language. So methods built for language can model the walks (Section 3.2, Figure 2).
Q2: Why short random walks and not the whole graph? The paper lists two advantages: walks only need local information, so they are easy to parallelise, and when the graph changes, only the affected part needs new walks, without recomputing everything (Section 3.1).
Q3: How is the Skip-gram probability computed for many nodes? With Hierarchical Softmax: the nodes are leaves of a binary tree, which reduces the cost of Pr(u_k | Φ(v_j)) from O(|V|) to O(log |V|). Huffman coding gives frequent nodes shorter paths (Section 4.2.2).
Q4: Which settings did the paper use? γ = 80 walks per node, window w = 10 and d = 128 for the classification results (Section 6.1), and walk length t = 40 in the sensitivity study (Section 6.2).
Q5: Where does DeepWalk do best? When few labels are available. On BlogCatalog, DeepWalk trained with 20% of nodes labelled beat EdgeCluster, Modularity and wvRN given 90% (Section 6.1.1, Table 2). The abstract reports F1 scores up to 10% higher than competing methods when labelled data is sparse.
Q6: How many walks per node are needed? In the sensitivity study, most of the benefit came from starting γ = 30 walks per node (Section 6.2.1, Figure 5a).
Common Misconceptions
-
“DeepWalk is just word2vec.” Correction: the new part is turning a graph into sequences with truncated random walks; Skip-gram with Hierarchical Softmax then learns from them (Sections 3 and 4).
-
“DeepWalk needs the whole graph in memory.” Correction: walks use only local neighbourhoods, and the paper describes a streaming variant that updates the model from small walks without knowing the entire graph (Section 4.4.1).
-
“DeepWalk beat every baseline everywhere.” Correction: on BlogCatalog, SpectralClustering was competitive, and DeepWalk was ahead only when labelled data was sparse: Macro-F1 for 20% or less, Micro-F1 for 60% or less (Section 6.1.1).
-
“The notebook’s perfect NMI reproduces the paper.” Correction: the notebook’s graph has 75 nodes and 3 clear communities, so all methods score near-perfectly; the paper evaluates multi-label classification on graphs with up to 1,138,499 nodes (Section 5.1).
Real Citations
- Perozzi, B., Al-Rfou, R., & Skiena, S. (2014). DeepWalk: Online Learning of Social Representations. KDD 2014. arXiv:1403.6652.
- Mikolov, T., Chen, K., Corrado, G., & Dean, J. (2013). Efficient Estimation of Word Representations in Vector Space. arXiv:1301.3781. (Skip-gram)
- Tang, L., & Liu, H. (2009). Relational Learning via Latent Social Dimensions. KDD 2009. (Modularity baseline and the BlogCatalog and Flickr setup)
- Grover, A., & Leskovec, J. (2016). node2vec: Scalable Feature Learning for Networks. KDD 2016. arXiv:1607.00653. (Biased walks; DeepWalk is the case p = q = 1)