liveBook · Manning

Heterogeneous graph neural network

As explained in Knowledge Graphs and LLMs in Action

A heterogeneous graph neural network is a graph neural network designed to learn representations from graphs containing multiple node or relationship types.

A heterogeneous graph neural network learns node representations from graphs containing multiple node and relationship types. In a movie-recommendation graph, it exchanges information between user and movie nodes, refining embeddings from their interactions. section 12.2.4

A practical link-prediction pipeline typically proceeds as follows:

  • Decode user–movie compatibility with a dot product, then interpret higher scores as more likely links. section 12.2.4

Movie recommendation

Users and movies form distinct node types, while ratings form user–movie edges. H-GraphConv, H-GAT, and H-SAGE encoders aggregate neighborhood features before scoring candidate interactions.

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Explains embedding, heterogeneous message aggregation, and dot-product decoding with PyTorch implementations, but omits training details.
Examples
Uses MovieLens users, movies, genres, ratings, H-GraphConv, H-GAT, H-SAGE, and a dot-product classifier.
What it assumes
Assumes node features, node identifiers, typed edge indices, and graph metadata are available for model construction.
What you can do after
Builds a PyTorch Geometric heterogeneous encoder–decoder for predicting user–movie links.
How it connects
Connects graph neural networks with node embeddings, encoder–decoder architectures, link prediction, and recommendation systems.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Knowledge Graphs and LLMs in Action. The section links point to the parts of the book it draws on.