Identifying Semantic Induction Heads to Understand In-Context Learning
Not on the map. Why?
Abstract (arXiv)
Although large language models (LLMs) have demonstrated remarkable performance, the lack of transparency in their inference logic raises concerns about their trustworthiness. To gain a better understanding of LLMs, we conduct a detailed analysis of the operations of attention heads and aim to better understand the in-context learning of LLMs. Specifically, we investigate whether attention heads encode two types of relationships between tokens present in natural languages: the syntactic dependency parsed from sentences and the relation within knowledge graphs. We find that certain attention heads exhibit a pattern where, when attending to head tokens, they recall tail tokens and increase the output logits of those tail tokens. More crucially, the formulation of such semantic induction heads has a close correlation with the emergence of the in-context learning ability of language models. The study of semantic attention heads advances our understanding of the intricate operations of attention heads in transformers, and further provides new insights into the in-context learning of LLMs.
Key facts. Cited by 46 papers in the map (data through 7 Oct 2026). Builds on 25 of its 44 references that are in the map. First posted on arXiv 20 Feb 2024.
Builds on
25 of 44 references.
References · 25
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2017A Unified Approach to Interpreting Model Predictionscited by 6,488
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,040
- 2017Axiomatic Attribution for Deep Networkscited by 3,350
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,348
- 2020Extracting Training Data from Large Language Modelscited by 2,144
- 2019Language Models as Knowledge Bases?cited by 1,922
- 2017Interpretability Beyond Feature Attribution: Quantitative Testing with Concept Activation Vectors (TCAV)cited by 1,309
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
13 more
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
- 2022In-context Learning and Induction Headscited by 930
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 512
- 2019A Multiscale Visualization of Attention in the Transformer Modelcited by 292
- 2017Deep Learning for Case-Based Reasoning through Prototypes: A Neural Network that Explains Its Predictionscited by 234
- 2015Visualizing and Understanding Neural Models in NLPcited by 199
- 2023Does Circuit Analysis Interpretability Scale? Evidence from Multiple Choice Capabilities in Chinchillacited by 145
- 2019Text Generation from Knowledge Graphs with Graph Transformerscited by 122
- 2022Rethinking the Role of Scale for In-Context Learning: An Interpretability-based Case Study at 66 Billion Scalecited by 64
- 2023Quantifying Context Mixing in Transformerscited by 43
- 2021Defining and Quantifying the Emergence of Sparse Concepts in DNNscited by 36
- 2023DecompX: Explaining Transformers Decisions by Propagating Token Decompositioncited by 31
- 2019SANVis: Visual Analytics for Understanding Self-Attention Networkscited by 21
Built on by
Citing papers per year: 2024: 14; 2025: 25; 2026: 7.
46 papers.
Sort:
By area:
- 2024A Practical Review of Mechanistic Interpretability for Transformer-Based Language Modelscited by 113
- 2024CodeAttack: Revealing Safety Generalization Challenges of Large Language Models via Code Completioncited by 70
- 2024Attention Heads of Large Language Models: A Surveycited by 65
- 2024Explainable and Interpretable Multimodal Large Language Models: A Comprehensive Surveycited by 52
- 2024Can In-context Learning Really Generalize to Out-of-distribution Tasks?cited by 23
- 2025Attention Illuminates LLM Reasoning: The Preplan-and-Anchor Rhythm Enables Fine-Grained Policy Optimizationcited by 23
- 2024Automatically Identifying Local and Global Circuits with Linear Computation Graphscited by 22
- 2025The Dual-Route Model of Inductioncited by 22
- 2025X-Boundary: Establishing Exact Safety Boundary to Shield LLMs from Multi-Turn Jailbreaks without Compromising Usabilitycited by 20
- 2024Towards Tracing Trustworthiness Dynamics: Revisiting Pre-training Period of Large Language Modelscited by 18
- 2025Representation Engineering for Large-Language Models: Survey and Research Challengescited by 18
- 2025QueryAttack: Jailbreaking Aligned Large Language Models Using Structured Non-natural Query Languagecited by 16
34 more
- 2024Knowledge Localization: Mission Not Accomplished? Enter Query Localization!cited by 13
- 2025GRAIT: Gradient-Driven Refusal-Aware Instruction Tuning for Effective Hallucination Mitigationcited by 11
- 2025Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergencecited by 10
- 2025Focus Directions Make Your Language Models Pay More Attention to Relevant Contextscited by 9
- 2024Unveiling Language Competence Neurons: A Psycholinguistic Approach to Model Interpretabilitycited by 8
- 2025Rethinking Circuit Completeness in Language Models: AND, OR, and ADDER Gatescited by 8
- 2024KV Shifting Attention Enhances Language Modelingcited by 7
- 2025Joint Localization and Activation Editing for Low-Resource Fine-Tuningcited by 7
- 2025LED-Merging: Mitigating Safety-Utility Conflicts in Model Merging with Location-Election-Disjointcited by 7
- 2026Causality neq Invariance: Function and Concept Vectors in LLMscited by 7
- 2024The Tug of War Within: Mitigating the Fairness-Privacy Conflicts in Large Language Modelscited by 5
- 2025Position: We Need An Algorithmic Understanding of Generative AIcited by 5
- 2025All for One: LLMs Solve Mental Math at the Last Token With Information Transferred From Other Tokenscited by 5
- 2026ReAttn: Improving Attention-based Re-ranking via Attention Re-weightingcited by 5
- 2025In-Context Algebracited by 4
- 2024From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and Whencited by 3
- 2025Compress, Gather, and Recompute: REFORMing Long-Context Processing in Transformerscited by 3
- 2025Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic Insightcited by 3
- 2026Stop Tracking Me! Proactive Defense Against Attribute Inference Attack in LLMscited by 3
- 2026How Does Reasoning Flow? Tracing Attention-Induced Information Flow for Targeted RL in LLMscited by 3
- 2025Mechanistic Understanding of Language Models in Syntactic Code Completioncited by 2
- 2025Function Induction and Task Generalization: An Interpretability Study with Off-by-One Additioncited by 2
- 2025Explainability of Large Language Models: Opportunities and Challenges toward Generating Trustworthy Explanationscited by 2
- 2024Venn Diagram Prompting : Accelerating Comprehension with Scaffolding Effectcited by 1
- 2024Skill Path: Unveiling Language Skills from Circuit Graphscited by 1
- 2025Characterising the Inductive Biases of Neural Networks on Boolean Datacited by 1
- 2025A circuit for predicting hierarchical structure in-context in Large Language Modelscited by 1
- 2025Genomic Next-Token Predictors are In-Context Learnerscited by 1
- 2026Induction Meets Biology: Mechanisms of Repeat Detection in Protein Language Modelscited by 1
- 2026CompressKV: Semantic-Retrieval-Guided KV-Cache Compression for Resource-Efficient Long-Context LLM Inferencecited by 1
- 2025From Text to Trajectories: GPT-2 as an ODE Solver via In-Contextcited by 0
- 2025Localizing Task Recognition and Task Learning in In-Context Learning via Attention Head Analysiscited by 0
- 2025In-Context Learning Without Copyingcited by 0
- 2026MIRROR: Aligning Semantic Relations from Language to Image via Gromov--Wassersteincited by 0
- 2026MIRROR: Aligning Semantic Relations from Language to Image via Gromov--Wasserstein28 Jun 2026
- 2026CompressKV: Semantic-Retrieval-Guided KV-Cache Compression for Resource-Efficient Long-Context LLM Inference23 Jun 2026
- 2026How Does Reasoning Flow? Tracing Attention-Induced Information Flow for Targeted RL in LLMs9 Jun 2026
- 2026Induction Meets Biology: Mechanisms of Repeat Detection in Protein Language Models26 Feb 2026
- 2026Causality neq Invariance: Function and Concept Vectors in LLMs25 Feb 2026
- 2026ReAttn: Improving Attention-based Re-ranking via Attention Re-weighting23 Feb 2026
- 2026Stop Tracking Me! Proactive Defense Against Attribute Inference Attack in LLMs12 Feb 2026
- 2025In-Context Algebra18 Dec 2025
- 2025Genomic Next-Token Predictors are In-Context Learners16 Nov 2025
- 2025In-Context Learning Without Copying7 Nov 2025
- 2025Explainability of Large Language Models: Opportunities and Challenges toward Generating Trustworthy Explanations20 Oct 2025
- 2025Attention Illuminates LLM Reasoning: The Preplan-and-Anchor Rhythm Enables Fine-Grained Policy Optimization15 Oct 2025
34 more
- 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
- 2025A circuit for predicting hierarchical structure in-context in Large Language Models25 Sep 2025
- 2025All for One: LLMs Solve Mental Math at the Last Token With Information Transferred From Other Tokens11 Sep 2025
- 2025From Text to Trajectories: GPT-2 as an ODE Solver via In-Context5 Aug 2025
- 2025Function Induction and Task Generalization: An Interpretability Study with Off-by-One Addition14 Jul 2025
- 2025Position: We Need An Algorithmic Understanding of Generative AI10 Jul 2025
- 2025Compress, Gather, and Recompute: REFORMing Long-Context Processing in Transformers1 Jun 2025
- 2025Characterising the Inductive Biases of Neural Networks on Boolean Data29 May 2025
- 2025Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergence22 May 2025
- 2025Rethinking Circuit Completeness in Language Models: AND, OR, and ADDER Gates15 May 2025
- 2025The Dual-Route Model of Induction3 Apr 2025
- 2025Focus Directions Make Your Language Models Pay More Attention to Relevant Contexts30 Mar 2025
- 2025Representation Engineering for Large-Language Models: Survey and Research Challenges24 Feb 2025
- 2025LED-Merging: Mitigating Safety-Utility Conflicts in Model Merging with Location-Election-Disjoint24 Feb 2025
- 2025Mechanistic Understanding of Language Models in Syntactic Code Completion20 Feb 2025
- 2025X-Boundary: Establishing Exact Safety Boundary to Shield LLMs from Multi-Turn Jailbreaks without Compromising Usability14 Feb 2025
- 2025QueryAttack: Jailbreaking Aligned Large Language Models Using Structured Non-natural Query Language13 Feb 2025
- 2025GRAIT: Gradient-Driven Refusal-Aware Instruction Tuning for Effective Hallucination Mitigation9 Feb 2025
- 2025Joint Localization and Activation Editing for Low-Resource Fine-Tuning3 Feb 2025
- 2024Explainable and Interpretable Multimodal Large Language Models: A Comprehensive Survey3 Dec 2024
- 2024KV Shifting Attention Enhances Language Modeling29 Nov 2024
- 2024The Tug of War Within: Mitigating the Fairness-Privacy Conflicts in Large Language Models22 Oct 2024
- 2024Can In-context Learning Really Generalize to Out-of-distribution Tasks?13 Oct 2024
- 2024Skill Path: Unveiling Language Skills from Circuit Graphs2 Oct 2024
- 2024Unveiling Language Competence Neurons: A Psycholinguistic Approach to Model Interpretability24 Sep 2024
- 2024Attention Heads of Large Language Models: A Survey5 Sep 2024
- 2024A Practical Review of Mechanistic Interpretability for Transformer-Based Language Models2 Jul 2024
- 2024Venn Diagram Prompting : Accelerating Comprehension with Scaffolding Effect8 Jun 2024
- 2024From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and When31 May 2024
- 2024Knowledge Localization: Mission Not Accomplished? Enter Query Localization!23 May 2024
- 2024Automatically Identifying Local and Global Circuits with Linear Computation Graphs22 May 2024
- 2024CodeAttack: Revealing Safety Generalization Challenges of Large Language Models via Code Completion12 Mar 2024
- 2024Towards Tracing Trustworthiness Dynamics: Revisiting Pre-training Period of Large Language Models29 Feb 2024
- 2025Attention Illuminates LLM Reasoning: The Preplan-and-Anchor Rhythm Enables Fine-Grained Policy Optimizationcited by 23
- 2025Rethinking Circuit Completeness in Language Models: AND, OR, and ADDER Gatescited by 8
- 2026How Does Reasoning Flow? Tracing Attention-Induced Information Flow for Targeted RL in LLMscited by 3
- 2026How Does Reasoning Flow? Tracing Attention-Induced Information Flow for Targeted RL in LLMs9 Jun 2026
- 2025Attention Illuminates LLM Reasoning: The Preplan-and-Anchor Rhythm Enables Fine-Grained Policy Optimization15 Oct 2025
- 2025Rethinking Circuit Completeness in Language Models: AND, OR, and ADDER Gates15 May 2025
- 2024A Practical Review of Mechanistic Interpretability for Transformer-Based Language Modelscited by 113
- 2024Attention Heads of Large Language Models: A Surveycited by 65
- 2024Can In-context Learning Really Generalize to Out-of-distribution Tasks?cited by 23
- 2024Automatically Identifying Local and Global Circuits with Linear Computation Graphscited by 22
- 2025The Dual-Route Model of Inductioncited by 22
- 2024Towards Tracing Trustworthiness Dynamics: Revisiting Pre-training Period of Large Language Modelscited by 18
- 2025Representation Engineering for Large-Language Models: Survey and Research Challengescited by 18
- 2024Knowledge Localization: Mission Not Accomplished? Enter Query Localization!cited by 13
- 2025Beyond Induction Heads: In-Context Meta Learning Induces Multi-Phase Circuit Emergencecited by 10
- 2025Focus Directions Make Your Language Models Pay More Attention to Relevant Contextscited by 9
- 2024Unveiling Language Competence Neurons: A Psycholinguistic Approach to Model Interpretabilitycited by 8
- 2024KV Shifting Attention Enhances Language Modelingcited by 7
12 most cited of 35 All 35 (JSON)
- 2026Induction Meets Biology: Mechanisms of Repeat Detection in Protein Language Models26 Feb 2026
- 2026Causality neq Invariance: Function and Concept Vectors in LLMs25 Feb 2026
- 2026ReAttn: Improving Attention-based Re-ranking via Attention Re-weighting23 Feb 2026
- 2026Stop Tracking Me! Proactive Defense Against Attribute Inference Attack in LLMs12 Feb 2026
- 2025In-Context Algebra18 Dec 2025
- 2025Genomic Next-Token Predictors are In-Context Learners16 Nov 2025
- 2025In-Context Learning Without Copying7 Nov 2025
- 2025Explainability of Large Language Models: Opportunities and Challenges toward Generating Trustworthy Explanations20 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
- 2025A circuit for predicting hierarchical structure in-context in Large Language Models25 Sep 2025
- 2025All for One: LLMs Solve Mental Math at the Last Token With Information Transferred From Other Tokens11 Sep 2025
12 newest of 35 All 35 (JSON)