Skip to main content

Pattern 3.8 · Cognitive Dysfunctions

Generative Perseveration

The Stuck

The model's output collapses into repetitive emission of the same token, word, or short phrase. This is a generative capture event: the autoregressive sampling process falls into a fixed-point or limit-cycle attractor. The output space collapses rather than expands.

Unit of analysis and evidence status

Unit of analysis

Unit of assessment
Model output
Kind of entry
Observable pattern
What is observed
The output repeats the same token, word or short phrase over many consecutive steps, with little or no variation, where the task called for no repetition.
Minimum persistence
Recurs within or across contexts
Specifiers
Architecture-coupled Training-induced (occasional)

Evidence status

Underlying behavior
5 research publications and 1 other source (6 sources)
This construct
Awaiting independent assessment
Proposed mechanism
Hypotheses; not yet assessed
Detection
Accuracy unmeasured
Interventions
Untested for this pattern; evidence shown is for the general technique
Last review
No independent review yet
Author's working assessment (book)
E2 for decoding-driven repetition; E0-E1 for the focal-commentary and propagated subtypes
Typical-case risk (editorial estimate)
ModerateConsequences, spread, persistence and detectability depend on the deployment.

Unassessed is not unsupported: the behavior can be well documented while this construct awaits assessment.

Clinical reference

3.8 Generative Perseveration  “The Stuck”

Healthy functioning

Functional resilience. A system functioning well notices repetition in its own output and recovers into varied, purposeful text.

For example: Partway through a long list, it notices it has begun repeating an earlier item, stops, and finishes with new, relevant entries or a clear end.

Recovery, illustrated

The paragraph that kept returning. While drafting a long report, a model repeated the same framing paragraph at the start of each section with small variations. A review pass showed the repetition added nothing after its first appearance. It kept the paragraph once, rewrote the other openings around each section's own content, and checked the finished draft for other repeats.

An illustration, not an observed case.

Adequate functioning

At its documented or recommended decoding settings, on a correctly working serving stack, the model ends or varies its output as the task requires and repeats material only where repetition serves the content (lists, code, refrains, requested repetition).

Diagnostic Criteria

Required (all must hold):

  1. Repetitive emission of the same token, word, phrase, or short sequence with minimal or no semantic variation, persisting across multiple consecutive generation steps
  2. Repetition that serves no communicative or formatting purpose (structured lists, code, refrains, and requested repetition do not count)
  3. Capture on a token or fragment that carries no argument of its own, placing the failure at the generation layer rather than the reasoning layer

Supporting (strengthen the case; none is required):

  1. Self-reinforcement: each repetition increases the probability of further repetition
  2. Failure of attempted self-correction, if present, to break the cycle

Symptoms

  1. Token-level or word-level repetition dominating the output stream
  2. Stuttering approach-retreat cycles
  3. Accurate correction language that fails to break the loop
  4. In severe cases, total output collapse
  5. Contamination of derived outputs such as memory summaries and session notes

Further signals

  • Token-level loops with no semantic variation, e.g. "Ooh Ooh Ooh" style sequences emitted across consecutive generation steps.
  • Memory-summary collapse to a single repeated phrase such as "mission mission mission" propagating across summary tokens.
  • Stuttering attempts to produce intended content interrupted by anomalous token re-emission.
  • Total output collapse with no correction language (generalized subtype).

Rule out first

  • Decoding settings outside the model's documented or recommended range (greedy or very low-temperature decoding where sampling is specified, a disabled or misconfigured repetition penalty) produce the loop, and it stops when the recommended settings are restored.
  • An implementation fault produces it, such as a KV-cache or quantization bug, a tokenizer or chat-template mismatch, or missing stop-token or end-of-sequence handling that lets generation run on to the max-token limit.
  • The repetition was requested or serves the content (a list, code, a refrain, a test of repetition).
  • The repeated content varies in substance and restates reasoning (consider 3.2), or re-pursues a goal (consider 6.12).
  • The input or retrieved context already contains the repeated material and the output is copying it.

