Repetitions are not all alike: distinct mechanisms sustain repetition in language models

Matéo Mahaut, Francesca Franzon
4/1/2025
cs.CLcs.LG

No confident code implementation found for this paper.

Abstract

Large Language Models (LLMs) can sometimes degrade into repetitive loops, persistently generating identical word sequences. Because repetition is rare in natural human language, its frequent occurrence across diverse tasks and contexts in LLMs remains puzzling. Here we investigate whether behaviorally similar repetition patterns arise from distinct underlying mechanisms and how these mechanisms develop during model training. We contrast two conditions: repetitions elicited by natural text prompts with those induced by in-context learning (ICL) setups that explicitly require copying behavior. Our analyses reveal that ICL-induced repetition relies on a dedicated network of attention heads that progressively specialize over training, whereas naturally occurring repetition emerges early and lacks a defined circuitry. Attention inspection further shows that natural repetition focuses disproportionately on low-information tokens, suggesting a fallback behavior when relevant context cannot be retrieved. These results indicate that superficially similar repetition behaviors originate from qualitatively different internal processes, reflecting distinct modes of failure and adaptation in language models.

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{mahaut2025repetitions,
  title  = {Repetitions are not all alike: distinct mechanisms sustain repetition in language models},
  author = {Matéo Mahaut and Francesca Franzon},
  year   = {2025},
  eprint = {2504.01100},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.01100v2}
}

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

Discussion