mlsanityData to 7 Oct 2026

LoopGuard: Breaking Self-Reinforcing Attention Loops via Dynamic KV Cache Intervention

arXiv 2604.10044 ↗First posted 11 Apr 2026cs.AIcited by 2

On the map: Efficient LLM inference and serving → KV cache optimization

Abstract (arXiv)

Through systematic experiments on long-context generation, we observe a damaging failure mode in which decoding can collapse into persistent repetition loops. We find that this degeneration is driven by collapsed attention patterns, where a subset of heads locks onto a narrow suffix of the history, and is further stabilized by inference-time KV cache reuse. Crucially, since many existing KV cache policies rely on attention-based importance, this collapse can produce spuriously high scores for repetitive tokens, causing cache management to inadvertently amplify repetition. To study this phenomenon in a controlled and reproducible manner, we introduce LoopBench, a benchmark with explicit loop-inducing conditions and loop-oriented metrics that quantify repetition severity and generation instability beyond downstream task scores. Building on these insights, we propose LoopGuard, a lightweight, plug-in KV cache guard that detects loop onset online and disrupts the feedback cycle by pruning repetitive tail spans under a fixed cache budget. Experiments on LoopBench show that LoopGuard reduces loop incidence by over 90 percentage points, while restoring output diversity and reducing token waste.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 18 of its 24 references that are in the map. First posted on arXiv 11 Apr 2026.

Builds on

18 of 24 references.

Closest ancestors · 2

Same direction, newest first

  1. 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inference16 Jun
  2. 2024SnapKV: LLM Knows What You are Looking for Before Generation22 Apr

Other references · 16

  1. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  2. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  3. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  4. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  5. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  6. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
  7. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
  8. 2022In-context Learning and Induction Headscited by 930
  9. 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 192
  10. 2020Evaluating the Evaluation of Diversity in Natural Language Generationcited by 127
  11. 2025Context Length Alone Hurts LLM Performance Despite Perfect Retrievalcited by 118
  12. 2022Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generationcited by 90
4 more
  1. 2023Repetition In Repetition Out: Towards Understanding Neural Text Degeneration from the Data Perspectivecited by 39
  2. 2024Repetition Neurons: How Do Language Models Produce Repetitions?cited by 22
  3. 2025LoopLLM: Transferable Energy-Latency Attacks in LLMs via Repetitive Generationcited by 7
  4. 2024Non-Halting Queries: Exploiting Fixed Points in LLMscited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Moment-KV: Momentum-Based Decode-Time KV Cache Compression for Long Generation
  2. 2025REAL: REtrieval-reAsoning and Logic-constructed Attention Behaviors for Long-Context KV Cache Compression
  3. 2025KV Cache Recycling to Expand Usable Context Capacity in Low Parameter LLMs
  4. 2026Random Attention: Rethinking KV Cache Eviction for Efficient Reasoning
  5. 2026Behavior-Preserving KV Cache Compression
  6. 2024DynamicKV: Task-Aware Adaptive KV Cache Compression for Long Context LLMs
  7. 2025LazyEviction: Lagged KV Eviction with Attention Pattern Observation for Efficient Long Reasoning
  8. 2026KVDiagnosis: A Diagnostic Benchmark for KV-Cache Compression in Long-Context Language Models