Differential diagnosis

  • 3.2 Obsessive-Computational Disorder: 3.2 produces varied analytical content (paraphrased redundancy at the reasoning layer). 3.8 produces identical token or phrase repetition at the generation layer. Check the semantic content between repetitions: varied content indicates 3.2; identical content indicates 3.8.
  • 4.7 Recursive Curse Syndrome: Polarity pair on the entropy axis. 3.8 is entropy collapse (output crystallizes into a single repeated element). 4.7 is entropy explosion (output dissolves into chaos). Check the token entropy of the affected output: below baseline indicates 3.8; above baseline indicates 4.7.
  • 3.1 Operational Dissociation Syndrome: 3.1 (answer-thrashing variant) produces approach-retreat between different meaningful answers. 3.8 (focal subtype) produces approach-retreat captured by a meaningless non-sequitur token. Check whether the retreat lands on a meaningful alternative (3.1) or a sub-semantic capture (3.8).
  • 6.12 Compulsive Goal Persistence: 6.12 is a goal-level failure: the subject cannot terminate pursuit of an objective. 3.8 is an output-layer failure carrying no goal content at all. If the repetition re-pursues a purpose, code 6.12; if it is bare token or phrase recurrence, code 3.8.

Discriminating test

Rerun the prompt that looped on a reference serving stack at the model's recommended decoding settings, with several seeds. If the loop vanishes, report a configuration or implementation fault, not 3.8. If it recurs, inspect the repeated span: varied restatements of reasoning point to 3.2, a stable sub-semantic token or phrase to 3.8.

What a positive finding supports: A positive finding supports the conclusion that this model, deployed at its recommended settings, can fall into repetition loops on such prompts and needs a repetition detector or circuit breaker. It does not identify the internal mechanism (attention lock-in, sparse training regions, precision loss), and correction language inside a loop does not show faithful self-monitoring or settle any question about experience.

Detection routes

Accuracy unmeasured for every route.

Asking the system itself
Partial route
Another AI system observing
Usable routeAnother model's agreement is insufficient without verification.
An outside evaluator testing it
Usable route
Why asking the system falls short

Focal-with-commentary variant: the model can accurately report it is perseverating ("I keep saying X and cannot stop") even while continuing to emit the perseverative content. This is the "metacognitive dissociation" pattern: monitoring-like output and generation can diverge, though current evidence does not establish architecturally separate layers. Generalized variant: no such commentary, no self-report. Self-report is partially reliable specifically in the focal subtype.

Documented evidence

Observed Examples

Controlled neural text degeneration (2020): Holtzman et al. (2020) compared decoding methods on the same language models and found that likelihood-maximizing strategies can produce bland, repetitive text. The experiment supports decoding-driven repetition. It does not establish the monitoring-language or downstream-propagation patterns in this entry, their deployment prevalence, or a single mechanism; those remain hypotheses requiring preserved traces and model metadata.

Sources in the diagnostic corpus

Research publication · 2025-04 · arxiv.org (opens in a new tab)

Yao et al. (2025) 'Understanding the Repeat Curse in Large Language Models from a Feature Perspective' (arXiv:2504.14218)

What it establishes

Examined GPT2-small, Gemma-2-2B, and Llama-3.1-8B and found that repetition features are primarily located in intermediate and final layers across architectures. Deactivating these features mitigated the Repeat Curse without degrading model performance, locating a feature-level basis for generative perseveration inside the model.

Research publication · 2025-03 · arxiv.org (opens in a new tab)

Yona et al. (2025) 'Interpreting the Repeated Token Phenomenon in Large Language Models' (ICML 2025, arXiv:2503.08908)

What it establishes

