Lune

ICML2025Top-tier venue

Discrete Neural Algorithmic Reasoning

Gleb Rodionov, Liudmila Prokhorenkova

Abstract

Neural algorithmic reasoning aims to capture computations with neural networks by training models to imitate the execution of classical algorithms. While common architectures are expressive enough to contain the correct model in the weight space, current neural reasoners struggle to generalize well on out-of-distribution data. On the other hand, classical computations are not affected by distributional shifts as they can be described as transitions between discrete computational states. In this work, we propose to force neural reasoners to maintain the execution trajectory as a combination of finite predefined states. To achieve this, we separate discrete and continuous data flows and describe the interaction between them. Trained with supervision on the algorithm's state transitions, such models are able to perfectly align with the original algorithm. To show this, we evaluate our approach on multiple algorithmic problems and achieve perfect test scores both in single-task and multitask setups. Moreover, the proposed architectural choice allows us to prove the correctness of the learned algorithms for any test data.

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.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • What Algorithms can Transformers Learn? A Study in Length Generalization cites Thinking Like Transformers
  • The CLRS Algorithmic Reasoning Benchmark cites Neural Execution of Graph Algorithms
  • Primal-Dual Neural Algorithmic Reasoning cites The CLRS Algorithmic Reasoning Benchmark
  • Primal-Dual Neural Algorithmic Reasoning cites What Can Neural Networks Reason About?
  • Primal-Dual Neural Algorithmic Reasoning cites Neural Execution of Graph Algorithms
  • Learning to Execute Graph Algorithms Exactly with Graph Neural Networks cites What Algorithms can Transformers Learn? A Study in Length Generalization
  • Learning to Execute Graph Algorithms Exactly with Graph Neural Networks cites The CLRS Algorithmic Reasoning Benchmark
  • Learning to Execute Graph Algorithms Exactly with Graph Neural Networks cites Neural Execution of Graph Algorithms
  • Learning to Execute Graph Algorithms Exactly with Graph Neural Networks cites Tropical Attention: Neural Algorithmic Reasoning for Combinatorial Algorithms
  • Learning to Execute Graph Algorithms Exactly with Graph Neural Networks cites Transformers Can Do Arithmetic with the Right Embeddings
  • Towards Learning High-Precision Least Squares Algorithms with Sequence Models cites The CLRS Algorithmic Reasoning Benchmark
  • Tropical Attention: Neural Algorithmic Reasoning for Combinatorial Algorithms cites Neural Execution of Graph Algorithms
  • Transformers Can Do Arithmetic with the Right Embeddings cites What Algorithms can Transformers Learn? A Study in Length Generalization
  • Transformers Can Do Arithmetic with the Right Embeddings cites The CLRS Algorithmic Reasoning Benchmark
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. Transformers Can Do Arithmetic with the Right EmbeddingsSean McLeish, Arpit Bansal, Alex Stein, Neel Jain et al.NeurIPS 2024 · 94 citations
  2. Tropical Attention: Neural Algorithmic Reasoning for Combinatorial AlgorithmsBaran Hashemi, Kurt Pasque, Christopher Teska, Ruriko YoshidaNeurIPS 2025 · 14 citations
  3. Primal-Dual Neural Algorithmic ReasoningYu He, Ellen VitercikICML 2025
  4. Learning to Execute Graph Algorithms Exactly with Graph Neural NetworksMuhammad Fetrat Qharabagh, Artur Back de Luca, George Giapitzakis, Kimon FountoulakisICML 2026
  5. Towards Learning High-Precision Least Squares Algorithms with Sequence ModelsJerry Weihong Liu, Jessica Grogan, Owen M. Dugan, Ashish Rao et al.ICLR 2025

Builds on18

  1. What Can Neural Networks Reason About?Keyulu Xu, Jingling Li, Mozhi Zhang, Simon S. Du et al.ICLR 2020 · 281 citations
  2. Neural Execution of Graph AlgorithmsPetar Velickovic, Rex Ying, Matilde Padovano, Raia Hadsell et al.ICLR 2020 · 192 citations
  3. What Algorithms can Transformers Learn? A Study in Length GeneralizationHattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin et al.ICLR 2024 · 189 citations
  4. Thinking Like TransformersGail Weiss, Yoav Goldberg, Eran YahavICML 2021 · 183 citations
  5. The CLRS Algorithmic Reasoning BenchmarkPetar Velickovic, Adrià Puigdomènech Badia, David Budden, Razvan Pascanu et al.ICML 2022 · 118 citations

Related papers

  1. Neural Algorithmic Reasoning Without Intermediate SupervisionGleb Rodionov, Liudmila ProkhorenkovaNeurIPS 2023 · 20 citations
  2. Neural Algorithmic Reasoning with Causal RegularisationBeatrice Bevilacqua, Kyriacos Nikiforou, Borja Ibarz, Ioana Bica et al.ICML 2023 · 39 citations
  3. How to transfer algorithmic reasoning knowledge to learn new algorithms?Louis-Pascal A. C. Xhonneux, Andreea Deac, Petar Velickovic, Jian TangNeurIPS 2021 · 32 citations
  4. Richer Representations for Neural Algorithmic Reasoning via Auxiliary ReconstructionJiafu Huang, Chao Peng, Chenyang Xu, Zhengfeng Yang et al.AAAI 2026
  5. Deep Equilibrium Algorithmic ReasoningDobrik Georgiev, Joseph Wilson, Davide Buffelli, Pietro LióNeurIPS 2024 · 7 citations
Dusk over the sea between two cliffs drawn in fine vertical lines