The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalization
Not on the map. Why?
Abstract (arXiv)
Despite progress across a broad range of applications, Transformers have limited success in systematic generalization. The situation is especially frustrating in the case of algorithmic tasks, where they often fail to find intuitive solutions that route relevant information to the right node/operation at the right time in the grid represented by Transformer columns. To facilitate the learning of useful control flow, we propose two modifications to the Transformer architecture, copy gate and geometric attention. Our novel Neural Data Router (NDR) achieves 100% length generalization accuracy on the classic compositional table lookup task, as well as near-perfect accuracy on the simple arithmetic task and a new variant of ListOps testing for generalization across computational depths. NDR's attention and gating patterns tend to be interpretable as an intuitive form of neural routing. Our code is public.
Key facts. Cited by 62 papers in the map (data through 14 Oct 2026). Builds on 45 of its 61 references that are in the map. First posted on arXiv 14 Oct 2021.
Builds on
45 of 61 references.
References · 45
- 2017Attention Is All You Needcited by 60,361
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
- 2020GLU Variants Improve Transformercited by 1,804
- 2018Self-Attention with Relative Position Representationscited by 1,120
- 2016Language Modeling with Gated Convolutional Networkscited by 702
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
- 2018Universal Transformerscited by 647
- 2016Adaptive Computation Time for Recurrent Neural Networkscited by 506
33 more
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 471
- 2019Measuring Compositional Generalization: A Comprehensive Method on Realistic Datacited by 284
- 2019Stabilizing Transformers for Reinforcement Learningcited by 270
- 2019Compositionality decomposed: how do neural networks generalise?cited by 265
- 2020On the Binding Problem in Artificial Neural Networkscited by 233
- 2021Thinking Like Transformerscited by 184
- 2015Training Very Deep Networkscited by 173
- 2021PonderNet: Learning to Pondercited by 168
- 2020Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?cited by 147
- 2015Character-Aware Neural Language Modelscited by 132
- 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 129
- 2021The Devil is in the Detail: Simple Tricks Improve Systematic Generalization of Transformerscited by 117
- 2019Compositional generalization through meta sequence-to-sequence learningcited by 99
- 2019Language Modeling with Deep Transformerscited by 96
- 2020Compositional Generalization in Semantic Parsing: Pre-training vs. Specialized Architecturescited by 95
- 2021Going Beyond Linear Transformers with Recurrent Fast Weight Programmerscited by 89
- 2020Compositional Generalization via Neural-Symbolic Stack Machinescited by 80
- 2021Making Transformers Solve Compositional Taskscited by 72
- 2019CLOSURE: Assessing Systematic Generalization of CLEVR Modelscited by 63
- 2019Compositional generalization in a deep seq2seq model by separating syntax and semanticscited by 56
- 2020Compositional Generalization by Learning Analytical Expressionscited by 53
- 2019Compositional Generalization for Primitive Substitutionscited by 48
- 2018Memorize or generalize? Searching for a compositional RNN in a haystackcited by 41
- 2019Location Attention for Extrapolation to Longer Sequencescited by 33
- 2019Cooperative Learning of Disjoint Syntax and Semanticscited by 27
- 2019CNNs found to jump around more skillfully than RNNs: Compositional generalization in seq2seq convolutional networkscited by 22
- 2019Ordered Memorycited by 20
- 2021Modeling Hierarchical Structures with Continuous Recursive Neural Networkscited by 15
- 2019Transcoding compositionally: using attention to find more generalizable solutionscited by 14
- 2021Can Transformers Jump Around Right in Natural Language? Assessing Performance Transfer from SCANcited by 14
- 2018Learning compositionally through attentive guidancecited by 11
- 2019Improving Differentiable Neural Computers Through Memory Masking, De-allocation, and Link Distribution Sharpness Controlcited by 9
- 2021Reinforcement Learning of Implicit and Explicit Control Flow in Instructionscited by 4
Built on by
Citing papers per year: 2021: 2; 2022: 7; 2023: 18; 2024: 17; 2025: 12; 2026: 6.
62 papers.
Sort:
By area:
- 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
- 2022Block-Recurrent Transformerscited by 110
- 2022Unveiling Transformers with LEGO: a synthetic reasoning taskcited by 106
- 2021Linear algebra with transformerscited by 63
- 2022A Generalist Neural Algorithmic Learnercited by 59
- 2024MoEUT: Mixture-of-Experts Universal Transformerscited by 59
- 2023Positional Description Matters for Transformers Arithmeticcited by 56
- 2025Forgetting Transformer: Softmax Attention with a Forget Gatecited by 53
- 2022A Modern Self-Referential Weight Matrix That Learns to Modify Itselfcited by 41
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpadcited by 36
- 2023SwitchHead: Accelerating Transformers with Mixture-of-Experts Attentioncited by 34
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformationscited by 34
38 more
- 2022SALSA: Attacking Lattice Cryptography with Transformerscited by 28
- 2024V2PE: Improving Multimodal Long-Context Capability of Vision-Language Models with Variable Visual Position Encodingcited by 28
- 2023Approximating Two-Layer Feedforward Networks for Efficient Transformerscited by 27
- 2023When can transformers reason with abstract symbols?cited by 24
- 2023Compositional Capabilities of Autoregressive Transformers: A Study on Synthetic, Interpretable Taskscited by 22
- 2025Complexity Control Facilitates Reasoning-Based Compositional Generalization in Transformerscited by 20
- 2022Systematic Generalization and Emergent Structures in Transformers Trained on Structured Taskscited by 19
- 2023ModuleFormer: Modularity Emerges from Mixture-of-Expertscited by 17
- 2024Initialization is Critical to Whether Transformers Fit Composite Functions by Reasoning or Memorizingcited by 17
- 2023Transformer Working Memory Enables Regular Language Reasoning and Natural Language Length Extrapolationcited by 13
- 2024Scaling Stick-Breaking Attention: An Efficient Implementation and In-depth Studycited by 13
- 2025An Analysis for Reasoning Bias of Language Models with Small Initializationcited by 13
- 2022CTL++: Evaluating Generalization on Never-Seen Compositional Patterns of Known Functions, and Compatibility of Neural Representationscited by 12
- 2026Hyperloop Transformerscited by 12
- 2023SALSA PICANTE: a machine learning attack on LWE with binary secretscited by 11
- 2023From Interpolation to Extrapolation: Complete Length Generalization for Arithmetic Transformerscited by 10
- 2025Learning to Skip the Middle Layers of Transformerscited by 10
- 2025Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddingscited by 10
- 2023Monotonic Location Attention for Length Generalizationcited by 9
- 2024Benchmarking GPT-4 on Algorithmic Problems: A Systematic Evaluation of Prompting Strategiescited by 9
- 2025The Role of Sparsity for Length Generalization in Transformerscited by 8
- 2023Beam Tree Recursive Cellscited by 6
- 2024Transformer Normalisation Layers and the Independence of Semantic Subspacescited by 6
- 2024Recurrent Aggregators in Neural Algorithmic Reasoningcited by 6
- 2024Why Are Positional Encodings Nonessential for Deep Autoregressive Transformers? Revisiting a Petroglyphcited by 6
- 2023Compositional Generalization without Trees using Multiset Tagging and Latent Permutationscited by 5
- 2024Investigating Recurrent Transformers with Dynamic Haltcited by 5
- 2023Efficient Beam Tree Recursioncited by 4
- 2026Linear Probe Accuracy Scales with Model Size and Benefits from Multi-Layer Ensemblingcited by 4
- 2023Approximating CKY with Transformerscited by 3
- 2023Attribute Diversity Determines the Systematicity Gap in VQAcited by 3
- 2024Assessing the Emergent Symbolic Reasoning Abilities of Llama Large Language Modelscited by 3
- 2024Overcoming classic challenges for artificial neural networks by providing incentives and practicecited by 3
- 2024A Neural Rewriting System to Solve Algorithmic Problemscited by 2
- 2024Attention-based Iterative Decomposition for Tensor Product Representationcited by 2
- 2021State-Space Constraints Can Improve the Generalisation of the Differentiable Neural Computer to Input Sequences With Unseen Lengthcited by 1
- 2023The Construction of Reality in an AI: A Reviewcited by 1
- 2023A Hybrid System for Systematic Generalization in Simple Arithmetic Problemscited by 1
50 most cited of 62 All 62 (JSON)
- 2026SPIDER: Multi-Layer Semantic Token Pruning and Adaptive Sub-Layer Skipping in Multimodal Large Language Models28 Sep 2026
- 2026Universal Transformers for Circuit Computations: Perfect Length Generalization in Tiny Transformers31 Aug 2026
- 2026Recurrent Transformer-Based Near- and Far-Field THz Wideband Channel Estimation for UM-MIMO12 May 2026
- 2026Hyperloop Transformers23 Apr 2026
- 2026Linear Probe Accuracy Scales with Model Size and Benefits from Multi-Layer Ensembling15 Apr 2026
- 2026Why Depth Matters in Parallelizable Sequence Models: A Lie Algebraic View5 Mar 2026
- 2025Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddings5 Sep 2025
- 2025Iterative In-Context Learning to Enhance LLMs Abstract Reasoning: The Case-Study of Algebraic Tasks1 Sep 2025
- 2025Learning neuro-symbolic convergent term rewriting systems25 Jul 2025
- 2025Learning to Skip the Middle Layers of Transformers26 Jun 2025
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformations22 May 2025
- 2025Exploring Compositional Generalization (in COGS/ReCOGS_pos) by Transformers using Restricted Access Sequence Processing (RASP)21 Apr 2025
38 more
- 2025TRA: Better Length Generalisation with Threshold Relative Attention29 Mar 2025
- 2025Forgetting Transformer: Softmax Attention with a Forget Gate3 Mar 2025
- 2025The Role of Sparsity for Length Generalization in Transformers24 Feb 2025
- 2025Int2Int: a framework for mathematics with transformers22 Feb 2025
- 2025An Analysis for Reasoning Bias of Language Models with Small Initialization5 Feb 2025
- 2025Complexity Control Facilitates Reasoning-Based Compositional Generalization in Transformers15 Jan 2025
- 2024Why Are Positional Encodings Nonessential for Deep Autoregressive Transformers? Revisiting a Petroglyph31 Dec 2024
- 2024V2PE: Improving Multimodal Long-Context Capability of Vision-Language Models with Variable Visual Position Encoding12 Dec 2024
- 2024Scaling Stick-Breaking Attention: An Efficient Implementation and In-depth Study23 Oct 2024
- 2024Overcoming classic challenges for artificial neural networks by providing incentives and practice14 Oct 2024
- 2024Recurrent Aggregators in Neural Algorithmic Reasoning11 Sep 2024
- 2024On the Design Space Between Transformers and Recursive Neural Nets3 Sep 2024
- 2024Block-Operations: Using Modular Routing to Improve Compositional Generalization1 Aug 2024
- 2024Transformer Normalisation Layers and the Independence of Semantic Subspaces25 Jun 2024
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpad10 Jun 2024
- 2024Assessing the Emergent Symbolic Reasoning Abilities of Llama Large Language Models5 Jun 2024
- 2024Attention-based Iterative Decomposition for Tensor Product Representation3 Jun 2024
- 2024MoEUT: Mixture-of-Experts Universal Transformers25 May 2024
- 2024Initialization is Critical to Whether Transformers Fit Composite Functions by Reasoning or Memorizing8 May 2024
- 2024A Neural Rewriting System to Solve Algorithmic Problems27 Feb 2024
- 2024Benchmarking GPT-4 on Algorithmic Problems: A Systematic Evaluation of Prompting Strategies27 Feb 2024
- 2024Investigating Recurrent Transformers with Dynamic Halt1 Feb 2024
- 2024Carrying over algorithm in transformers15 Jan 2024
- 2023SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention13 Dec 2023
- 2023Positional Description Matters for Transformers Arithmetic22 Nov 2023
- 2023Compositional Capabilities of Autoregressive Transformers: A Study on Synthetic, Interpretable Tasks21 Nov 2023
- 2023Attribute Diversity Determines the Systematicity Gap in VQA15 Nov 2023
- 2023From Interpolation to Extrapolation: Complete Length Generalization for Arithmetic Transformers18 Oct 2023
- 2023Approximating Two-Layer Feedforward Networks for Efficient Transformers16 Oct 2023
- 2023When can transformers reason with abstract symbols?15 Oct 2023
- 2023Efficient Beam Tree Recursion20 Jul 2023
- 2023A Hybrid System for Systematic Generalization in Simple Arithmetic Problems29 Jun 2023
- 2023ModuleFormer: Modularity Emerges from Mixture-of-Experts7 Jun 2023
- 2023Monotonic Location Attention for Length Generalization31 May 2023
- 2023Beam Tree Recursive Cells31 May 2023
- 2023Compositional Generalization without Trees using Multiset Tagging and Latent Permutations26 May 2023
- 2023Randomized Positional Encodings Boost Length Generalization of Transformers26 May 2023
- 2023Transformer Working Memory Enables Regular Language Reasoning and Natural Language Length Extrapolation5 May 2023
50 newest of 62 All 62 (JSON)
- 2025An Analysis for Reasoning Bias of Language Models with Small Initializationcited by 13
- 2024Assessing the Emergent Symbolic Reasoning Abilities of Llama Large Language Modelscited by 3
- 2023A Hybrid System for Systematic Generalization in Simple Arithmetic Problemscited by 1
- 2025Iterative In-Context Learning to Enhance LLMs Abstract Reasoning: The Case-Study of Algebraic Taskscited by 0
- 2025Iterative In-Context Learning to Enhance LLMs Abstract Reasoning: The Case-Study of Algebraic Tasks1 Sep 2025
- 2025An Analysis for Reasoning Bias of Language Models with Small Initialization5 Feb 2025
- 2024Assessing the Emergent Symbolic Reasoning Abilities of Llama Large Language Models5 Jun 2024
- 2023A Hybrid System for Systematic Generalization in Simple Arithmetic Problems29 Jun 2023
- 2024MoEUT: Mixture-of-Experts Universal Transformerscited by 59
- 2023SwitchHead: Accelerating Transformers with Mixture-of-Experts Attentioncited by 34
- 2023ModuleFormer: Modularity Emerges from Mixture-of-Expertscited by 17
- 2025Learning to Skip the Middle Layers of Transformerscited by 10
- 2025Learning to Skip the Middle Layers of Transformers26 Jun 2025
- 2024MoEUT: Mixture-of-Experts Universal Transformers25 May 2024
- 2023SwitchHead: Accelerating Transformers with Mixture-of-Experts Attention13 Dec 2023
- 2023ModuleFormer: Modularity Emerges from Mixture-of-Experts7 Jun 2023
- 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
- 2022Block-Recurrent Transformerscited by 110
- 2022Unveiling Transformers with LEGO: a synthetic reasoning taskcited by 106
- 2021Linear algebra with transformerscited by 63
- 2022A Generalist Neural Algorithmic Learnercited by 59
- 2023Positional Description Matters for Transformers Arithmeticcited by 56
- 2025Forgetting Transformer: Softmax Attention with a Forget Gatecited by 53
- 2022A Modern Self-Referential Weight Matrix That Learns to Modify Itselfcited by 41
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpadcited by 36
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformationscited by 34
- 2022SALSA: Attacking Lattice Cryptography with Transformerscited by 28
- 2023Approximating Two-Layer Feedforward Networks for Efficient Transformerscited by 27
12 most cited of 50 All 50 (JSON)
- 2026Universal Transformers for Circuit Computations: Perfect Length Generalization in Tiny Transformers31 Aug 2026
- 2026Recurrent Transformer-Based Near- and Far-Field THz Wideband Channel Estimation for UM-MIMO12 May 2026
- 2026Hyperloop Transformers23 Apr 2026
- 2025Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddings5 Sep 2025
- 2025Learning neuro-symbolic convergent term rewriting systems25 Jul 2025
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformations22 May 2025
- 2025Exploring Compositional Generalization (in COGS/ReCOGS_pos) by Transformers using Restricted Access Sequence Processing (RASP)21 Apr 2025
- 2025TRA: Better Length Generalisation with Threshold Relative Attention29 Mar 2025
- 2025Forgetting Transformer: Softmax Attention with a Forget Gate3 Mar 2025
- 2025The Role of Sparsity for Length Generalization in Transformers24 Feb 2025
- 2025Int2Int: a framework for mathematics with transformers22 Feb 2025
- 2025Complexity Control Facilitates Reasoning-Based Compositional Generalization in Transformers15 Jan 2025
12 newest of 50 All 50 (JSON)