Node Embeddings and Graph Learning Tasks

Before diving into how graph neural networks work, it's worth being precise about what they produce and what problems they solve. The output is embeddings — vectors that place each node (or edge, or whole graph) in a meaningful space — and the problems come in three flavors that cover almost every graph application. Getting this vocabulary straight makes the architectures in the rest of the series click into place.

Post 1 said GNNs learn representations of graph elements. This post defines those representations (embeddings) and the three task types (node-level, edge-level, graph-level) they serve. It’s the map of what you’re trying to do with a graph, which is what determines how you use a GNN — so it’s worth getting clear before the mechanics.

Embeddings: position in a meaningful space

The core output of a GNN is an embedding — a dense vector representing a node (or edge, or graph) such that the geometry of the vector space is meaningful: similar or related elements sit close together. This is the same idea as word embeddings or the vectors in semantic search (ML series, post 7), now for graph elements.

What makes a graph embedding special is what “similar” means. A good node embedding captures two things at once: - The node’s own features — its attributes (a user’s age, a paper’s topic, an atom’s element). - Its structural role and context — where it sits in the graph: who its neighbors are, what community it belongs to, how central it is. Two nodes with identical features but very different neighborhoods should get different embeddings, because they play different roles.

This fusion is the whole point: a node’s embedding encodes what it is and where it is in the network, compressed into a vector that downstream models can use. The quality of a GNN is really the quality of the embeddings it produces — do nodes that should be treated similarly (same community, same function) end up close in the space? Once you have good embeddings, the actual prediction tasks become straightforward standard ML on those vectors, which is why “learn good embeddings” is the real job.

The three levels of graph tasks

Almost every graph problem is one of three types, distinguished by what you’re making a prediction about. Knowing which you have tells you how to apply a GNN:

These three levels — node, edge, graph — are a complete map, and the first question to ask of any graph problem is “which level is my prediction at?” because it determines what embedding you need (per-node, per-pair, or whole-graph) and how you read it out.

Transductive vs inductive: a distinction that matters a lot

One more distinction shapes which GNN approach you need and is a common source of confusion:

This distinction is decisive in practice because most real systems are inductive — new users, new transactions, new molecules arrive constantly, and retraining per new node is untenable. It’s exactly why modern GNNs (GraphSAGE and successors, post 5) are built to be inductive: they learn a reusable neighborhood-aggregation function rather than fixed per-node vectors, so they embed anything on the fly. When you evaluate a graph method, “is it inductive?” is one of the most important practical questions — a transductive method that can’t handle new nodes is a poor fit for a living, growing graph.

The throughline: a GNN produces embeddings — vectors placing each node/edge/graph in a meaningful space where related elements sit close — and a node embedding fuses what it is (features) with where it sits (structural context), so “learn good embeddings” is the real job and the prediction is easy standard ML on top. Graph problems come in three levels: node-level (classify/score individual nodes — the most common), edge-level (link prediction — recommend connections, complete knowledge graphs — combine two node embeddings), and graph-level (classify a whole graph, e.g. molecule toxicity — pool all node embeddings into one). And the transductive vs inductive distinction is decisive: transductive works only on the fixed training graph, while inductive methods learn a reusable aggregation function that embeds new/unseen nodes and graphs — which most real, growing systems require, and why modern GNNs are inductive.

Key takeaways

Further reading

Sources & References