DeepWalk and node2vec Graph Embedding
DeepWalk and node2vec turn every node of a network into a numeric vector. Short random walks are started from every node and treated like sentences; a skip-gram model then learns vectors so that nodes appearing near each other on walks get similar vectors. node2vec biases the walks with a return parameter p and an in-out parameter q to move between local (community) and structural similarity.
DeepWalk와 node2vec은 네트워크의 각 노드를 숫자 벡터로 바꿉니다. 모든 노드에서 짧은 무작위 보행을 시작해 문장처럼 다루고, 스킵그램 모형으로 보행에서 가까이 나타나는 노드끼리 비슷한 벡터를 갖도록 학습합니다. node2vec은 복귀 모수 p와 진출 모수 q로 보행을 조절해 지역적 유사성과 구조적 유사성 사이를 오갑니다.
How can the nodes of a network be placed in a vector space so that similar or connected nodes end up close together?
비슷하거나 연결된 노드가 가까이 놓이도록 네트워크의 노드를 벡터 공간에 배치하려면 어떻게 해야 할까요?
The method returns a vector for each node, the nearest neighbours of each node by cosine similarity and a two-dimensional view of the embedding. As a quality check, a share of edges is hidden, the embedding is refitted and the AUC with which hidden edges score above random non-edges is reported.
When to use DeepWalk and node2vec Graph Embedding
- You need node features for clustering, visualisation or a downstream model.
- You want to compare nodes by their network neighbourhood rather than by attributes.
- The network has hundreds to a few thousand nodes.
When to use something else
- You only need to find communities: use Community Detection (Louvain, Walktrap)
- You need importance scores for nodes: use Social Network Centrality Metrics
- Node attributes and a labelled outcome are available: use Graph Neural Network (GNN)
Assumptions and requirements
- Edges are treated as undirected; weights must be positive
- Random walks are long and numerous enough to visit every node's neighbourhood
- Embeddings are identified only up to rotation; compare similarities, not coordinates
What the analysis reports
- Embedding vector per node
- Nearest neighbours by cosine similarity
- Link-prediction AUC on hidden edges
- Scatter of the first two principal components
How to report it
A [value]-dimensional node2vec embedding (p = [value], q = [value]) of a network with [value] nodes and [value] edges was learned from [value] walks of length [value] per node; hidden edges were ranked above non-edges with AUC = [value].
Related methods
- Community Detection (Louvain, Walktrap)
- Link Prediction Scores
- Graph Neural Network (GNN)
- Word2Vec Vector Embedding
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with direct computations (formulas, enumeration or simulation).
독립 계산. 직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과.
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run DeepWalk and node2vec Graph Embedding on Quorant
- Data you need
- a table (CSV or Excel) with predictor (feature) columns
- Price
- 600 credits for one analysis up to 10,000 rows (complexity level 4); larger or wider data costs more. Optional methodologist review: 2400 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.