Towards Better Out-of-Distribution Generalization of Neural Algorithmic Reasoning Tasks

Sadegh Mahdavi, Kevin Swersky, Thomas Kipf, Milad Hashemi, Christos Thrampoulidis +1 more
11/1/2022
cs.LG
gnn

Official code: DSL-Lab/clrs (11 stars, Python, Apache-2.0, last commit 2023-03-20).

Abstract

In this paper, we study the OOD generalization of neural algorithmic reasoning tasks, where the goal is to learn an algorithm (e.g., sorting, breadth-first search, and depth-first search) from input-output pairs using deep neural networks. First, we argue that OOD generalization in this setting is significantly different than common OOD settings.

Show full abstract

For example, some phenomena in OOD generalization of image classifications such as \emph{accuracy on the line} are not observed here, and techniques such as data augmentation methods do not help as assumptions underlying many augmentation techniques are often violated. Second, we analyze the main challenges (e.g., input distribution shift, non-representative data generation, and uninformative validation metrics) of the current leading benchmark, i.e., CLRS \citep{deepmind2021clrs}, which contains 30 algorithmic reasoning tasks. We propose several solutions, including a simple-yet-effective fix to the input distribution shift and improved data generation. Finally, we propose an attention-based 2WL-graph neural network (GNN) processor which complements message-passing GNNs so their combination outperforms the state-of-the-art model by a 3% margin averaged over all algorithms. Our code is available at: \url{https://github.com/smahdavi4/clrs}.

View on arXivView PDF

Code Implementations(1)

DSL-Lab/clrsOfficial100%
Apache-2.0
110Python, ShellOct 27, 20223 years agoApache-2.0

Similar Papers

Cite this paper

@article{mahdavi2022towards,
  title  = {Towards Better Out-of-Distribution Generalization of Neural Algorithmic Reasoning Tasks},
  author = {Sadegh Mahdavi and Kevin Swersky and Thomas Kipf and Milad Hashemi and Christos Thrampoulidis and Renjie Liao},
  year   = {2022},
  eprint = {2211.00692},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2211.00692}
}

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/2211.00692.svg)](https://codeofpaper.com/paper/2211.00692)

Discussion