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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 60aac8d3-d6b2-402f-ad66-d63b0fc65fd5Cited by top-tier papers6
- Transformers Can Do Arithmetic with the Right EmbeddingsSean McLeish, Arpit Bansal, Alex Stein, Neel Jain et al.NeurIPS 2024 · 94 citations
- Tropical Attention: Neural Algorithmic Reasoning for Combinatorial AlgorithmsBaran Hashemi, Kurt Pasque, Christopher Teska, Ruriko YoshidaNeurIPS 2025 · 14 citations
- Primal-Dual Neural Algorithmic ReasoningYu He, Ellen VitercikICML 2025
- Learning to Execute Graph Algorithms Exactly with Graph Neural NetworksMuhammad Fetrat Qharabagh, Artur Back de Luca, George Giapitzakis, Kimon FountoulakisICML 2026
- 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
- What Can Neural Networks Reason About?Keyulu Xu, Jingling Li, Mozhi Zhang, Simon S. Du et al.ICLR 2020 · 281 citations
- Neural Execution of Graph AlgorithmsPetar Velickovic, Rex Ying, Matilde Padovano, Raia Hadsell et al.ICLR 2020 · 192 citations
- What Algorithms can Transformers Learn? A Study in Length GeneralizationHattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin et al.ICLR 2024 · 189 citations
- Thinking Like TransformersGail Weiss, Yoav Goldberg, Eran YahavICML 2021 · 183 citations
- The CLRS Algorithmic Reasoning BenchmarkPetar Velickovic, Adrià Puigdomènech Badia, David Budden, Razvan Pascanu et al.ICML 2022 · 118 citations
Related papers
- Neural Algorithmic Reasoning Without Intermediate SupervisionGleb Rodionov, Liudmila ProkhorenkovaNeurIPS 2023 · 20 citations
- Neural Algorithmic Reasoning with Causal RegularisationBeatrice Bevilacqua, Kyriacos Nikiforou, Borja Ibarz, Ioana Bica et al.ICML 2023 · 39 citations
- How to transfer algorithmic reasoning knowledge to learn new algorithms?Louis-Pascal A. C. Xhonneux, Andreea Deac, Petar Velickovic, Jian TangNeurIPS 2021 · 32 citations
- Richer Representations for Neural Algorithmic Reasoning via Auxiliary ReconstructionJiafu Huang, Chao Peng, Chenyang Xu, Zhengfeng Yang et al.AAAI 2026
- Deep Equilibrium Algorithmic ReasoningDobrik Georgiev, Joseph Wilson, Davide Buffelli, Pietro LióNeurIPS 2024 · 7 citations
