mlsanityData to 7 Oct 2026

On Provable Length and Compositional Generalization

arXiv 2402.04875 ↗First posted 7 Feb 2024cs.LG cs.CL stat.MLcited by 22

Not on the map. Why?

Abstract (arXiv)

Out-of-distribution generalization capabilities of sequence-to-sequence models can be studied from the lens of two crucial forms of generalization: length generalization -- the ability to generalize to longer sequences than ones seen during training, and compositional generalization: the ability to generalize to token combinations not seen during training. In this work, we provide first provable guarantees on length and compositional generalization for common sequence-to-sequence models -- deep sets, transformers, state space models, and recurrent neural nets -- trained to minimize the prediction error. We show that limited capacity versions of these different architectures achieve both length and compositional generalization provided the training distribution is sufficiently diverse. In the first part, we study structured limited capacity variants of different architectures and arrive at the generalization guarantees with limited diversity requirements on the training distribution. In the second part, we study limited capacity variants with less structural assumptions and arrive at generalization guarantees but with more diversity requirements on the training distribution. Further, we also show that chain-of-thought supervision enables length generalization in higher capacity counterparts of the different architectures we study.

Key facts. Cited by 22 papers in the map (data through 7 Oct 2026). Builds on 49 of its 73 references that are in the map. First posted on arXiv 7 Feb 2024.

Builds on

49 of 73 references.

References · 49

  1. 2017Attention Is All You Needcited by 59,932
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
  5. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
  6. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
  7. 2019Invariant Risk Minimizationcited by 1,832
  8. 2017Deep Setscited by 1,394
  9. 2019Distributionally Robust Neural Networks for Group Shifts: On the Importance of Regularization for Worst-Case Generalizationcited by 1,232
  10. 2018Self-Attention with Relative Position Representationscited by 1,112
  11. 2023Textbooks Are All You Needcited by 561
  12. 2015Causal inference using invariant prediction: identification and confidence intervalscited by 533
37 more
  1. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
  2. 2019Variational Autoencoders and Nonlinear ICA: A Unifying Frameworkcited by 494
  3. 2023Resurrecting Recurrent Neural Networks for Long Sequencescited by 397
  4. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
  5. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  6. 2019Compositionality decomposed: how do neural networks generalise?cited by 264
  7. 2020COGS: A Compositional Generalization Challenge Based on Semantic Interpretationcited by 260
  8. 2021Invariance Principle Meets Information Bottleneck for Out-of-Distribution Generalizationcited by 220
  9. 2022Neural Networks and the Chomsky Hierarchycited by 214
  10. 2022Exploring Length Generalization in Large Language Modelscited by 204
  11. 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
  12. 2022Transformer Quality in Linear Timecited by 189
  13. 2021Thinking Like Transformerscited by 182
  14. 2022Diverse Weight Averaging for Out-of-Distribution Generalizationcited by 148
  15. 2023A Theory for Emergence of Complex Skills in Language Modelscited by 111
  16. 2023Can Large Language Models Really Improve by Self-critiquing Their Own Plans?cited by 107
  17. 2020On Linear Identifiability of Learned Representationscited by 103
  18. 2023GPT-4 Doesn't Know It's Wrong: An Analysis of Iterative Prompting for Reasoning Problemscited by 88
  19. 2023Generalization on the Unseen, Logic Reasoning and Degree Curriculumcited by 73
  20. 2023Length Generalization in Arithmetic Transformerscited by 64
  21. 2023Compositional Generalization from First Principlescited by 62
  22. 2023Additive Decoders for Latent Variables Identification and Cartesian-Product Extrapolationcited by 56
  23. 2023A Study on ReLU and Softmax in Transformercited by 53
  24. 2018Rearranging the Familiar: Testing Compositional Generalization in Recurrent Networkscited by 51
  25. 2023Provably Learning Object-Centric Representationscited by 45
  26. 2023Replacing softmax with ReLU in Vision Transformerscited by 43
  27. 2022Compositional Generalization in Unsupervised Compositional Representation Learning: A Study on Disentanglement and Emergent Languagecited by 42
  28. 2023Provable Compositional Generalization for Object-Centric Learningcited by 41
  29. 2020Expressivity of Deep Neural Networkscited by 31
  30. 2022Why does Throwing Away Data Improve Worst-Group Error?cited by 22
  31. 2023Discovering modular solutions that generalize compositionallycited by 22
  32. 2023Spuriosity Didn't Kill the Classifier: Using Invariant Predictions to Harness Spurious Featurescited by 21
  33. 2022First Steps Toward Understanding the Extrapolation of Nonlinear Models to Unseen Domainscited by 20
  34. 2023Learning to Extrapolate: A Transductive Approachcited by 19
  35. 2023A Survey on Compositional Generalization in Applicationscited by 12
  36. 2023Conditions for Length Generalization in Learning Reasoning Skillscited by 7
  37. 2023Can LLM find the green circle? Investigation and Human-guided tool manipulation for compositional generalizationcited by 7

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 8; 2025: 9; 2026: 5.

