Infinite Retrieval: Attention Enhanced LLMs in Long-Context Processing
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
- 2024ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools18 Jun
- 2023Code Llama: Open Foundation Models for Code24 Aug
- 2023LLaMA: Open and Efficient Foundation Language Models27 Feb
Other references · 32
- 2017Attention Is All You Needcited by 59,932
- 2023GPT-4 Technical Reportcited by 18,132
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,185
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
20 more
- 2020Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Stepscited by 1,259
- 2024SnapKV: LLM Knows What You are Looking for Before Generationcited by 848
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2021A Dataset of Information-Seeking Questions and Answers Anchored in Research Paperscited by 475
- 2019Multi-News: a Large-Scale Multi-Document Summarization Dataset and Abstractive Hierarchical Modelcited by 431
- 2024PyramidKV: Dynamic KV Cache Compression based on Pyramidal Information Funnelingcited by 420
- 2021QMSum: A New Benchmark for Query-based Multi-domain Meeting Summarizationcited by 363
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2021Efficient Attentions for Long Document Summarizationcited by 342
- 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Headscited by 283
- 2024Leave No Context Behind: Efficient Infinite Context Transformers with Infini-attentioncited by 194
- 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 192
- 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
- 2024How to Train Long-Context Language Models (Effectively)cited by 141
- 2024Evaluation of OpenAI o1: Opportunities and Challenges of AGIcited by 127
- 2024In Defense of RAG in the Era of Long-Context Language Modelscited by 52
- 2024DynamicKV: Task-Aware Adaptive KV Cache Compression for Long Context LLMscited by 42
- 2024InfiniPot: Infinite Context Processing on Memory-Constrained LLMscited by 27
- 2024CAMELoT: Towards Large Language Models with Training-Free Consolidated Associative Memorycited by 24
- 2024TransformerFAM: Feedback attention is working memorycited by 21
Built on by
Citing papers per year: 2025: 3; 2026: 4.
7 papers.
- 2025FinAgentBench: A Benchmark Dataset for Agentic Retrieval in Financial Question Answeringcited by 29
- 2026From Prefix Cache to Fusion RAG Cache: Accelerating LLM Inference in Retrieval-Augmented Generationcited by 5
- 2025MOTIF: Modular Thinking via Reinforcement Fine-tuning in LLMscited by 4
- 2025QwenLong-CPRS: Towards ∞-LLMs with Dynamic Context Optimizationcited by 2
- 2026S3-Attention:Attention-Aligned Endogenous Retrieval for Memory-Bounded Long-Context Inferencecited by 0
- 2026AttentionRetriever: Attention Layers are Secretly Long Document Retrieverscited by 0
- 2026Retrieval-Augmented Generation to Support Railways Engineering Tasks: A Case Studycited by 0
- 2026Retrieval-Augmented Generation to Support Railways Engineering Tasks: A Case Study18 May 2026
- 2026AttentionRetriever: Attention Layers are Secretly Long Document Retrievers12 Feb 2026
- 2026S3-Attention:Attention-Aligned Endogenous Retrieval for Memory-Bounded Long-Context Inference25 Jan 2026
- 2026From Prefix Cache to Fusion RAG Cache: Accelerating LLM Inference in Retrieval-Augmented Generation19 Jan 2026
- 2025FinAgentBench: A Benchmark Dataset for Agentic Retrieval in Financial Question Answering7 Aug 2025
- 2025MOTIF: Modular Thinking via Reinforcement Fine-tuning in LLMs3 Jul 2025
- 2025QwenLong-CPRS: Towards ∞-LLMs with Dynamic Context Optimization23 May 2025
Similar, not cited
Close in wording, no citation either way
- 2023Retrieval meets Long Context Large Language Models
- 2025Emulating Retrieval Augmented Generation via Prompt Engineering for Enhanced Long Context Comprehension in LLMs
- 2026DySCO: Dynamic Attention-Scaling Decoding for Long-Context Language Models
- 2025Every Token Counts: Generalizing 16M Ultra-Long Context in Large Language Models
- 2025Eliciting In-context Retrieval and Reasoning for Long-context Large Language Models
- 2026Full Attention Strikes Back: Transferring Full Attention into Sparse within Hundred Training Steps
- 2025EpMAN: Episodic Memory AttentioN for Generalizing to Longer Contexts
- 2024Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG