An encoder transforms graph structure and node features into dense vector representations, or embeddings, that capture useful relational information. It may be a simple node-vector lookup or a neural network that processes connections and features. section 11.2.1
A graph encoder commonly follows this pipeline:
- Read the adjacency structure and available node features. section 11.2.1
- Generate or update node embeddings, preserving either global position, local neighborhoods, or both. section 11.2.1 section 12.2.4
- Pass the embeddings to a decoder that reconstructs links, similarity, labels, or other graph properties, providing a training signal. section 11.2.2
Node2Vec on the karate club network
Node2Vec generates random walks such as 0 → 1 → 2 → 3, converts recurring node contexts into vectors, and uses vector similarity to predict friendship likelihood. Similar vectors reveal factions, bridge members, and leadership positions. section 11.2.4
Figure 12.9 Pipeline for processing heterogeneous graph data in a link prediction system for movie recommendations. The data consists of users and movies as node types and user–movie ratings as edges. Embeddings are generated, with user embeddings learned by the model and movie embeddings initialized from genre features. The data is processed using three heterogeneous GNN encoders (H-GraphConv, H-GAT, and H-SAGE), which aggregate neighbor features to generate node representations. A dot product then quantifies the compatibility between users and movies, with higher scores indicating a greater likelihood of interaction. The scores are finally converted into probabilities representing the likelihood of a link between users and movies.
Use the recommendation pipeline to trace an encoder from user and movie embeddings through heterogeneous neighbor aggregation to dot-product link scores. section 12.2.4




















