Induction Heads as an Essential Mechanism for Pattern Matching in In-context Learning
Joy Crosbie, Ekaterina Shutova

TL;DR
This paper investigates the critical role of induction heads in large language models' in-context learning, demonstrating their importance through ablation studies and attention knockout experiments.
Contribution
It provides the first detailed analysis of induction heads' role in ICL, showing their essential contribution to pattern recognition and few-shot learning performance.
Findings
Ablation of induction heads reduces ICL performance by up to 32%.
Disabling induction patterns diminishes few-shot learning ability.
Induction heads are crucial for effective pattern matching in LLMs.
Abstract
Large language models (LLMs) have shown a remarkable ability to learn and perform complex tasks through in-context learning (ICL). However, a comprehensive understanding of its internal mechanisms is still lacking. This paper explores the role of induction heads in a few-shot ICL setting. We analyse two state-of-the-art models, Llama-3-8B and InternLM2-20B on abstract pattern recognition and NLP tasks. Our results show that even a minimal ablation of induction heads leads to ICL performance decreases of up to ~32% for abstract pattern recognition tasks, bringing the performance close to random. For NLP tasks, this ablation substantially decreases the model's ability to benefit from examples, bringing few-shot ICL performance close to that of zero-shot prompts. We further use attention knockout to disable specific induction patterns, and present fine-grained evidence for the role that…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTeaching and Learning Programming
MethodsSoftmax · Attention Is All You Need
