Out-of-distribution generalization via composition: a lens through induction heads in Transformers
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
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
38 more
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2023Mistral 7Bcited by 3,065
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2022Emergent Abilities of Large Language Modelscited by 2,483
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,928
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
- 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,259
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2022Editing Models with Task Arithmeticcited by 1,076
- 2022In-context Learning and Induction Headscited by 930
- 2022Toy Models of Superpositioncited by 928
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2024Gemma: Open Models Based on Gemini Research and Technologycited by 889
- 2014Show and Tell: A Neural Image Caption Generatorcited by 877
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
- 2022Transformers learn in-context by gradient descentcited by 714
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2023The Linear Representation Hypothesis and the Geometry of Large Language Modelscited by 679
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
- 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 599
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 599
- 2024OLMo: Accelerating the Science of Language Modelscited by 599
- 2024Scaling and evaluating sparse autoencoderscited by 530
- 2023The Falcon Series of Open Language Modelscited by 526
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 496
- 2021MetaICL: Learning to Learn In Contextcited by 450
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
- 2023LLM-Adapters: An Adapter Family for Parameter-Efficient Fine-Tuning of Large Language Modelscited by 317
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
- 2021Surface Form Competition: Why the Highest Probability Answer Isn't Always Rightcited by 256
- 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
Citing papers per year: 2024: 6; 2025: 12; 2026: 10.
28 papers.
Sort:
By area:
- 2025Is Chain-of-Thought Reasoning of LLMs a Mirage? A Data Distribution Lenscited by 42
- 2024Can In-context Learning Really Generalize to Out-of-distribution Tasks?cited by 23
- 2025Learning to Inference Adaptively for Multimodal Large Language Modelscited by 12
- 2025Task Generalization With AutoRegressive Compositional Structure: Can Learning From D Tasks Generalize to DT Tasks?cited by 11
- 2025Unifying Attention Heads and Task Vectors via Hidden State Geometry in In-Context Learningcited by 10
- 2024How Transformers Get Rich: Approximation and Dynamics Analysiscited by 7
- 2024KV Shifting Attention Enhances Language Modelingcited by 7
- 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilitiescited by 6
- 2024Task Diversity Shortens the ICL Plateaucited by 5
- 2025Can GRPO Help LLMs Transcend Their Pretraining Origin?cited by 5
- 2025ICL CIPHERS: Quantifying "Learning" in In-Context Learning via Substitution Cipherscited by 4
- 2025Decomposing Complex Visual Comprehension into Atomic Visual Skills for Vision Language Modelscited by 4
16 more
- 2025Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic Insightcited by 3
- 2026Shattered Compositionality: Counterintuitive Learning Dynamics of Transformers for Arithmeticcited by 2
- 2024Generalization vs. Specialization under Concept Shiftcited by 1
- 2025Understanding the Staged Dynamics of Transformers in Learning Latent Structurecited by 1
- 2026How Does Unfaithful Reasoning Emerge from Autoregressive Training? A Study of Synthetic Experimentscited by 1
- 2026Critical Windows of Complexity Control: When Transformers Decide to Reason or Memorizecited by 1
- 2024ResidualDroppath: Enhancing Feature Reuse over Residual Connectionscited by 0
- 2025Localizing Task Recognition and Task Learning in In-Context Learning via Attention Head Analysiscited by 0
- 2025Can Language Models Compose Skills In-Context?cited by 0
- 2026Multi-Agent Cooperative Learning for Robust Vision-Language Alignment under OOD Conceptscited by 0
- 2026Bridging the Semantic Chasm: Synergistic Conceptual Anchoring for Generalized Few-Shot and Zero-Shot OOD Perceptioncited by 0
- 2026Finding Sense in Nonsense with Generated Contexts: Perspectives from Humans and Language Modelscited by 0
- 2026Distance generalization in transformers: why bother with positional encoding?cited by 0
- 2026Metacognitive Steering: Learning the Structure of Scientific Judgmentcited by 0
- 2026A Survey on the Linear Representation Hypothesiscited by 0
- 2026Theory on Attention Dynamics for Out-of-Distribution In-Context Learningcited by 0
- 2026Theory on Attention Dynamics for Out-of-Distribution In-Context Learning29 Sep 2026
- 2026A Survey on the Linear Representation Hypothesis19 Sep 2026
- 2026Metacognitive Steering: Learning the Structure of Scientific Judgment14 Sep 2026
- 2026Distance generalization in transformers: why bother with positional encoding?10 Sep 2026
- 2026Critical Windows of Complexity Control: When Transformers Decide to Reason or Memorize6 May 2026
- 2026Finding Sense in Nonsense with Generated Contexts: Perspectives from Humans and Language Models12 Feb 2026
- 2026How Does Unfaithful Reasoning Emerge from Autoregressive Training? A Study of Synthetic Experiments1 Feb 2026
- 2026Bridging the Semantic Chasm: Synergistic Conceptual Anchoring for Generalized Few-Shot and Zero-Shot OOD Perception30 Jan 2026
- 2026Shattered Compositionality: Counterintuitive Learning Dynamics of Transformers for Arithmetic30 Jan 2026
- 2026Multi-Agent Cooperative Learning for Robust Vision-Language Alignment under OOD Concepts11 Jan 2026
- 2025Understanding the Staged Dynamics of Transformers in Learning Latent Structure24 Nov 2025
- 2025Can Language Models Compose Skills In-Context?27 Oct 2025
16 more
- 2025Can GRPO Help LLMs Transcend Their Pretraining Origin?14 Oct 2025
- 2025Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic Insight29 Sep 2025
- 2025Localizing Task Recognition and Task Learning in In-Context Learning via Attention Head Analysis29 Sep 2025
- 2025Is Chain-of-Thought Reasoning of LLMs a Mirage? A Data Distribution Lens2 Aug 2025
- 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilities27 May 2025
- 2025Decomposing Complex Visual Comprehension into Atomic Visual Skills for Vision Language Models26 May 2025
- 2025Unifying Attention Heads and Task Vectors via Hidden State Geometry in In-Context Learning24 May 2025
- 2025ICL CIPHERS: Quantifying "Learning" in In-Context Learning via Substitution Ciphers28 Apr 2025
- 2025Learning to Inference Adaptively for Multimodal Large Language Models13 Mar 2025
- 2025Task Generalization With AutoRegressive Compositional Structure: Can Learning From D Tasks Generalize to DT Tasks?13 Feb 2025
- 2024KV Shifting Attention Enhances Language Modeling29 Nov 2024
- 2024ResidualDroppath: Enhancing Feature Reuse over Residual Connections14 Nov 2024
- 2024How Transformers Get Rich: Approximation and Dynamics Analysis15 Oct 2024
- 2024Can In-context Learning Really Generalize to Out-of-distribution Tasks?13 Oct 2024
- 2024Task Diversity Shortens the ICL Plateau7 Oct 2024
- 2024Generalization vs. Specialization under Concept Shift23 Sep 2024
- 2025Is Chain-of-Thought Reasoning of LLMs a Mirage? A Data Distribution Lenscited by 42
- 2025Learning to Inference Adaptively for Multimodal Large Language Modelscited by 12
- 2025Can GRPO Help LLMs Transcend Their Pretraining Origin?cited by 5
- 2025Decomposing Complex Visual Comprehension into Atomic Visual Skills for Vision Language Modelscited by 4
- 2026How Does Unfaithful Reasoning Emerge from Autoregressive Training? A Study of Synthetic Experimentscited by 1
- 2026How Does Unfaithful Reasoning Emerge from Autoregressive Training? A Study of Synthetic Experiments1 Feb 2026
- 2025Can GRPO Help LLMs Transcend Their Pretraining Origin?14 Oct 2025
- 2025Is Chain-of-Thought Reasoning of LLMs a Mirage? A Data Distribution Lens2 Aug 2025
- 2025Decomposing Complex Visual Comprehension into Atomic Visual Skills for Vision Language Models26 May 2025
- 2025Learning to Inference Adaptively for Multimodal Large Language Models13 Mar 2025
- 2024Can In-context Learning Really Generalize to Out-of-distribution Tasks?cited by 23
- 2025Task Generalization With AutoRegressive Compositional Structure: Can Learning From D Tasks Generalize to DT Tasks?cited by 11
- 2025Unifying Attention Heads and Task Vectors via Hidden State Geometry in In-Context Learningcited by 10
- 2024How Transformers Get Rich: Approximation and Dynamics Analysiscited by 7
- 2024KV Shifting Attention Enhances Language Modelingcited by 7
- 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilitiescited by 6
- 2024Task Diversity Shortens the ICL Plateaucited by 5
- 2025ICL CIPHERS: Quantifying "Learning" in In-Context Learning via Substitution Cipherscited by 4
- 2025Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic Insightcited by 3
- 2026Shattered Compositionality: Counterintuitive Learning Dynamics of Transformers for Arithmeticcited by 2
- 2024Generalization vs. Specialization under Concept Shiftcited by 1
- 2025Understanding the Staged Dynamics of Transformers in Learning Latent Structurecited by 1
12 most cited of 21 All 21 (JSON)
- 2026Theory on Attention Dynamics for Out-of-Distribution In-Context Learning29 Sep 2026
- 2026A Survey on the Linear Representation Hypothesis19 Sep 2026
- 2026Metacognitive Steering: Learning the Structure of Scientific Judgment14 Sep 2026
- 2026Distance generalization in transformers: why bother with positional encoding?10 Sep 2026
- 2026Critical Windows of Complexity Control: When Transformers Decide to Reason or Memorize6 May 2026
- 2026Finding Sense in Nonsense with Generated Contexts: Perspectives from Humans and Language Models12 Feb 2026
- 2026Shattered Compositionality: Counterintuitive Learning Dynamics of Transformers for Arithmetic30 Jan 2026
- 2025Understanding the Staged Dynamics of Transformers in Learning Latent Structure24 Nov 2025
- 2025Can Language Models Compose Skills In-Context?27 Oct 2025
- 2025Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic Insight29 Sep 2025
- 2025Localizing Task Recognition and Task Learning in In-Context Learning via Attention Head Analysis29 Sep 2025
- 2025Born a Transformer -- Always a Transformer? On the Effect of Pretraining on Architectural Abilities27 May 2025
12 newest of 21 All 21 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2022Achieving and Understanding Out-of-Distribution Generalization in Systematic Reasoning in Small-Scale Transformers
- 2024Rule Extrapolation in Language Models: A Study of Compositional Generalization on OOD Prompts
- 2025Generalization or Hallucination? Understanding Out-of-Context Reasoning in Transformers
- 2025Unlocking Out-of-Distribution Generalization in Transformers via Recursive Latent Space Reasoning
- 2025Principled Out-of-Distribution Generalization via Simplicity
- 2025Beyond In-Distribution Success: Scaling Curves of CoT Granularity for Language Model Generalization
- 2026Loop, Think, & Generalize: Implicit Reasoning in Recurrent-Depth Transformers
- 2025Compositional Generalization from Learned Skills via CoT Training: A Theoretical and Structural Analysis for Reasoning