Exploring Recursive Doubt in Large Language Models

Yibo Miao, Yichuan Cao, Xiao-Shan Gao, Yinpeng DongOpenReview 2026 · Submission to ICLR 2026 · Rejected

TL;DR

Researchers have discovered that Large Language Models (LLMs) can fall into "Recursive Doubt"—a pathological state where they repeatedly question and negate their own reasoning, similar to Obsessive-Compulsive Disorder (OCD) in humans. The paper introduces a method to induce this state (FIND), identifies the unique "fence-like" attention patterns that cause it, and proposes a dynamic mitigation strategy (FDA²) to break the loop.

What Problem Does This Paper Address?

We’ve all seen LLMs "overthink," providing long-winded explanations for simple math problems. However, this paper identifies a much more severe phenomenon called Recursive Doubt. Unlike simple overthinking, recursive doubt is a self-reinforcing loop of denial. The model doesn't just generate more steps; it becomes trapped in a cycle of "Wait, maybe I'm wrong..." followed by "Alternatively, perhaps..." effectively paralyzing its decision-making.

This isn't just a curiosity; it’s a significant safety and cost risk. For an autonomous vehicle or a robotic controller, this "decision paralysis" could be catastrophic. For API providers, it opens the door to "Denial-of-Service" style attacks where a malicious prompt forces a model to generate tens of thousands of redundant tokens, skyrocketing computational costs and latency.

Methods

The authors tackle the problem from three angles: induction, analysis, and mitigation.

  1. FIND (Feedback-guided Iterative iNDuction): To study the problem, they first had to trigger it reliably. They used an auxiliary LLM to generate "induction prefixes"—short prompts designed to sow doubt. They then used Direct Preference Optimization (DPO) to fine-tune this auxiliary model. The reward function favored prefixes that led to longer outputs and the frequent use of "doubt tokens" (e.g., "wait," "however," "recheck").
  2. Attention Analysis: By looking under the hood, the researchers found that during these loops, certain tokens—which they call Obsessive Cognitive Tokens (OCTs)—exhibit a distinctive "fence-like" attention pattern. Instead of looking at the whole context, the model’s attention fixates on specific, regularly spaced sentences across multiple layers, reinforcing the cycle of doubt.
  3. FDA² (Fence-based Dynamic Attention Adjustment): To fix the issue, they developed a mitigation strategy that calculates a "fenceness" score for tokens in real-time. If a token shows the tell-tale periodic peaks of an OCT, the system dynamically adjusts its attention weights to suppress the recursive loop, preventing the model from fixating on the doubt-inducing prefix.

Datasets

The researchers evaluated their methods across several reasoning-heavy benchmarks to ensure the phenomenon wasn't limited to one domain:

  • GSM8K: Grade school math word problems.
  • MathQA & MATH-500: More complex, high-school level mathematics.
  • MMLU-Pro: A diverse dataset covering 12 categories including physics, chemistry, and law.
  • HumanEval: A standard benchmark for evaluating coding and programming logic.

Key Insights and Ideas

  • The OCD Analogy: The most striking insight is the parallel between LLM behavior and human psychology. Just as OCD patients might repeatedly check a door lock, doubting their own memory, LLMs can get stuck in a "worry-doubt" loop where they fixate on local reasoning steps and lose sight of the global solution.
  • Structural Signatures: Recursive doubt isn't just a semantic failure; it has a structural signature in the model's attention maps. The "fence-like" pattern is a quantifiable metric that allows for surgical intervention without retraining the entire model.
  • Transferability: A "doubt prefix" optimized for one model (like DeepSeek-R1) often works on others (like QwQ-32b), suggesting that recursive doubt is a fundamental vulnerability in how current reasoning models are architected.

Key Results

  • Induction Power: Using FIND, the researchers were able to increase the number of inference tokens by 18x and inference time by 21x on models like DeepSeek-R1-Distilled-Qwen-7b.
  • API Vulnerability: The method even worked on closed-source commercial APIs. On OpenAI’s o3, FIND achieved a 7x increase in token count and an 8x increase in inference time.
  • Mitigation Success: Their FDA² method was highly effective at breaking these loops. It reduced the Recursive Doubt Rate (RDR) from over 30% down to below 10% while successfully recovering the model's accuracy.
  • Low Overhead: Because FDA² works by analyzing existing attention matrices, it adds minimal computational cost to the inference process.

Limitations and Future Work

The authors noted a mysterious phenomenon they call "Awakening." Occasionally, after generating 20,000+ tokens of pure doubt, a model will suddenly "snap out of it" and provide the correct answer. The mechanics behind this sudden recovery remain unexplained and are a primary target for future research.

Additionally, the current mitigation strategy is a "black-box" approach. Because a mitigator cannot always perfectly distinguish between a legitimate user prompt and a malicious induction prefix, there is a risk of over-correction. Future work will focus on developing even more robust defenses that can protect LLM-based systems in critical real-world applications.

Summary updated

BibTeX
@misc{miao2026exploring,
  author = {Yibo Miao and Yichuan Cao and Xiao-Shan Gao and Yinpeng Dong},
  title = {{Exploring Recursive Doubt in Large Language Models}},
  year = {2026},
  url = {https://openreview.net/forum?id=W3FV33GmlV},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}
Figure