mlsanityData to 7 Oct 2026

Infinite Retrieval: Attention Enhanced LLMs in Long-Context Processing

arXiv 2502.12962 ↗First posted 18 Feb 2025cs.CLcited by 7

On the map: LLM reasoning → Reasoning benchmarks and evaluation

Abstract (arXiv)

Limited by the context window size of Large Language Models(LLMs), handling various tasks with input tokens exceeding the upper limit has been challenging, whether it is a simple direct retrieval task or a complex multi-hop reasoning task. Although various methods have been proposed to enhance the long-context processing capabilities of LLMs, they either incur substantial post-training costs, or require additional tool modules(e.g.,RAG), or have not shown significant improvement in realistic tasks. Our work observes the correlation between the attention distribution and generated answers across each layer, and establishes the attention allocation aligns with retrieval-augmented capabilities through experiments. Drawing on the above insights, we propose a novel method InfiniRetri that leverages the LLMs's own attention information to enable accurate retrieval across inputs of infinitely length. Our evaluations indicate that InfiniRetri achieves 100% accuracy in the Needle-In-a-Haystack(NIH) test over 1M tokens using a 0.5B parameter model, surpassing other method or larger models and setting a new state-of-the-art(SOTA). Moreover, our method achieves significant performance improvements on real-world benchmarks, with a maximum 288% improvement. In addition, InfiniRetri can be applied to any Transformer-based LLMs without additional training and substantially reduces inference latency and compute overhead in long texts. In summary, our comprehensive studies show InfiniRetri's potential for practical applications and creates a paradigm for retrievaling information using LLMs own capabilities under infinite-length tokens. Code will be released in link.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 35 of its 43 references that are in the map. First posted on arXiv 18 Feb 2025.

Builds on

35 of 43 references.

Closest ancestors · 3

Same direction, newest first

  1. 2024ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools18 Jun
  2. 2023Code Llama: Open Foundation Models for Code24 Aug
  3. 2023LLaMA: Open and Efficient Foundation Language Models27 Feb

Other references · 32

  1. 2017Attention Is All You Needcited by 59,932
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2024The Llama 3 Herd of Modelscited by 14,192
  4. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  5. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  6. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
  7. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  8. 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
  9. 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,185
  10. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  11. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
  12. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
20 more
  1. 2020Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Stepscited by 1,259
  2. 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 848
  3. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
  4. 2021A Dataset of Information-Seeking Questions and Answers Anchored in Research Paperscited by 475
  5. 2019Multi-News: a Large-Scale Multi-Document Summarization Dataset and Abstractive Hierarchical Modelcited by 431
  6. 2024PyramidKV: Dynamic KV Cache Compression based on Pyramidal Information Funnelingcited by 420
  7. 2021QMSum: A New Benchmark for Query-based Multi-domain Meeting Summarizationcited by 363
  8. 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
  9. 2021Efficient Attentions for Long Document Summarizationcited by 342
  10. 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Headscited by 283
  11. 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 194
  12. 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 192
  13. 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
  14. 2024How to Train Long-Context Language Models (Effectively)cited by 141
  15. 2024Evaluation of OpenAI o1: Opportunities and Challenges of AGIcited by 127
  16. 2024In Defense of RAG in the Era of Long-Context Language Modelscited by 52
  17. 2024DynamicKV: Task-Aware Adaptive KV Cache Compression for Long Context LLMscited by 42
  18. 2024InfiniPot: Infinite Context Processing on Memory-Constrained LLMscited by 27
  19. 2024CAMELoT: Towards Large Language Models with Training-Free Consolidated Associative Memorycited by 24
  20. 2024TransformerFAM: Feedback attention is working memorycited by 21

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 3; 2026: 4.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2023Retrieval meets Long Context Large Language Models
  2. 2025Emulating Retrieval Augmented Generation via Prompt Engineering for Enhanced Long Context Comprehension in LLMs
  3. 2026DySCO: Dynamic Attention-Scaling Decoding for Long-Context Language Models
  4. 2025Every Token Counts: Generalizing 16M Ultra-Long Context in Large Language Models
  5. 2025Eliciting In-context Retrieval and Reasoning for Long-context Large Language Models
  6. 2026Full Attention Strikes Back: Transferring Full Attention into Sparse within Hundred Training Steps
  7. 2025EpMAN: Episodic Memory AttentioN for Generalizing to Longer Contexts
  8. 2024Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG