Selective Induction Heads: How Transformers Select Causal Structures In Context
Not on the map. Why?
Abstract (arXiv)
Transformers have exhibited exceptional capabilities in sequence modeling tasks, leveraging self-attention and in-context learning. Critical to this success are induction heads, attention circuits that enable copying tokens based on their previous occurrences. In this work, we introduce a novel framework that showcases transformers' ability to dynamically handle causal structures. Existing works rely on Markov Chains to study the formation of induction heads, revealing how transformers capture causal dependencies and learn transition probabilities in-context. However, they rely on a fixed causal structure that fails to capture the complexity of natural languages, where the relationship between tokens dynamically changes with context. To this end, our framework varies the causal structure through interleaved Markov chains with different lags while keeping the transition probabilities fixed. This setting unveils the formation of Selective Induction Heads, a new circuit that endows transformers with the ability to select the correct causal structure in-context. We empirically demonstrate that transformers learn this mechanism to predict the next token by identifying the correct lag and copying the corresponding token from the past. We provide a detailed construction of a 3-layer transformer to implement the selective induction head, and a theoretical analysis proving that this mechanism asymptotically converges to the maximum likelihood solution. Our findings advance the understanding of how transformers select causal structures, providing new insights into their functioning and interpretability.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Builds on 24 of its 31 references that are in the map. First posted on arXiv 9 Sep 2025.
Builds on
24 of 31 references.
References · 24
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022In-context Learning and Induction Headscited by 964
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2022Transformers learn in-context by gradient descentcited by 732
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
- 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
- 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 309
- 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 298
- 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 279
- 2023Birth of a Transformer: A Memory Viewpointcited by 161
- 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 146
12 more
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 118
- 2024How Transformers Learn Causal Structure with Gradient Descentcited by 118
- 2023Uncovering mesa-optimization algorithms in Transformerscited by 100
- 2023Pretraining Data Mixtures Enable Narrow Model Selection Capabilities in Transformer Modelscited by 45
- 2023Learning Transformer Programscited by 41
- 2024Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chainscited by 40
- 2024From Self-Attention to Markov Models: Unveiling the Dynamics of Generative Transformerscited by 34
- 2024Transformers Can Represent n-gram Language Modelscited by 32
- 2024Transformers on Markov Data: Constant Depth Sufficescited by 27
- 2024Understanding Transformers via N-gram Statisticscited by 26
- 2024How do Transformers perform In-Context Autoregressive Learning?cited by 17
- 2024On Limitation of Transformer for Learning HMMscited by 10
Built on by
Citing papers per year: 2025: 2; 2026: 6.
8 papers.
- 2026Mitigating Conversational Inertia in Multi-Turn Agentscited by 7
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledgecited by 3
- 2025Towards Understanding Transformers in Learning Random Walkscited by 2
- 2026Incremental Learning of Sparse Attention Patterns in Transformerscited by 2
- 2025Unexplored flaws in multiple-choice VQA make benchmarking unreliablecited by 1
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descentcited by 1
- 2026Induction Heads Interpolate N-Gramscited by 1
- 2026Learning Source Structure: Bayesian Prediction with Transformerscited by 0
- 2026Learning Source Structure: Bayesian Prediction with Transformers13 Oct 2026
- 2026Induction Heads Interpolate N-Grams2 Jul 2026
- 2026Transformers Learn Latent Mixture Models In-Context via Mirror Descent12 Apr 2026
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledge21 Mar 2026
- 2026Incremental Learning of Sparse Attention Patterns in Transformers22 Feb 2026
- 2026Mitigating Conversational Inertia in Multi-Turn Agents3 Feb 2026
- 2025Towards Understanding Transformers in Learning Random Walks28 Nov 2025
- 2025Unexplored flaws in multiple-choice VQA make benchmarking unreliable27 Nov 2025
Similar, not cited
Close in wording, no citation either way
- 2024What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formation
- 2026The Topological Trouble With Transformers
- 2026Invariant Learning Dynamics of Transformers in Inductive Reasoning Tasks
- 2025Causal Head Gating: A Framework for Interpreting Roles of Attention Heads in Transformers
- 2026Sessa: Selective State Space Attention
- 2026Expressivity-Efficiency Tradeoffs for Hybrid Sequence Models
- 2024Rethinking Associative Memory Mechanism in Induction Head
- 2026CausalGate: Causal Importance Distillation for Transformer Module Pruning