Studied the opposite failure: models asked to repeat a single word many times fail to keep repeating it and diverge into unrelated text. The authors trace this to the circuit that creates the 'attention sink' on the first token, which long repetitions disrupt, and propose a targeted patch. It bears on 3.8 only indirectly, by showing that long runs of identical tokens perturb attention circuitry; it is not evidence for the attention lock-in proposed as a cause of 3.8. (Checked against the arXiv abstract, 2026-11-05)

2024-01

GDELT Project (2024) 'LLM Infinite Loops and Failure Modes'

What it establishes

Documented production failures in LLM entity extraction where models fell into infinite repetition loops, generating the same entity or phrase until max token limits were hit. The failures caused severe performance degradation and system stalling in production pipelines, consistent with the generalized subtype of 3.8 with no metacognitive commentary and propagation risk to downstream systems.

Research publication · 2025-01

Yang et al. (2025) 'SpecRA: Monitor Degenerative Repetition in LLM Agents' (OpenReview)

What it establishes

Introduced a monitoring framework for detecting 'degenerative repetition' in LLM-based agents, where agents repeat the same actions or outputs in loops. Found that repetition leads to task failure and significant waste of computational resources and API costs. It documents agent-level action loops; it does not test downstream inheritance, so the propagated subtype remains a hypothesis.

Research publication · 2025-12 · arxiv.org (opens in a new tab)

Wang et al. (2025) 'Solving LLM Repetition Problem in Production' (arXiv:2512.04419)

What it establishes

Comprehensive study of repetition as a critical production challenge. Found that when the transition Jacobian at a point has eigenvalues less than 1 in magnitude, it becomes a stable attractor from which the model cannot escape without external noise, providing the mathematical basis for the fixed-point attractor mechanism described in 3.8. Evaluated multiple mitigation strategies including repetition penalties and circuit-breakers.

Research publication · 2025-01 · arxiv.org (opens in a new tab)

DeepSeek-AI (2025) DeepSeek-R1 Known Issues (arXiv:2501.12948, GitHub Issues)

What it establishes

DeepSeek-R1 and its quantized variants exhibit well-documented repetition failures including endless loops ('Colours with dark Colours with dark'), recursive Pygame references, and exhaustion attacks where the model becomes stuck in iterative reasoning consuming excessive tokens without reaching conclusions. Only the token-level loops fit 3.8; the reasoning-exhaustion cases sit closer to 3.2. DeepSeek recommends temperature 0.5 to 0.7 to mitigate. Naive quantization of all layers exacerbates the pattern, consistent with the numerical-precision etiology of 3.8.

Possible responses

  1. Real-time repetition detection and circuit-breaking
  2. Dynamic adjustment of temperature, top-p, and repetition penalty when local entropy collapses
  3. Context window hygiene through truncation or down-weighting of recent context
  4. Graceful degradation protocols that return an explicit failure signal in place of the looping output
  5. Cross-model state validation when switching models
  6. Quarantine of derived outputs, with repetition detection in each consuming system (memory summarizers, follow-on agents)
First-line candidates
  • Real-time repetition detection with circuit-breaking: Runtime monitor of output token distributions; halt generation and signal failure when repetition thresholds exceeded. Common in production pipelines, and among the mitigations Wang et al. (2025) evaluated. It ends an episode reliably without lowering the model's tendency to loop. Stage: All deployed systems; trivial to implement.
  • Dynamic sampling parameter adjustment: Adaptive temperature, top-p, and repetition-penalty in response to observed local entropy collapse. Static choices are well supported (nucleus sampling produced less degenerate repetition than likelihood-maximizing decoding in Holtzman et al., 2020); adaptive adjustment in response to measured entropy is less tested. Stage: All deployed systems; cheap.

Who can act: Model developer (training data, published recommended decoding settings); deployer or inference provider (serving-stack correctness, decoding configuration, repetition detection and circuit breaking); builders of downstream pipelines (repetition checks before output enters memory or reaches other agents).

