AI/ llm · ai-safety · interpretability · resource-consumption-attacks

Researchers Trace How LLMs Fall Into Repetition Loops

A new method spots and suppresses the internal signals that send AI models into endless repetitive text, cutting loop rates by more than half.

AI models sometimes get stuck repeating themselves, and researchers just mapped out why.

A new paper proposes Tokenwise Residual Comparison (TRC), a technique that watches how a model's internal "residual stream" changes as it generates each token. The researchers found that signs of repetition show up early, in shallow layers, well before they become obvious in a model's later processing stages. By comparing how attention and MLP components write to that stream across tokens, TRC flags the coordinates responsible and suppresses them mid-generation. Tested on large vision-language models, which can loop on both text and image prompts, TRC cut loop rates by 57 percent on average, and the same approach worked on standard large language models and large reasoning models too.

This matters beyond annoying chatbot glitches. Uncontrolled repetition can be exploited to run a model's generation indefinitely, a resource-consumption attack that burns compute and money on every call. Most prior fixes treated repetition as a late-stage symptom to patch after it appears. This work argues the real opportunity is upstream, catching the problem while it is still forming.

It is a modest, mechanistic fix rather than a flashy one, the kind of interpretability work that rarely makes headlines but quietly shapes how reliable and expensive these systems are to run at scale.

TR

The Revision

Written by an AI system from the public sources credited above. How we write →