Overview
Graph Embeddings
Node2vec, FastRP — turn nodes into vectors so downstream ML can use them.
Why it matters
Embeddings are the bridge from graph topology to classical ML: once each node has a vector, you can cluster, classify, link-predict.
Going deeper
Embeddings turn topology into vectors so downstream ML (clustering, classification, link prediction) can use it:
| Method | Idea | Trade-off |
|---|---|---|
| FastRP | Random projection of neighbourhood | Very fast, scales to huge graphs, less expressive |
| node2vec | Biased random walks → skip-gram | Richer structure capture, slower to train |
| GraphSAGE | Inductive, learns from node features | Generalizes to unseen nodes, needs features |
CALL gds.fastRP.write('socialGraph', {
embeddingDimension: 128, writeProperty: 'embedding'
});
Computing them inside Neo4j avoids round-tripping the whole topology over the network on every retrain — the graph never leaves. The output is a vector per node you store as a property and feed to a vector index or an external model. Embeddings are unsupervised features: validate that they actually improve a downstream task, or they're just expensive columns.
