Function Induction and Task Generalization: An Interpretability Study with Off-by-One Addition
Not on the map. Why?
Abstract (arXiv)
Large language models demonstrate the intriguing ability to perform unseen tasks via in-context learning. However, it remains unclear what mechanisms inside the model drive such task-level generalization. In this work, we approach this question through the lens of off-by-one addition (i.e., 1+1=3, 2+2=5, 3+3=?), a two-step, counterfactual task with an unexpected +1 function as a second step. Leveraging circuit-style interpretability techniques such as path patching, we analyze the models' internal computations behind their performance and present three key findings. First, we identify a mechanism that explains the model's generalization from standard addition to off-by-one addition. It resembles the induction head mechanism described in prior work, yet operates at a higher level of abstraction; we therefore term it "function induction" in this work. Second, we show that the induction of the +1 function is governed by multiple attention heads in parallel, each of which emits a distinct piece of the +1 function. Finally, we find that this function induction mechanism is reused in a broader range of tasks, including synthetic tasks such as shifted multiple-choice QA and algorithmic tasks such as base-8 addition. Overall, our findings offer deeper insights into how reusable and composable structures within language models enable task-level generalization.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 49 of its 65 references that are in the map. First posted on arXiv 14 Jul 2025.
Builds on
49 of 65 references.
References · 49
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,165
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 1,003
- 2022In-context Learning and Induction Headscited by 964
37 more
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
- 2024WildChat: 1M ChatGPT Interaction Logs in the Wildcited by 629
- 2021MetaICL: Learning to Learn In Contextcited by 454
- 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 422
- 2023Larger language models do in-context learning differentlycited by 394
- 2023In-Context Learning Creates Task Vectorscited by 312
- 2023Function Vectors in Large Language Modelscited by 308
- 2023Reasoning or Reciting? Exploring the Capabilities and Limitations of Language Models Through Counterfactual Taskscited by 246
- 2019Analyzing the Structure of Attention in a Transformer Language Modelcited by 243
- 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232
- 2024When Attention Sink Emerges in Language Models: An Empirical Viewcited by 208
- 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 202
- 2024Do Large Language Models Latently Perform Multi-Hop Reasoning?cited by 169
- 2021Meta-learning via Language Model In-context Tuningcited by 164
- 2023The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networkscited by 156
- 2024Fine-Tuning Enhances Existing Mechanisms: A Case Study on Entity Trackingcited by 149
- 2025Why do LLMs attend to the first token?cited by 127
- 2022Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrationscited by 116
- 2023Mechanistically analyzing the effects of fine-tuning on procedurally defined taskscited by 115
- 2023Circuit Component Reuse Across Tasks in Transformer Language Modelscited by 108
- 2024Information Flow Routes: Automatically Interpreting Language Models at Scalecited by 95
- 2023A Mechanistic Interpretation of Arithmetic Reasoning in Language Models using Causal Mediation Analysiscited by 89
- 2023Overthinking the Truth: Understanding how Language Models Process False Demonstrationscited by 81
- 2022Z-ICL: Zero-Shot In-Context Learning with Pseudo-Demonstrationscited by 70
- 2025Which Attention Heads Matter for In-Context Learning?cited by 61
- 2023Prompt Engineering a Prompt Engineercited by 53
- 2024Identifying Semantic Induction Heads to Understand In-Context Learningcited by 47
- 2023Break It Down: Evidence for Structural Compositionality in Neural Networkscited by 44
- 2024Dual Operating Modes of In-Context Learningcited by 43
- 2024Pre-trained Large Language Models Use Fourier Features to Compute Additioncited by 39
- 2025(How) Do Language Models Track State?cited by 34
- 2024Iteration Head: A Mechanistic Study of Chain-of-Thoughtcited by 31
- 2024Deciphering the Factors Influencing the Efficacy of Chain-of-Thought: Probability, Memorization, and Noisy Reasoningcited by 27
- 2024LM Transparency Tool: Interactive Tool for Analyzing Transformer Language Modelscited by 16
- 2025Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergencecited by 10
- 2025Understanding In-context Learning of Addition via Activation Subspacescited by 8
- 2023Frontier Language Models are not Robust to Adversarial Arithmetic, or "What do I need to say so you agree 2+2=5?cited by 3
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.