NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Rethinking Test Generalisation In Neural Algorithmic Reasoning

Manasvi Aggarwal, Dulhan Jayalath, Jonas JürßLOG 2025

TL;DR

This paper argues that current evaluations of Neural Algorithmic Reasoning (NAR) are flawed due to biased test sets, leading to an overestimation of NAR's generalization capabilities. They introduce a new metric, the Generalisation Out-of-Distribution (GOOD) score, to better assess generalization across a distribution of problem sizes, revealing that simple Graph Neural Networks (GNNs) often outperform NAR on larger instances.

What Problem Does This Paper Address?

Neural Algorithmic Reasoning (NAR) aims to equip neural networks with the ability to solve classical algorithms by mimicking step-by-step execution, often using recurrent Graph Neural Networks (GNNs) and intermediate supervision (hints). The promise is that this approach leads to better out-of-distribution (OOD) generalization. However, this paper questions the extent of this generalization. The authors observe that the standard benchmark for NAR, CLRS-30, might be misleading. They hypothesize that the test sets, which often consist of specific problem instance sizes, don't truly capture how well a model generalizes across a distribution of problem sizes. This can lead to an inaccurate assessment, where a method might perform well on a few specific test sizes but fail to generalize broadly. The core problem is the lack of a robust and representative evaluation metric for OOD generalization in NAR.

Methods

The paper introduces a new metric called the Generalisation Out-of-Distribution (GOOD) score. This metric aims to quantify a model's generalization performance across a distribution of problem instances (e.g., graph sizes). Instead of relying on performance at discrete test points, GOOD approximates the area under a curve plotting performance against the distribution parameter. This is achieved by evaluating the model at several strategically chosen points and then using the trapezoid rule to estimate the integral.

The authors also propose a GNN baseline for comparison. This baseline uses the same underlying processor network as the NAR models but removes the recurrence and intermediate supervision (hints). This allows them to isolate the contributions of these NAR-specific features to generalization.

Datasets

The primary dataset used for training and evaluation is the CLRS-30 benchmark. This benchmark contains 30 fundamental algorithms and is used to evaluate NAR models. The authors use the standard CLRS-30 protocol, training on synthetic graphs within a specific input size range (4-16 nodes) and evaluating on OOD settings with larger graphs. No new benchmarks are introduced, but the paper critiques the evaluation methodology applied to existing benchmarks.

Key Insights and Ideas

  • Distributional Bias in NAR Evaluation: The standard evaluation of NAR on CLRS-30 is biased by the specific sizes of test instances, not by a true distribution of problem sizes. This leads to an overestimation of NAR's generalization capabilities.
  • Simple GNNs Can Outperform NAR: Surprisingly, simple GNN baselines (without recurrence or hints) often match or even exceed the performance of specialized NAR architectures, especially on larger graph instances.
  • The GOOD Score: The proposed GOOD score provides a more nuanced and accurate measure of OOD generalization by considering performance across a range of problem sizes, not just isolated test points.
  • NAR's Asymptotic Weakness: While NAR might offer some advantages on slightly out-of-distribution instances, its performance often degrades significantly on larger problem sizes compared to simpler GNNs, highlighting a critical roadblock in achieving true generalization.

Key Results

  • On the CLRS test set, a simple GNN baseline (Triplet-GMPNN) outperforms NAR in 45.8% of tasks and is within 1 standard deviation for 66.7%.
  • For algorithms like Topological Sort and DFS, simple GNNs consistently outperform NAR on larger graph sizes, showing a performance "phase change" where GNNs remain stable while NAR degrades.
  • Table 1 shows GOOD scores for various algorithms. For instance, Bellman Ford shows a significant difference in GOOD scores between the baseline and NAR, suggesting NAR's advantage is limited. Conversely, for BFS, the scores are very close, indicating little to no advantage for NAR.

Limitations and Future Work

  • Algorithm Dependency: The performance gap between NAR and GNN baselines varies significantly across different algorithms. Further research is needed to understand why NAR excels in some cases (e.g., Bellman-Ford, where recurrence helps with long update chains) but fails in others.
  • Understanding NAR Failure: The paper points to prior work suggesting that enforcing specific hints and intermediate supervision might actually hurt generalization. This warrants further investigation.
  • Future Work: The authors hope that the GOOD score will introduce more rigor into NAR evaluation. They suggest that future work should focus on understanding the specific reasons behind NAR's asymptotic performance degradation and exploring new avenues to improve its generalization capabilities beyond the current approaches.

Summary updated

BibTeX
@inproceedings{aggarwal2025rethinking,
  author = {Manasvi Aggarwal and Dulhan Jayalath and Jonas Jürß},
  title = {{Rethinking Test Generalisation In Neural Algorithmic Reasoning}},
  booktitle = {LOG},
  year = {2025},
  url = {https://openreview.net/forum?id=mX0tP6kivu},
}

Loading related content...

Figure