Graph Neural Networks are Dynamic Programmers
Abstract
Recent advances in neural algorithmic reasoning with graph neural networks (GNNs) are propped up by the notion of algorithmic alignment. Broadly, a neural network will be better at learning to execute a reasoning task (in terms of sample complexity) if its individual components align well with the target algorithm. Specifically, GNNs are claimed to align with dynamic programming (DP), a general problem-solving strategy which expresses many polynomial-time algorithms. However, has this alignment truly been demonstrated and theoretically quantified? Here we show, using methods from category theory and abstract algebra, that there exists an intricate connection between GNNs and DP, going well beyond the initial observations over individual algorithms such as Bellman-Ford. Exposing this connection, we easily verify several prior findings in the literature, produce better-grounded GNN architectures for edge-centric tasks, and demonstrate empirical results on the CLRS algorithmic reasoning benchmark. We hope our exposition will serve as a foundation for building stronger algorithmically aligned GNNs.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
23 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Size-Invariant Graph Representations for Graph Classification Extrapolations cites How Neural Networks Extrapolate: From Feedforward to Graph Neural Networks
- Size-Invariant Graph Representations for Graph Classification Extrapolations cites Neural Execution of Graph Algorithms
- The CLRS Algorithmic Reasoning Benchmark cites Size-Invariant Graph Representations for Graph Classification Extrapolations
- The CLRS Algorithmic Reasoning Benchmark cites How Neural Networks Extrapolate: From Feedforward to Graph Neural Networks
- The CLRS Algorithmic Reasoning Benchmark cites Neural Execution of Graph Algorithms
- Learning to Simulate Complex Physics with Graph Networks cites Neural Execution of Graph Algorithms
- Simulation of Graph Algorithms with Looped Transformers cites The CLRS Algorithmic Reasoning Benchmark
- Simulation of Graph Algorithms with Looped Transformers cites Neural Algorithmic Reasoning with Causal Regularisation
- Simulation of Graph Algorithms with Looped Transformers cites Neural Execution of Graph Algorithms
- How Neural Networks Extrapolate: From Feedforward to Graph Neural Networks cites Neural Execution of Graph Algorithms
- Neural Algorithmic Reasoning with Causal Regularisation cites Size-Invariant Graph Representations for Graph Classification Extrapolations
- Neural Algorithmic Reasoning with Causal Regularisation cites The CLRS Algorithmic Reasoning Benchmark
- Neural Algorithmic Reasoning with Causal Regularisation cites How Neural Networks Extrapolate: From Feedforward to Graph Neural Networks
- Neural Algorithmic Reasoning with Causal Regularisation cites Neural Execution of Graph Algorithms
Cited by top-tier papers23
- Neural Sheaf Diffusion: A Topological Perspective on Heterophily and Oversmoothing in GNNsCristian Bodnar, Francesco Di Giovanni, Benjamin Paul Chamberlain, Pietro Lió et al.NeurIPS 2022 · 313 citations
- The CLRS Algorithmic Reasoning BenchmarkPetar Velickovic, Adrià Puigdomènech Badia, David Budden, Razvan Pascanu et al.ICML 2022 · 118 citations
- Can Graph Learning Improve Planning in LLM-based Agents?Xixi Wu, Yifei Shen, Caihua Shan, Kaitao Song et al.NeurIPS 2024 · 67 citations
- Neural Algorithmic Reasoning with Causal RegularisationBeatrice Bevilacqua, Kyriacos Nikiforou, Borja Ibarz, Ioana Bica et al.ICML 2023 · 39 citations
- Simulation of Graph Algorithms with Looped TransformersArtur Back de Luca, Kimon FountoulakisICML 2024 · 31 citations
Builds on10
- Learning to Simulate Complex Physics with Graph NetworksAlvaro Sanchez-Gonzalez, Jonathan Godwin, Tobias Pfaff, Rex Ying et al.ICML 2020 · 1,439 citations
- Neural Bellman-Ford Networks: A General Graph Neural Network Framework for Link PredictionZhaocheng Zhu, Zuobai Zhang, Louis-Pascal A. C. Xhonneux, Jian TangNeurIPS 2021 · 546 citations
- How Neural Networks Extrapolate: From Feedforward to Graph Neural NetworksKeyulu Xu, Mozhi Zhang, Jingling Li, Simon Shaolei Du et al.ICLR 2021 · 364 citations
- Neural Execution of Graph AlgorithmsPetar Velickovic, Rex Ying, Matilde Padovano, Raia Hadsell et al.ICLR 2020 · 192 citations
- Size-Invariant Graph Representations for Graph Classification ExtrapolationsBeatrice Bevilacqua, Yangze Zhou, Bruno RibeiroICML 2021 · 124 citations
Related papers
- What Can Neural Networks Reason About?Keyulu Xu, Jingling Li, Mozhi Zhang, Simon S. Du et al.ICLR 2020 · 281 citations
- Which Algorithms Can Graph Neural Networks Learn?Solveig Wittig, Antonis Vasileiou, Robert R. Nerem, Timo Stoll et al.ICML 2026
- Deep Equilibrium Algorithmic ReasoningDobrik Georgiev, Joseph Wilson, Davide Buffelli, Pietro LióNeurIPS 2024 · 7 citations
- Primal-Dual Neural Algorithmic ReasoningYu He, Ellen VitercikICML 2025
- Bridging the Gaps between Graph Neural Networks and Data-Flow Analysis: The Closer, the BetterQingchen Yu, Xin Liu, Qingguo Zhou, Chunming WuISSTA 2025
