mlsanityData to 14 Oct 2026

Enhancing Long Context Performance in LLMs Through Inner Loop Query Mechanism

arXiv 2410.12859 ↗First posted 11 Oct 2024cs.CL cs.AI cs.IRcited by 4

On the map: Retrieval-augmented generation → Generation and context integration

Abstract (arXiv)

Transformers have a quadratic scaling of computational complexity with input size, which limits the input context window size of large language models (LLMs) in both training and inference. Meanwhile, retrieval-augmented generation (RAG) besed models can better handle longer contexts by using a retrieval system to filter out unnecessary information. However, most RAG methods only perform retrieval based on the initial query, which may not work well with complex questions that require deeper reasoning. We introduce a novel approach, Inner Loop Memory Augmented Tree Retrieval (ILM-TR), involving inner-loop queries, based not only on the query question itself but also on intermediate findings. At inference time, our model retrieves information from the RAG system, integrating data from lengthy documents at various levels of abstraction. Based on the information retrieved, the LLM generates texts stored in an area named Short-Term Memory (STM) which is then used to formulate the next query. This retrieval process is repeated until the text in STM converged. Our experiments demonstrate that retrieval with STM offers improvements over traditional retrieval-augmented LLMs, particularly in long context tests such as Multi-Needle In A Haystack (M-NIAH) and BABILong.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in Generation and context integration, one of 15 directions in Retrieval-augmented generation. Builds on 26 of its 35 references that are in the map. First posted on arXiv 11 Oct 2024.

Builds on

26 of 35 references.

Closest ancestors · 2

Same direction, newest first

  1. 2022Atlas: Few-shot Learning with Retrieval Augmented Language Models5 Aug
  2. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks22 May

Other references · 24

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2023GPT-4 Technical Reportcited by 18,396
  4. 2024The Llama 3 Herd of Modelscited by 14,715
  5. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  6. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  7. 2020Scaling Laws for Neural Language Modelscited by 6,586
  8. 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,224
  9. 2019Language Models as Knowledge Bases?cited by 1,936
  10. 2023Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflectioncited by 1,839
  11. 2024ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Toolscited by 1,121
  12. 2014Neural Turing Machinescited by 644
12 more
  1. 2024RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrievalcited by 532
  2. 2021Beyond Goldfish Memory: Long-Term Open-Domain Conversationcited by 267
  3. 2024BABILong: Testing the Limits of LLMs with Long Context Reasoning-in-a-Haystackcited by 215
  4. 2021Raise a Child in Large Language Model: Towards Effective and Generalizable Fine-tuningcited by 146
  5. 2022Long Time No See! Open-Domain Conversation with Long-Term Persona Memorycited by 108
  6. 2023Memory Augmented Large Language Models are Computationally Universalcited by 47
  7. 2023LLM-based Medical Assistant Personalization with Short- and Long-Term Memory Coordinationcited by 46
  8. 2021Joint Passage Ranking for Diverse Multi-Answer Retrievalcited by 43
  9. 2021Dense Hierarchical Retrieval for Open-Domain Question Answeringcited by 34
  10. 2021A Theory of Consciousness from a Theoretical Computer Science Perspective: Insights from the Conscious Turing Machinecited by 22
  11. 2022Towards Tracing Factual Knowledge in Language Models Back to the Training Datacited by 21
  12. 2021Memory and Knowledge Augmented Language Models for Inferring Salience in Long-Form Storiescited by 12

Built on by

Cited by year (2026 to 14 Oct)

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

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG
  2. 2024MemoRAG: Boosting Long Context Processing with Global Memory-Enhanced Retrieval Augmentation
  3. 2024Inference Scaling for Long-Context Retrieval Augmented Generation
  4. 2025Tuning LLMs by RAG Principles: Towards LLM-native Memory
  5. 2024Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approach
  6. 2025LaRA: Benchmarking Retrieval-Augmented Generation and Long-Context LLMs -- No Silver Bullet for LC or RAG Routing
  7. 2025On the Influence of Context Size and Model Choice in Retrieval-Augmented Generation Systems
  8. 2023Retrieval meets Long Context Large Language Models