liveBook · Manning

Message passing

As explained in Knowledge Graphs and LLMs in Action

Message passing is a graph-neural-network technique in which nodes iteratively exchange, aggregate, and use information from neighboring nodes to update their representations.

Message passing lets graph neural networks update each node by collecting information from neighbors, processing it, and combining it with the node’s representation in repeated rounds. section 11.5.1

A typical message-passing pipeline proceeds as follows:

  • Collect messages from neighboring nodes. section 11.5.1
  • Aggregate the messages, commonly by summation, then update the node representation with trainable weights, a nonlinear activation, and optionally a bias. section 11.5.3
  • Repeat the process so that k iterations expose each node to information from its k-hop neighborhood. section 11.5.2

Social-network interests

A user representation can begin with explicitly stated interests, incorporate friends’ interests in the first round, and incorporate friends-of-friends’ interests in the second. Later rounds capture broader social patterns. section 11.5.1

Adding self-loops folds a node’s own information into neighborhood aggregation, simplifying implementation and often improving stability, but it reduces flexibility in distinguishing self-features from neighbor features. Specialized aggregation, attention, skip connections, and normalization extend the framework for irregular neighborhoods and deeper models. section 11.5.4 section 11.6

Figure 11.5 Example of how a single node aggregates messages from its local neighborhood in the message-passing model. Notice that the computation graph of the GNN forms a tree structure by unfolding the neighborhood around the target node.
figure

Unfolds a target node’s local neighborhood into a computation tree, showing how messages are aggregated during graph-neural-network inference. section 11.5.1

How Knowledge Graphs and LLMs in Action covers it

How deep it goes
Defines aggregation and update, gives a basic trainable equation, and compares self-loops with specialized architectural enhancements.
Examples
Uses social networks, molecular graphs, citation networks, and an unfolded neighborhood computation tree.
What it assumes
Assumes graph nodes, edges, neighbors, and node features while introducing iterative aggregation and representation updates.
What you can do after
Build a basic GNN update pipeline and choose between standard aggregation and self-loop variants.
How it connects
Connects graph neural networks with graph topology, attention mechanisms, skip connections, normalization layers, and LLMs.

Also explained in

Compare how 9 books explain message passing →

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.