Skip to main content
LawSphereX

Identifying Semantic Induction Heads to Understand In-Context Learning

Subject: Language and Linguistics

Author or source: Jie Ren, Qipeng Guo, Hang Yan, Dongrui Liu, Quanshi Zhang, Xipeng Qiu, Dahua Lin

Updated:

Although large language models (LLMs) have demonstrated remarkable performance, the lack of transparency in their inference logic raises concerns about…

Jie Ren, Qipeng Guo, Hang Yan, Dongrui Liu, Quanshi Zhang, Xipeng Qiu, Dahua Lin. 2024. Identifying Semantic Induction Heads to Understand In-Context Learning. Findings of the Association for Computational Linguistics: ACL 2024. Association for Computational Linguistics. DOI 10.18653/v1/2024.findings-acl.412. CC BY 4.0. Original PDF and author abstract are reproduced unchanged apart from whitespace in the abstract. LawSphereX prepared the reading prompt and cover. No endorsement implied.

Publication sources

Authors’ abstract

Source page 1–17

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 subject tokens, they recall object tokens and increase the output logits of those object 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.

Reading guide for language and linguistics

Source page 1–17

Identify the language phenomenon and how the authors annotate or measure it. Check whether the examples support the conclusions for other settings.