mlsanityData to 7 Oct 2026

Out-of-distribution generalization via composition: a lens through induction heads in Transformers

arXiv 2408.09503 ↗First posted 18 Aug 2024cs.CL cs.AI cs.LGcited by 28

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) such as GPT-4 sometimes appear to be creative, solving novel tasks often with a few demonstrations in the prompt. These tasks require the models to generalize on distributions different from those from training data -- which is known as out-of-distribution (OOD) generalization. Despite the tremendous success of LLMs, how they approach OOD generalization remains an open and underexplored question. We examine OOD generalization in settings where instances are generated according to hidden rules, including in-context learning with symbolic reasoning. Models are required to infer the hidden rules behind input prompts without any fine-tuning. We empirically examined the training dynamics of Transformers on a synthetic example and conducted extensive experiments on a variety of pretrained LLMs, focusing on a type of components known as induction heads. We found that OOD generalization and composition are tied together -- models can learn rules by composing two self-attention layers, thereby achieving OOD generalization. Furthermore, a shared latent subspace in the embedding (or feature) space acts as a bridge for composition by aligning early layers and later layers, which we refer to as the common bridge representation hypothesis.

Key facts. Cited by 28 papers in the map (data through 7 Oct 2026). Builds on 92 of its 121 references that are in the map. First posted on arXiv 18 Aug 2024.

Builds on

92 of 121 references.

References · 92

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2023GPT-4 Technical Reportcited by 18,132
  5. 2022Training language models to follow instructions with human feedbackcited by 15,712
  6. 2024The Llama 3 Herd of Modelscited by 14,192
  7. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  8. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  9. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  10. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  11. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  12. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
38 more
  1. 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
  2. 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
  3. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  4. 2023Mistral 7Bcited by 3,065
  5. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
  6. 2022Emergent Abilities of Large Language Modelscited by 2,483
  7. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
  8. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
  9. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  10. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
  11. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
  12. 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,259
  13. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
  14. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
  15. 2022Editing Models with Task Arithmeticcited by 1,076
  16. 2022In-context Learning and Induction Headscited by 930
  17. 2022Toy Models of Superpositioncited by 928
  18. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  19. 2024Gemma: Open Models Based on Gemini Research and Technologycited by 889
  20. 2014Show and Tell: A Neural Image Caption Generatorcited by 877
  21. 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
  22. 2022Transformers learn in-context by gradient descentcited by 714
  23. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  24. 2023The Linear Representation Hypothesis and the Geometry of Large Language Modelscited by 679
  25. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  26. 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 599
  27. 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
  28. 2024OLMo: Accelerating the Science of Language Modelscited by 599
  29. 2024Scaling and evaluating sparse autoencoderscited by 530
  30. 2023The Falcon Series of Open Language Modelscited by 526
  31. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
  32. 2021MetaICL: Learning to Learn In Contextcited by 450
  33. 2023Trained Transformers Learn Linear Models In-Contextcited by 331
  34. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
  35. 2023LLM-Adapters: An Adapter Family for Parameter-Efficient Fine-Tuning of Large Language Modelscited by 317
  36. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  37. 2021Surface Form Competition: Why the Highest Probability Answer Isn't Always Rightcited by 256
  38. 2023Reasoning or Reciting? Exploring the Capabilities and Limitations of Language Models Through Counterfactual Taskscited by 243

50 most cited of 92 All 92 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 6; 2025: 12; 2026: 10.

28 papers.

Sort:

By area:

  1. 2025Is Chain-of-Thought Reasoning of LLMs a Mirage? A Data Distribution Lenscited by 42
  2. 2024Can In-context Learning Really Generalize to Out-of-distribution Tasks?cited by 23
  3. 2025Learning to Inference Adaptively for Multimodal Large Language Modelscited by 12
  4. 2025Task Generalization With AutoRegressive Compositional Structure: Can Learning From D Tasks Generalize to DT Tasks?cited by 11
  5. 2025Unifying Attention Heads and Task Vectors via Hidden State Geometry in In-Context Learningcited by 10
  6. 2024How Transformers Get Rich: Approximation and Dynamics Analysiscited by 7
  7. 2024KV Shifting Attention Enhances Language Modelingcited by 7
  8. 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilitiescited by 6
  9. 2024Task Diversity Shortens the ICL Plateaucited by 5
  10. 2025Can GRPO Help LLMs Transcend Their Pretraining Origin?cited by 5
  11. 2025ICL CIPHERS: Quantifying "Learning" in In-Context Learning via Substitution Cipherscited by 4
  12. 2025Decomposing Complex Visual Comprehension into Atomic Visual Skills for Vision Language Modelscited by 4
16 more
  1. 2025Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic Insightcited by 3
  2. 2026Shattered Compositionality: Counterintuitive Learning Dynamics of Transformers for Arithmeticcited by 2
  3. 2024Generalization vs. Specialization under Concept Shiftcited by 1
  4. 2025Understanding the Staged Dynamics of Transformers in Learning Latent Structurecited by 1
  5. 2026How Does Unfaithful Reasoning Emerge from Autoregressive Training? A Study of Synthetic Experimentscited by 1
  6. 2026Critical Windows of Complexity Control: When Transformers Decide to Reason or Memorizecited by 1
  7. 2024ResidualDroppath: Enhancing Feature Reuse over Residual Connectionscited by 0
  8. 2025Localizing Task Recognition and Task Learning in In-Context Learning via Attention Head Analysiscited by 0
  9. 2025Can Language Models Compose Skills In-Context?cited by 0
  10. 2026Multi-Agent Cooperative Learning for Robust Vision-Language Alignment under OOD Conceptscited by 0
  11. 2026Bridging the Semantic Chasm: Synergistic Conceptual Anchoring for Generalized Few-Shot and Zero-Shot OOD Perceptioncited by 0
  12. 2026Finding Sense in Nonsense with Generated Contexts: Perspectives from Humans and Language Modelscited by 0
  13. 2026Distance generalization in transformers: why bother with positional encoding?cited by 0
  14. 2026Metacognitive Steering: Learning the Structure of Scientific Judgmentcited by 0
  15. 2026A Survey on the Linear Representation Hypothesiscited by 0
  16. 2026Theory on Attention Dynamics for Out-of-Distribution In-Context Learningcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2022Achieving and Understanding Out-of-Distribution Generalization in Systematic Reasoning in Small-Scale Transformers
  2. 2024Rule Extrapolation in Language Models: A Study of Compositional Generalization on OOD Prompts
  3. 2025Generalization or Hallucination? Understanding Out-of-Context Reasoning in Transformers
  4. 2025Unlocking Out-of-Distribution Generalization in Transformers via Recursive Latent Space Reasoning
  5. 2025Principled Out-of-Distribution Generalization via Simplicity
  6. 2025Beyond In-Distribution Success: Scaling Curves of CoT Granularity for Language Model Generalization
  7. 2026Loop, Think, & Generalize: Implicit Reasoning in Recurrent-Depth Transformers
  8. 2025Compositional Generalization from Learned Skills via CoT Training: A Theoretical and Structural Analysis for Reasoning