Interpreting the Repeated Token Phenomenon in Large Language Models

Itay Yona, Ilia Shumailov, Jamie Hayes, Federico Barbero, Yossi Gandelsman
3/11/2025
cs.LGcs.AIcs.CL

No official code found. Best implementation: yossigandelsman/attn_sinkhole (15 stars, MIT, last commit 2025-09-23).

Abstract

Large Language Models (LLMs), despite their impressive capabilities, often fail to accurately repeat a single word when prompted to, and instead output unrelated text. This unexplained failure mode represents a vulnerability, allowing even end-users to diverge models away from their intended behavior. We aim to explain the causes for this phenomenon and link it to the concept of ``attention sinks'', an emergent LLM behavior crucial for fluency, in which the initial token receives disproportionately high attention scores. Our investigation identifies the neural circuit responsible for attention sinks and shows how long repetitions disrupt this circuit. We extend this finding to other non-repeating sequences that exhibit similar circuit disruptions. To address this, we propose a targeted patch that effectively resolves the issue without negatively impacting the model's overall performance. This study provides a mechanistic explanation for an LLM vulnerability, demonstrating how interpretability can diagnose and address issues, and offering insights that pave the way for more secure and reliable models.

View on arXivView PDF

Code Implementations(1)

MIT

The official implementation of "Interpreting the repeated token phenomenon in LLMs"

151Jupyter NotebookMar 10, 20251 years agoMIT

Similar Papers

Cite this paper

@article{yona2025interpreting,
  title  = {Interpreting the Repeated Token Phenomenon in Large Language Models},
  author = {Itay Yona and Ilia Shumailov and Jamie Hayes and Federico Barbero and Yossi Gandelsman},
  year   = {2025},
  eprint = {2503.08908},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.08908v1},
  journal = {ICML 2025 2025}
}

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/2503.08908.svg)](https://codeofpaper.com/paper/2503.08908)

Discussion