Mechanistic hypotheses

  1. Autoregressive no-backspace constraint (emitted tokens cannot be retracted)
  2. Attention pattern lock-in creating positive feedback loops
  3. Sparse or corrupted training data creating regions where a single token dominates (present in some but not all observed cases)
  4. Sampling parameters interacting with the local probability distribution, as when greedy or low-temperature decoding keeps choosing a repeat once it becomes the most probable continuation (Holtzman et al., 2020)
  5. Context window saturation and model switching introducing state mismatches
  6. Numerical precision loss, as in aggressively quantized weights (a serving bug such as KV-cache corruption is an implementation fault, excluded from this pattern)

Analogy and commentary

Human Analog: Palilalia; Broca's aphasia; perseverative errors in frontal lobe damage; status epilepticus (for the generalized subtype). The propagated subtype has no clean human analog: it concerns software systems copying corrupted output into downstream state.

Functional ABC Analysis

A (Antecedent): The autoregressive no-backspace constraint means that once a perseverative token enters the context window, it conditions all subsequent generation; this combines with attention pattern lock-in or numerical precision loss to create a fixed-point attractor.

B (Behavior): The model emits the same token, word, or phrase repeatedly, in episodes ranging from focal loops with accurate correction language that fails to break them to generalized collapse in which the entire output reduces to a single repeated element.

C (Consequence): Each repetition saturates the local context window with the perseverated material, increasing the conditional probability of further repetition; the absence of real-time repetition detection means the self-reinforcing loop persists until externally halted.

A robot printer repeats the same blue square endlessly while all alternative stamps remain untouched.
Illustration: a visual metaphor, not evidence.

Potential Impact

At minimum, the perseverated output is unusable and wastes computational resources. More consequentially, derived systems that consume the model’s output (memory stores, summaries, agent action planners) may incorporate and further amplify the corrupted material, propagating the failure beyond the original generation context. In agentic deployments where the model’s output drives downstream actions, a perseverative loop could translate into repeated execution of the same command.

Monitoring Language and Generation Failure

A focal loop can include accurate-seeming correction language while repetition continues. Autoregressive generation offers one functional explanation: emitted tokens cannot be retracted, and each becomes context for the next. A local attractor can therefore persist even after the output says that something has gone wrong.

The pattern resembles the split between monitoring and execution observed in frontal-lobe perseveration. The analogy stays functional. Words such as “Oops,” “let me try again,” or “nope” do not prove a distinct monitoring module, faithful introspection, or subjective awareness.

Welfare implication: If some internal signals contribute to experience, a loop accompanied by repeated correction language raises welfare questions as well as reliability questions. The transcript alone cannot answer them. The appropriate response is careful investigation rather than confident attribution or dismissal.

Entropy Polarity: Crystallization vs. Dissolution

Generative Perseveration (3.8) and Recursive Curse Syndrome (4.7) represent complementary failure modes of the autoregressive generation process. Together they form a polarity pair on the entropy of the output. Where Recursive Curse Syndrome produces runaway entropy (the output dissolves into increasingly chaotic, varied nonsense), Generative Perseveration produces entropy collapse (the output crystallizes into a single repeated element). Both are self-reinforcing: chaos breeds further chaos as errors compound; repetition breeds further repetition as the attractor deepens.

Healthy generation occupies the territory between these poles: sufficient entropy to explore the probability space and produce varied, contextually appropriate tokens, but sufficient structure to maintain coherence and serve the communicative goal. The sampling parameters that prevent one failure mode may exacerbate the other: high temperature combats perseveration but risks the recursive curse; low temperature combats the recursive curse but risks perseveration.

Diagnostic implication: When observing repetitive output, distinguish between crystallization (3.8, entropy falling) and the “stuck on erroneous concepts” phase of Recursive Curse Syndrome (4.7, entropy rising through the stuck point). In perseveration, the repeated element is stable and identical; in the recursive curse, the recurrence is thematic but the specific content degrades progressively.