Which Algorithms Can Graph Neural Networks Learn?
Not on the map. Why?
Abstract (arXiv)
In recent years, there has been growing interest in understanding neural architectures' ability to learn to execute discrete algorithms, a line of work often referred to as neural algorithmic reasoning. The goal is to integrate algorithmic reasoning capabilities into larger neural pipelines. Many such architectures are based on (message-passing) graph neural networks (MPNNs), owing to their permutation equivariance and ability to deal with sparsity and variable-sized inputs. However, existing work is either largely empirical and lacks formal guarantees or it focuses solely on expressivity, leaving open the question of when and how such architectures generalize beyond a finite training set. In this work, we propose a general theoretical framework that characterizes the sufficient conditions under which MPNNs can learn an algorithm from a training set of small instances and provably approximate its behavior on inputs of arbitrary size. Our framework applies to a broad class of algorithms, including single-source shortest paths, minimum spanning trees, and general dynamic programming problems, such as the 0-1 knapsack problem. In addition, we establish impossibility results for a wide range of algorithmic tasks, showing that standard MPNNs cannot learn them, and we derive more expressive MPNN-like architectures that overcome these limitations. Finally, we refine our analysis for the Bellman-Ford algorithm, yielding a substantially smaller required training set and significantly extending the recent work of Nerem et al. [2025] by allowing for a differentiable regularization loss. Empirical results largely support our theoretical findings.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). First posted on arXiv 13 Feb 2026.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026Recurrent Graph Neural Networks with Set-Based Aggregation14 Sep 2026
Similar, not cited
Close in wording, no citation either way
- 2024Simulation of Graph Algorithms with Looped Transformers
- 2025Primal-Dual Neural Algorithmic Reasoning
- 2025Efficiently Learning Branching Networks for Multitask Algorithmic Reasoning
- 2024Reasoning Algorithmically in Graph Neural Networks
- 2024Understanding Transformer Reasoning Capabilities via Graph Algorithms
- 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformers
- 2024Acceleration Algorithms in GNNs: A Survey
- 2019Exact Combinatorial Optimization with Graph Convolutional Neural Networks