Induction Head Toxicity Mechanistically Explains Repetition Curse in Large Language Models

Shuxun Wang, Qingyu Yin, Chak Tou Leong, Qiang Zhang, Linyi Yang
5/17/2025
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Repetition curse is a phenomenon where Large Language Models (LLMs) generate repetitive sequences of tokens or cyclic sequences. While the repetition curse has been widely observed, its underlying mechanisms remain poorly understood. In this work, we investigate the role of induction heads--a specific type of attention head known for their ability to perform in-context learning--in driving this repetitive behavior. Specifically, we focus on the "toxicity" of induction heads, which we define as their tendency to dominate the model's output logits during repetition, effectively excluding other attention heads from contributing to the generation process. Our findings have important implications for the design and training of LLMs. By identifying induction heads as a key driver of the repetition curse, we provide a mechanistic explanation for this phenomenon and suggest potential avenues for mitigation. We also propose a technique with attention head regularization that could be employed to reduce the dominance of induction heads during generation, thereby promoting more diverse and coherent outputs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2025induction,
  title  = {Induction Head Toxicity Mechanistically Explains Repetition Curse in Large Language Models},
  author = {Shuxun Wang and Qingyu Yin and Chak Tou Leong and Qiang Zhang and Linyi Yang},
  year   = {2025},
  eprint = {2505.13514},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.13514v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.13514.svg)](https://codeofpaper.com/paper/2505.13514)

Discussion