Learning to Execute Graph Algorithms Exactly with Graph Neural Networks
Muhammad Fetrat Qharabagh, Artur Back de Luca, George Giapitzakis, Kimon Fountoulakis

TL;DR
This paper proves that graph neural networks can exactly learn to execute certain graph algorithms by training MLP ensembles on local instructions, enabling error-free inference for algorithms like BFS and Bellman-Ford.
Contribution
It introduces a theoretical framework showing GNNs can learn to execute graph algorithms exactly under bounded-degree and finite-precision constraints, using NTK theory.
Findings
GNNs can learn local instructions with small training sets
Exact algorithm execution during inference is achievable with high probability
Positive results for algorithms like BFS, DFS, and Bellman-Ford
Abstract
Understanding what graph neural networks can learn, especially their ability to learn to execute algorithms, remains a central theoretical challenge. In this work, we prove exact learnability results for graph algorithms under bounded-degree and finite-precision constraints. Our approach follows a two-step process. First, we train an ensemble of multi-layer perceptrons (MLPs) to execute the local instructions of a single node. Second, during inference, we use the trained MLP ensemble as the update function within a graph neural network (GNN). Leveraging Neural Tangent Kernel (NTK) theory, we show that local instructions can be learned from a small training set, enabling the complete graph algorithm to be executed during inference without error and with high probability. To illustrate the learning power of our setting, we establish a rigorous learnability result for the LOCAL model of…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Graph Neural Networks · Domain Adaptation and Few-Shot Learning · Stochastic Gradient Optimization Techniques
