mlsanityData to 7 Oct 2026

You Only Use Reactive Attention Slice For Long Context Retrieval

arXiv 2409.13695 ↗First posted 3 Sep 2024cs.CL cs.AI cs.IRcited by 1

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

Abstract (arXiv)

Supporting longer context for Large Language Models (LLM) is a promising direction to advance LLMs. As training a model for a longer context window is computationally expensive, many alternative solutions, such as Retrieval Augmented Generation (RAG), have been used. However, most existing RAG methods adopt embedding-based retrieval that falls short on long contexts. To address such challenges, we propose an attention-based retrieval technique, You Only Use Reactive Attention slice (YOURA). YOURA leverages a novel retrieval heuristic called reaction score to rank the relevance of each sentence in the input context with the query sentence. Intuitively, we measure how the per-token attention score "reacts" to the query and greedily retrieves the most reactive sentences. Internally, YOURA generates a token-indexed vector (called reaction vector) for the whole input context. To map each sentence to the token-indexed vector, we propose an Embedding-Agnostic Sentence Yield (EASY), a best-effort token wiggling algorithm. We evaluate our retrieval technique on three open-source pre-trained LLM models across six LongBench QA datasets. Our technique achieves up to 30% vLLM inference throughput improvement for serving long-context queries with a nearly identical quality score to the simple yet effective truncate-middle approach.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Generation and context integration, one of 15 directions in Retrieval-augmented generation. Builds on 20 of its 30 references that are in the map. First posted on arXiv 3 Sep 2024.

Builds on

20 of 30 references.

Closest ancestors · 2

Same direction, newest first

  1. 2023Shall We Pretrain Autoregressive Language Models with Retrieval? A Comprehensive Study13 Apr
  2. 2022Atlas: Few-shot Learning with Retrieval Augmented Language Models5 Aug

Other references · 18

  1. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  2. 2021Improving language models by retrieving from trillions of tokenscited by 1,278
  3. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
  4. 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
  5. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
  6. 2020Stanza: A Python Natural Language Processing Toolkit for Many Human Languagescited by 719
  7. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
  8. 2024GaLore: Memory-Efficient LLM Training by Gradient Low-Rank Projectioncited by 447
  9. 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 302
  10. 2022ASQA: Factoid Questions Meet Long-Form Answerscited by 231
  11. 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
  12. 2022Recurrent Memory Transformercited by 197
6 more
  1. 2023Augmenting Language Models with Long-Term Memorycited by 186
  2. 2023Unlimiformer: Long-Range Transformers with Unlimited Length Inputcited by 127
  3. 2021Long-Short Transformer: Efficient Transformers for Language and Visioncited by 102
  4. 2020Memformer: A Memory-Augmented Transformer for Sequence Modelingcited by 63
  5. 2024Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformerscited by 51
  6. 2022Retrieval as Attention: End-to-end Learning of Retrieval and Reading within a Single Transformercited by 45

Built on by

Cited by year

Citing papers per year: 2025: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025Beyond RAG vs. Long-Context: Learning Distraction-Aware Retrieval for Efficient Knowledge Grounding
  2. 2024Enhancing Long Context Performance in LLMs Through Inner Loop Query Mechanism
  3. 2025Infinite Retrieval: Attention Enhanced LLMs in Long-Context Processing
  4. 2023Retrieval meets Long Context Large Language Models
  5. 2024Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG
  6. 2024MemoRAG: Boosting Long Context Processing with Global Memory-Enhanced Retrieval Augmentation
  7. 2024Long Context vs. RAG for LLMs: An Evaluation and Revisits
  8. 2024Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approach