The Devil is in the Detail: Simple Tricks Improve Systematic Generalization of Transformers
Not on the map. Why?
Abstract (arXiv)
Recently, many datasets have been proposed to test the systematic generalization ability of neural networks. The companion baseline Transformers, typically trained with default hyper-parameters from standard tasks, are shown to fail dramatically. Here we demonstrate that by revisiting model configurations as basic as scaling of embeddings, early stopping, relative positional embedding, and Universal Transformer variants, we can drastically improve the performance of Transformers on systematic generalization. We report improvements on five popular datasets: SCAN, CFQ, PCFG, COGS, and Mathematics dataset. Our models improve accuracy from 50% to 85% on the PCFG productivity split, and from 35% to 81% on COGS. On SCAN, relative positional embedding largely mitigates the EOS decision problem (Newman et al., 2020), yielding 100% accuracy on the length split with a cutoff at 26. Importantly, performance differences between these models are typically invisible on the IID data split. This calls for proper generalization validation sets for developing neural networks that generalize systematically. We publicly release the code to reproduce our results.
Key facts. Cited by 117 papers in the map (data through 7 Oct 2026). Builds on 39 of its 56 references that are in the map. First posted on arXiv 26 Aug 2021.
Builds on
39 of 56 references.
References · 39
- 2017Attention Is All You Needcited by 59,932
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2015Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classificationcited by 3,590
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2018Self-Attention with Relative Position Representationscited by 1,112
- 2019Deep Double Descent: Where Bigger Models and More Data Hurtcited by 667
- 2018Universal Transformerscited by 613
- 2016Adaptive Computation Time for Recurrent Neural Networkscited by 479
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 471
- 2019Analysing Mathematical Reasoning Abilities of Neural Modelscited by 331
- 2019Measuring Compositional Generalization: A Comprehensive Method on Realistic Datacited by 280
27 more
- 2019Compositionality decomposed: how do neural networks generalise?cited by 264
- 2020COGS: A Compositional Generalization Challenge Based on Semantic Interpretationcited by 260
- 2020On the Binding Problem in Artificial Neural Networkscited by 230
- 2019Good-Enough Compositional Data Augmentationcited by 158
- 2020Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?cited by 147
- 2015Neural GPUs Learn Algorithmscited by 118
- 2019Compositional generalization through meta sequence-to-sequence learningcited by 98
- 2020Are Neural Nets Modular? Inspecting Functional Modularity Through Differentiable Weight Maskscited by 97
- 2020Compositional Generalization in Semantic Parsing: Pre-training vs. Specialized Architecturescited by 95
- 2021Going Beyond Linear Transformers with Recurrent Fast Weight Programmerscited by 84
- 2020Compositional Generalization via Neural-Symbolic Stack Machinescited by 80
- 2020Span-based Semantic Parsing for Compositional Generalizationcited by 77
- 2020Learning Compositional Rules via Neural Program Synthesiscited by 74
- 2021Making Transformers Solve Compositional Taskscited by 72
- 2019CLOSURE: Assessing Systematic Generalization of CLEVR Modelscited by 63
- 2019Improving Deep Transformer with Depth-Scaled Initialization and Merged Attentioncited by 59
- 2019Compositional generalization in a deep seq2seq model by separating syntax and semanticscited by 56
- 2021Unlocking Compositional Generalization in Pre-trained Models Using Intermediate Representationscited by 55
- 2020Compositional Generalization by Learning Analytical Expressionscited by 53
- 2019Compositional Generalization for Primitive Substitutionscited by 48
- 2020The EOS Decision and Length Extrapolationcited by 46
- 2021GradInit: Learning to Initialize Neural Networks for Stable and Efficient Trainingcited by 44
- 2018Memorize or generalize? Searching for a compositional RNN in a haystackcited by 41
- 2019Enhancing the Transformer with Explicit Relational Encoding for Math Problem Solvingcited by 34
- 2020Hierarchical Poset Decoding for Compositional Generalization in Languagecited by 26
- 2019Transcoding compositionally: using attention to find more generalizable solutionscited by 14
- 2019Improving Differentiable Neural Computers Through Memory Masking, De-allocation, and Link Distribution Sharpness Controlcited by 9
Built on by
Citing papers per year: 2021: 11; 2022: 28; 2023: 28; 2024: 25; 2025: 15; 2026: 10.
117 papers.
Sort:
By area:
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
- 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 114
- 2022Teaching Algorithmic Reasoning via In-context Learningcited by 111
- 2022Fusing finetuned models for better pretrainingcited by 110
- 2022General-Purpose In-Context Learning by Meta-Learning Transformerscited by 102
- 2022State-of-the-art generalisation research in NLP: A taxonomy and reviewcited by 97
- 2023Generalization on the Unseen, Logic Reasoning and Degree Curriculumcited by 73
- 2023Efficient Benchmarking of Language Modelscited by 71
- 2021The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalizationcited by 62
- 2024MoEUT: Mixture-of-Experts Universal Transformerscited by 55
- 2023Grokking of Hierarchical Structure in Vanilla Transformerscited by 53
- 2023How Do In-Context Examples Affect Compositional Generalization?cited by 51
38 more
- 2022Evaluating the Impact of Model Scale for Compositional Generalization in Semantic Parsingcited by 50
- 2021Improving Compositional Generalization with Latent Structure and Data Augmentationcited by 46
- 2021Systematic Generalization with Edge Transformerscited by 38
- 2023The Impact of Depth on Compositional Generalization in Transformer Language Modelscited by 37
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpadcited by 35
- 2021Sequence-to-Sequence Learning with Latent Neural Grammarscited by 30
- 2022Unobserved Local Structures Make Compositional Generalization Hardcited by 29
- 2022WOODS: Benchmarks for Out-of-Distribution Generalization in Time Seriescited by 29
- 2023Sparse Universal Transformercited by 28
- 2023Towards Autoformalization of Mathematics and Code Correctness: Experiments with Elementary Proofscited by 27
- 2022Uncontrolled Lexical Exposure Leads to Overestimation of Compositional Generalization in Pretrained Modelscited by 26
- 2022Structural generalization is hard for sequence-to-sequence modelscited by 24
- 2023ReCOGS: How Incidental Details of a Logical Form Overshadow an Evaluation of Semantic Interpretationcited by 24
- 2023DecoderLens: Layerwise Interpretation of Encoder-Decoder Transformerscited by 22
- 2023SLOG: A Structural Generalization Benchmark for Semantic Parsingcited by 22
- 2023Compositional Capabilities of Autoregressive Transformers: A Study on Synthetic, Interpretable Taskscited by 21
- 2022Revisiting the Compositional Generalization Abilities of Neural Sequence Modelscited by 20
- 2021ReaSCAN: Compositional Reasoning in Language Groundingcited by 19
- 2022Systematic Generalization and Emergent Structures in Transformers Trained on Structured Taskscited by 19
- 2022The Curious Case of Absolute Position Embeddingscited by 17
- 2023ExeDec: Execution Decomposition for Compositional Generalization in Neural Program Synthesiscited by 17
- 2025RExBench: Can coding agents autonomously implement AI research extensions?cited by 17
- 2024A Survey on Compositional Learning of AI Models: Theoretical and Experimental Practicescited by 15
- 2024Limits of Transformer Language Models on Learning to Compose Algorithmscited by 13
- 2021Compositional Attention: Disentangling Search and Retrievalcited by 12
- 2022LogicInference: A New Dataset for Teaching Logical Inference to seq2seq Modelscited by 12
- 2022Eliciting and Understanding Cross-Task Skills with Task-Level Mixture-of-Expertscited by 12
- 2022Neural-Symbolic Recursive Machine for Systematic Generalizationcited by 12
- 2022CTL++: Evaluating Generalization on Never-Seen Compositional Patterns of Known Functions, and Compatibility of Neural Representationscited by 12
- 2022When Can Transformers Ground and Compose: Insights from Compositional Generalization Benchmarkscited by 11
- 2023Large Language Model Programscited by 11
- 2026Hyperloop Transformerscited by 11
- 2024Benchmarking GPT-4 on Algorithmic Problems: A Systematic Evaluation of Prompting Strategiescited by 9
- 2022Structurally Diverse Sampling for Sample-Efficient Training and Comprehensive Evaluationcited by 8
- 2022Benchmarking Long-tail Generalization with Likelihood Splitscited by 8
- 2022Mutual Exclusivity Training and Primitive Augmentation to Induce Compositionalitycited by 8
- 2025The Role of Sparsity for Length Generalization in Transformerscited by 8
- 2021LAGr: Labeling Aligned Graphs for Improving Systematic Generalization in Semantic Parsingcited by 7
50 most cited of 117 All 117 (JSON)
- 2026MoRE: Mixture of Reused Experts16 Sep 2026
- 2026Universal Transformers for Circuit Computations: Perfect Length Generalization in Tiny Transformers31 Aug 2026
- 2026Input Pathways Shape Few-Shot, Not Zero-Shot, Binding in Tiny Transformers: A Fully-Enumerable Study6 Jul 2026
- 2026Unveiling the Visual Counting Bottleneck in Vision-Language Models28 May 2026
- 2026LT2: Linear-Time Looped Transformers20 May 2026
- 2026Universal Transformers Need Memory: Depth-State Trade-offs in Adaptive Recursive Reasoning23 Apr 2026
- 2026Hyperloop Transformers23 Apr 2026
- 2026Recurrent Reasoning on Symbolic Puzzles with Sequence Models19 Apr 2026
- 2026Why Depth Matters in Parallelizable Sequence Models: A Lie Algebraic View5 Mar 2026
- 2026Seeing to Generalize: How Visual Data Corrects Binding Shortcuts16 Feb 2026
- 2025COGITAO: A Visual Reasoning Framework To Study Compositionality & Generalization5 Sep 2025
- 2025Learning neuro-symbolic convergent term rewriting systems25 Jul 2025
38 more
- 2025Scaling can lead to compositional generalization9 Jul 2025
- 2025Beyond Statistical Learning: Exact Learning Is Essential for General Intelligence30 Jun 2025
- 2025RExBench: Can coding agents autonomously implement AI research extensions?27 Jun 2025
- 2025Chain-of-Experts: Unlocking the Communication Power of Mixture-of-Experts Models23 Jun 2025
- 2025Behavioural vs. Representational Systematicity in End-to-End Models: An Opinionated Survey4 Jun 2025
- 2025TRACE for Tracking the Emergence of Semantic Representations in Transformers23 May 2025
- 2025Comparison of Different Deep Neural Network Models in the Cultural Heritage Domain30 Apr 2025
- 2025Exploring Compositional Generalization (in COGS/ReCOGS_pos) by Transformers using Restricted Access Sequence Processing (RASP)21 Apr 2025
- 2025Context-aware Biases for Length Extrapolation11 Mar 2025
- 2025Structural Deep Encoding for Table Question Answering3 Mar 2025
- 2025The Role of Sparsity for Length Generalization in Transformers24 Feb 2025
- 2025Analyzing the Inner Workings of Transformers in Compositional Generalization21 Feb 2025
- 2025CARMA: Enhanced Compositionality in LLMs via Advanced Regularisation and Mutual Information Alignment16 Feb 2025
- 2024Why Are Positional Encodings Nonessential for Deep Autoregressive Transformers? Revisiting a Petroglyph31 Dec 2024
- 2024Compositional Generalization Across Distributional Shifts with Sparse Tree Operations18 Dec 2024
- 2024Quantifying artificial intelligence through algorithmic generalization8 Nov 2024
- 2024ALTA: Compiler-Based Analysis of Transformers23 Oct 2024
- 2024Overcoming classic challenges for artificial neural networks by providing incentives and practice14 Oct 2024
- 2024Adaptive Prediction Ensemble: Improving Out-of-Distribution Generalization of Motion Forecasting12 Jul 2024
- 2024Are there identifiable structural parts in the sentence embedding whole?24 Jun 2024
- 2024Evaluating Structural Generalization in Neural Machine Translation19 Jun 2024
- 2024A Survey on Compositional Learning of AI Models: Theoretical and Experimental Practices13 Jun 2024
- 2024Learning interpretable positional encodings in transformers depends on initialization12 Jun 2024
- 2024How Far Can Transformers Reason? The Globality Barrier and Inductive Scratchpad10 Jun 2024
- 2024On the Minimal Degree Bias in Generalization on the Unseen for non-Boolean Functions10 Jun 2024
- 2024MoEUT: Mixture-of-Experts Universal Transformers25 May 2024
- 2024From Frege to chatGPT: Compositionality in language, cognition, and deep neural networks24 May 2024
- 2024Philosophy of Cognitive Science in the Age of Deep Learning7 May 2024
- 2024What makes Models Compositional? A Theoretical View: With Supplement2 May 2024
- 2024Setting up the Data Printer with Improved English to Ukrainian Machine Translation23 Apr 2024
- 2024Sequential Compositional Generalization in Multimodal Models18 Apr 2024
- 2024Enhancing Length Extrapolation in Sequential Models with Pointer-Augmented Neural Memory18 Apr 2024
- 2024Towards Understanding the Relationship between In-context Learning and Compositional Generalization18 Mar 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
- 2024Inducing Systematicity in Transformers by Attending to Structurally Quantized Embeddings9 Feb 2024
- 2024Limits of Transformer Language Models on Learning to Compose Algorithms8 Feb 2024
- 2024On the generalization capacity of neural networks during generic multimodal reasoning26 Jan 2024
50 newest of 117 All 117 (JSON)
- 2022Teaching Algorithmic Reasoning via In-context Learningcited by 111
- 2023How Do In-Context Examples Affect Compositional Generalization?cited by 51
- 2025Beyond Statistical Learning: Exact Learning Is Essential for General Intelligencecited by 6
- 2024On the generalization capacity of neural networks during generic multimodal reasoningcited by 3
- 2023A Hybrid System for Systematic Generalization in Simple Arithmetic Problemscited by 1
- 2025COGITAO: A Visual Reasoning Framework To Study Compositionality & Generalizationcited by 0
- 2026Recurrent Reasoning on Symbolic Puzzles with Sequence Modelscited by 0
- 2026Recurrent Reasoning on Symbolic Puzzles with Sequence Models19 Apr 2026
- 2025COGITAO: A Visual Reasoning Framework To Study Compositionality & Generalization5 Sep 2025
- 2025Beyond Statistical Learning: Exact Learning Is Essential for General Intelligence30 Jun 2025
- 2024On the generalization capacity of neural networks during generic multimodal reasoning26 Jan 2024
- 2023A Hybrid System for Systematic Generalization in Simple Arithmetic Problems29 Jun 2023
- 2023How Do In-Context Examples Affect Compositional Generalization?8 May 2023
- 2022Teaching Algorithmic Reasoning via In-context Learning15 Nov 2022
- 2024MoEUT: Mixture-of-Experts Universal Transformerscited by 55
- 2023Sparse Universal Transformercited by 28
- 2022Eliciting and Understanding Cross-Task Skills with Task-Level Mixture-of-Expertscited by 12
- 2025Chain-of-Experts: Unlocking the Communication Power of Mixture-of-Experts Modelscited by 7
- 2026MoRE: Mixture of Reused Expertscited by 1
- 2026MoRE: Mixture of Reused Experts16 Sep 2026
- 2025Chain-of-Experts: Unlocking the Communication Power of Mixture-of-Experts Models23 Jun 2025
- 2024MoEUT: Mixture-of-Experts Universal Transformers25 May 2024
- 2023Sparse Universal Transformer11 Oct 2023
- 2022Eliciting and Understanding Cross-Task Skills with Task-Level Mixture-of-Experts25 May 2022
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
- 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 114
- 2022Fusing finetuned models for better pretrainingcited by 110
- 2022General-Purpose In-Context Learning by Meta-Learning Transformerscited by 102
- 2022State-of-the-art generalisation research in NLP: A taxonomy and reviewcited by 97
- 2023Generalization on the Unseen, Logic Reasoning and Degree Curriculumcited by 73
- 2023Efficient Benchmarking of Language Modelscited by 71
- 2021The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalizationcited by 62
- 2023Grokking of Hierarchical Structure in Vanilla Transformerscited by 53
- 2022Evaluating the Impact of Model Scale for Compositional Generalization in Semantic Parsingcited by 50
- 2021Improving Compositional Generalization with Latent Structure and Data Augmentationcited by 46
- 2021Systematic Generalization with Edge Transformerscited by 38
12 most cited of 101 All 101 (JSON)
- 2026Universal Transformers for Circuit Computations: Perfect Length Generalization in Tiny Transformers31 Aug 2026
- 2026Input Pathways Shape Few-Shot, Not Zero-Shot, Binding in Tiny Transformers: A Fully-Enumerable Study6 Jul 2026
- 2026LT2: Linear-Time Looped Transformers20 May 2026
- 2026Universal Transformers Need Memory: Depth-State Trade-offs in Adaptive Recursive Reasoning23 Apr 2026
- 2026Hyperloop Transformers23 Apr 2026
- 2025Learning neuro-symbolic convergent term rewriting systems25 Jul 2025
- 2025Scaling can lead to compositional generalization9 Jul 2025
- 2025Behavioural vs. Representational Systematicity in End-to-End Models: An Opinionated Survey4 Jun 2025
- 2025TRACE for Tracking the Emergence of Semantic Representations in Transformers23 May 2025
- 2025Comparison of Different Deep Neural Network Models in the Cultural Heritage Domain30 Apr 2025
- 2025Exploring Compositional Generalization (in COGS/ReCOGS_pos) by Transformers using Restricted Access Sequence Processing (RASP)21 Apr 2025
- 2025Context-aware Biases for Length Extrapolation11 Mar 2025
12 newest of 101 All 101 (JSON)