Theory of Graph Neural Networks: Representation and Learning

Stefanie Jegelka

Introduction

Graph Neural Networks (GNNs) have become a cornerstone of modern machine learning, powering breakthroughs in fields as diverse as drug discovery, social network analysis, and traffic forecasting. Despite their empirical success, a significant theoretical gap has persisted regarding their fundamental capabilities. This paper, synthesized from the work of Stefanie Jegelka, provides a comprehensive survey of GNN theory, focusing on three critical pillars: representational power, generalization, and extrapolation.

Theoretical Frameworks

To understand the behavior of GNNs, researchers employ several mathematical lenses:

  • Graph Isomorphism & WL Hierarchy: The expressive power of GNNs is often benchmarked against the Weisfeiler-Leman (WL) algorithm, a classical combinatorial method for testing graph isomorphism.
  • PAC-Learning & VC Dimension: These tools from statistical learning theory help bound the "generalization gap." For GNNs, the VC dimension has been shown to be approximately $O(p^2 H^2 n^2)$, where $p$ is the number of parameters, $H$ is the number of hidden neurons, and $n$ is the graph size.
  • Neural Tangent Kernels (NTK): By analyzing GNNs in the infinite-width limit, researchers can treat them as kernel machines, simplifying the analysis of convergence and sample complexity.
  • Algorithmic Alignment: This framework quantifies the structural similarity between a GNN's architecture and the logic of the task it is designed to solve, such as shortest-path algorithms.

Key Insights: The 1-WL Ceiling and Expressivity

A central result in GNN theory is that standard Message Passing Neural Networks (MPNNs) are bounded by the 1-dimensional Weisfeiler-Leman (1-WL) test. This means they cannot distinguish between certain non-isomorphic graphs, such as two distinct regular graphs where every node has the same degree.

Figure 1: Illustration of graph structures (left/middle) and the resulting computation tree (right) used to analyze the expressive power of GNNs via the Weisfeiler-Leman test.

For a GNN to reach this 1-WL limit, its aggregation function must be injective. Theoretical analysis suggests that "sum" aggregation is superior to "mean" or "max" because it can uniquely represent multisets of neighbor features, preserving more information about the local graph structure. To overcome the 1-WL limit, researchers have proposed higher-order GNNs. For example, $k$-dimensional Folklore GNNs ($k$-FGNNs) have been proven to be as powerful as the $(k+1)$-WL test, though their computational complexity increases significantly with $k$. Furthermore, while MPNNs are limited by 1-WL, they can become Turing complete if nodes are assigned unique identifiers, though this comes at the cost of losing permutation invariance.

Algorithmic Alignment and Generalization

The success of GNNs is often attributed to "algorithmic alignment." A GNN generalizes well when its step-by-step message-passing mechanism mirrors the structure of the underlying algorithm needed for the task. For instance, if a problem can be solved via dynamic programming (like the Bellman-Ford algorithm for shortest paths), a GNN is naturally biased to learn it efficiently because its architecture aligns with the iterative, local nature of the solution.

However, extrapolation—performance on graphs significantly different from the training set—remains a challenge. Research shows that MLPs with ReLU activations behave linearly far outside their training range. This implies that GNNs may struggle to predict properties for much larger graphs unless they are specifically designed with "linear algorithmic alignment."

Conclusion and Future Directions

While GNN theory has advanced significantly, several frontiers remain. Higher-order GNNs that surpass the 1-WL limit exist but are often computationally prohibitive. Bridging the gap between these theoretical constructs and practical, scalable architectures is a key area for future research. Additionally, improving reliability under distribution shifts (extrapolation) and developing a deeper understanding of spectral GNNs are essential for the next generation of graph-based models.

Summary updated

Abstract

Graph Neural Networks (GNNs), neural network architectures targeted to learning representations of graphs, have become a popular learning model for prediction tasks on nodes, graphs and configurations of points, with wide success in practice. This article summarizes a selection of the emerging theoretical results on approximation and learning properties of widely used message passing GNNs and higher-order GNNs, focusing on representation, generalization and extrapolation. Along the way, it summarizes mathematical connections.
BibTeX
@misc{jegelka2022theory,
  author = {Stefanie Jegelka},
  title = {{Theory of Graph Neural Networks: Representation and Learning}},
  year = {2022},
  eprint = {2204.07697},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.07697},
}
Figure