What Can Neural Networks Reason About?
Keyulu Xu, Jingling Li, Mozhi Zhang, Simon S. Du, Ken-ichi Kawarabayashi, Stefanie Jegelka
Abstract
Neural networks have succeeded in many reasoning tasks. Empirically, these tasks require specialized network structures, e.g., Graph Neural Networks (GNNs) perform well on many such tasks, but less structured networks fail. Theoretically, there is limited understanding of why and when a network structure generalizes better than others, although they have equal expressive power. In this paper, we develop a framework to characterize which reasoning tasks a network can learn well, by studying how well its computation structure aligns with the algorithmic structure of the relevant reasoning process. We formally define this algorithmic alignment and derive a sample complexity bound that decreases with better alignment. This framework offers an explanation for the empirical success of popular reasoning models, and suggests their limitations. As an example, we unify seemingly different reasoning tasks, such as intuitive physics, visual question answering, and shortest paths, via the lens of a powerful algorithmic paradigm, dynamic programming (DP). We show that GNNs align with DP and thus are expected to solve these tasks. On several reasoning tasks, our theory is supported by empirical results.
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.
71 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
- GraphNorm: A Principled Approach to Accelerating Graph Neural Network Training cites How Neural Networks Extrapolate: From Feedforward to Graph Neural Networks
- How Neural Networks Extrapolate: From Feedforward to Graph Neural Networks cites Harnessing the Power of Infinitely Wide Deep Nets on Small-data Tasks
- Learning Causally Invariant Representations for Out-of-Distribution Generalization on Graphs cites How Neural Networks Extrapolate: From Feedforward to Graph Neural Networks
Cited by top-tier papers71
- Discovering Symbolic Models from Deep Learning with Inductive BiasesMiles D. Cranmer, Alvaro Sanchez-Gonzalez, Peter W. Battaglia, Rui Xu et al.NeurIPS 2020 · 736 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
- Learning Causally Invariant Representations for Out-of-Distribution Generalization on GraphsYongqiang Chen, Yonggang Zhang, Yatao Bian, Han Yang et al.NeurIPS 2022 · 246 citations
- GraphNorm: A Principled Approach to Accelerating Graph Neural Network TrainingTianle Cai, Shengjie Luo, Keyulu Xu, Di He et al.ICML 2021 · 224 citations
- EvoPrompting: Language Models for Code-Level Neural Architecture SearchAngelica Chen, David Dohan, David R. SoNeurIPS 2023 · 184 citations
Builds on1
Related papers
- Graph Neural Networks are Dynamic ProgrammersAndrew Joseph Dudzik, Petar VelickovicNeurIPS 2022 · 82 citations
- Which Algorithms Can Graph Neural Networks Learn?Solveig Wittig, Antonis Vasileiou, Robert R. Nerem, Timo Stoll et al.ICML 2026
- 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
- Learning to Walk the Right Paths: Task-Responsive Graph Reasoning for Multimodal InferenceXuecheng Li, Weikuan Jia, Yuanjie ZhengCVPR Findings 2026
