Which Algorithms Can Graph Neural Networks Learn?

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Wittig, Solveig, Vasileiou, Antonis, Nerem, Robert R., Stoll, Timo, Geerts, Floris, Wang, Yusu, Morris, Christopher
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866911446682566656
author Wittig, Solveig
Vasileiou, Antonis
Nerem, Robert R.
Stoll, Timo
Geerts, Floris
Wang, Yusu
Morris, Christopher
author_facet Wittig, Solveig
Vasileiou, Antonis
Nerem, Robert R.
Stoll, Timo
Geerts, Floris
Wang, Yusu
Morris, Christopher
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2602_13106
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Which Algorithms Can Graph Neural Networks Learn?
Wittig, Solveig
Vasileiou, Antonis
Nerem, Robert R.
Stoll, Timo
Geerts, Floris
Wang, Yusu
Morris, Christopher
Machine Learning
Artificial Intelligence
Data Structures and Algorithms
Neural and Evolutionary Computing
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.
title Which Algorithms Can Graph Neural Networks Learn?
topic Machine Learning
Artificial Intelligence
Data Structures and Algorithms
Neural and Evolutionary Computing
url https://arxiv.org/abs/2602.13106