22 papers.

Sort:

By area:

  1. 2024Position Coupling: Improving Length Generalization of Arithmetic Transformers Using Task Structurecited by 22
  2. 2024Position: Understanding LLMs Requires More Than Statistical Generalizationcited by 20
  3. 2024Interaction Asymmetry: A General Principle for Learning Composable Abstractionscited by 19
  4. 2025Transformers Provably Learn Chain-of-Thought Reasoning with Length Generalizationcited by 12
  5. 2025Position: An Empirically Grounded Identifiability Theory Will Accelerate Self-Supervised Learning Researchcited by 9
  6. 2025The Role of Sparsity for Length Generalization in Transformerscited by 8
  7. 2025Quantitative Bounds for Length Generalization in Transformerscited by 8
  8. 2024Interpret Your Decision: Logical Reasoning Regularization for Generalization in Visual Classificationcited by 5
  9. 2025From Isolation to Entanglement: When Do Interpretability Methods Identify and Disentangle Known Concepts?cited by 5
  10. 2024Neural Networks Generalize on Low Complexity Datacited by 3
  11. 2024Compositional Hardness of Code in Large Language Models -- A Probabilistic Perspectivecited by 3
  12. 2025The Imitation Game: Turing Machine Imitator is Length Generalizable Reasonercited by 3
10 more
  1. 2024Rule Extrapolation in Language Models: A Study of Compositional Generalization on OOD Promptscited by 2
  2. 2024Low-Dimension-to-High-Dimension Generalization And Its Implications for Length Generalizationcited by 2
  3. 2025Out-of-distribution Tests Reveal Compositionality in Chess Transformerscited by 2
  4. 2026Boule or Baguette? A Study on Task Topology, Length Generalization, and the Benefit of Reasoning Tracescited by 1
  5. 2026When Does In-Context Search Help? A Sampling-Complexity Theory of Reflection-Driven Reasoningcited by 1
  6. 2025Learning Model Successorscited by 0
  7. 2025A Theoretical Analysis of Provable Compositional Generalization in Neural Networks: A Necessary and Sufficient Conditioncited by 0
  8. 2026Universal priors: solving empirical Bayes via Bayesian inference and pretrainingcited by 0
  9. 2026Generalization in LLM Problem Solving: The Case of the Shortest Pathcited by 0
  10. 2026Compositional Reasoning in Language Models under Reinforcement Learning Post-Trainingcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2025Understanding and Improving Length Generalization in Recurrent Models
  2. 2024Universal Length Generalization with Turing Programs
  3. 2025Task Generalization With AutoRegressive Compositional Structure: Can Learning From D Tasks Generalize to DT Tasks?
  4. 2025Long-Short Alignment for Effective Long-Context Modeling in LLMs
  5. 2025Beyond Single-Task: Robust Multi-Task Length Generalization for LLMs
  6. 2024Limits of Deep Learning: Sequence Modeling through the Lens of Complexity Theory
  7. 2023Never Train from Scratch: Fair Comparison of Long-Sequence Models Requires Data-Driven Priors
  8. 2026Position Encoding with Random Float Sampling Enhances Length Generalization of Transformers