mlsanityData to 14 Oct 2026

Function Induction and Task Generalization: An Interpretability Study with Off-by-One Addition

arXiv 2507.09875 ↗First posted 14 Jul 2025cs.CL cs.AI cs.LGcited by 2

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  4. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  5. 2024Qwen2.5 Technical Reportcited by 4,942
  6. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  7. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
  8. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
  9. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
  10. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,165
  11. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 1,003
  12. 2022In-context Learning and Induction Headscited by 964
37 more
  1. 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
  2. 2024WildChat: 1M ChatGPT Interaction Logs in the Wildcited by 629
  3. 2021MetaICL: Learning to Learn In Contextcited by 454
  4. 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 422
  5. 2023Larger language models do in-context learning differentlycited by 394
  6. 2023In-Context Learning Creates Task Vectorscited by 312
  7. 2023Function Vectors in Large Language Modelscited by 308
  8. 2023Reasoning or Reciting? Exploring the Capabilities and Limitations of Language Models Through Counterfactual Taskscited by 246
  9. 2019Analyzing the Structure of Attention in a Transformer Language Modelcited by 243
  10. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232
  11. 2024When Attention Sink Emerges in Language Models: An Empirical Viewcited by 208
  12. 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 202
  13. 2024Do Large Language Models Latently Perform Multi-Hop Reasoning?cited by 169
  14. 2021Meta-learning via Language Model In-context Tuningcited by 164
  15. 2023The Clock and the Pizza: Two Stories in Mechanistic Explanation of Neural Networkscited by 156
  16. 2024Fine-Tuning Enhances Existing Mechanisms: A Case Study on Entity Trackingcited by 149
  17. 2025Why do LLMs attend to the first token?cited by 127
  18. 2022Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrationscited by 116
  19. 2023Mechanistically analyzing the effects of fine-tuning on procedurally defined taskscited by 115
  20. 2023Circuit Component Reuse Across Tasks in Transformer Language Modelscited by 108
  21. 2024Information Flow Routes: Automatically Interpreting Language Models at Scalecited by 95
  22. 2023A Mechanistic Interpretation of Arithmetic Reasoning in Language Models using Causal Mediation Analysiscited by 89
  23. 2023Overthinking the Truth: Understanding how Language Models Process False Demonstrationscited by 81
  24. 2022Z-ICL: Zero-Shot In-Context Learning with Pseudo-Demonstrationscited by 70
  25. 2025Which Attention Heads Matter for In-Context Learning?cited by 61
  26. 2023Prompt Engineering a Prompt Engineercited by 53
  27. 2024Identifying Semantic Induction Heads to Understand In-Context Learningcited by 47
  28. 2023Break It Down: Evidence for Structural Compositionality in Neural Networkscited by 44
  29. 2024Dual Operating Modes of In-Context Learningcited by 43
  30. 2024Pre-trained Large Language Models Use Fourier Features to Compute Additioncited by 39
  31. 2025(How) Do Language Models Track State?cited by 34
  32. 2024Iteration Head: A Mechanistic Study of Chain-of-Thoughtcited by 31
  33. 2024Deciphering the Factors Influencing the Efficacy of Chain-of-Thought: Probability, Memorization, and Noisy Reasoningcited by 27
  34. 2024LM Transparency Tool: Interactive Tool for Analyzing Transformer Language Modelscited by 16
  35. 2025Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergencecited by 10
  36. 2025Understanding In-context Learning of Addition via Activation Subspacescited by 8
  37. 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

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.