Primal-Dual Neural Algorithmic Reasoning

Yu He, Ellen Vitercik
5/29/2025
cs.LG

No official code found. Best implementation: dransyhe/pdnar (2 stars, last commit 2025-01-31).

Abstract

Neural Algorithmic Reasoning (NAR) trains neural networks to simulate classical algorithms, enabling structured and interpretable reasoning over complex data. While prior research has predominantly focused on learning exact algorithms for polynomial-time-solvable problems, extending NAR to harder problems remains an open challenge. In this work, we introduce a general NAR framework grounded in the primal-dual paradigm, a classical method for designing efficient approximation algorithms. By leveraging a bipartite representation between primal and dual variables, we establish an alignment between primal-dual algorithms and Graph Neural Networks. Furthermore, we incorporate optimal solutions from small instances to greatly enhance the model's reasoning capabilities. Our empirical results demonstrate that our model not only simulates but also outperforms approximation algorithms for multiple tasks, exhibiting robust generalization to larger and out-of-distribution graphs. Moreover, we highlight the framework's practical utility by integrating it with commercial solvers and applying it to real-world datasets.

View on arXivView PDF

Code Implementations(1)

dransyhe/pdnarCommunity100%
22PythonOct 1, 20241 years ago

Similar Papers

Cite this paper

@article{he2025primaldual,
  title  = {Primal-Dual Neural Algorithmic Reasoning},
  author = {Yu He and Ellen Vitercik},
  year   = {2025},
  eprint = {2505.24067},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.24067v1},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.24067.svg)](https://codeofpaper.com/paper/2505.24067)

Discussion