You Only Use Reactive Attention Slice For Long Context Retrieval
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
- 2023Shall We Pretrain Autoregressive Language Models with Retrieval? A Comprehensive Study13 Apr
- 2022Atlas: Few-shot Learning with Retrieval Augmented Language Models5 Aug
Other references · 18
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2021Improving language models by retrieving from trillions of tokenscited by 1,278
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2020Stanza: A Python Natural Language Processing Toolkit for Many Human Languagescited by 719
- 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 584
- 2024GaLore: Memory-Efficient LLM Training by Gradient Low-Rank Projectioncited by 447
- 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 302
- 2022ASQA: Factoid Questions Meet Long-Form Answerscited by 231
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
- 2022Recurrent Memory Transformercited by 197
6 more
- 2023Augmenting Language Models with Long-Term Memorycited by 186
- 2023Unlimiformer: Long-Range Transformers with Unlimited Length Inputcited by 127
- 2021Long-Short Transformer: Efficient Transformers for Language and Visioncited by 102
- 2020Memformer: A Memory-Augmented Transformer for Sequence Modelingcited by 63
- 2024Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformerscited by 51
- 2022Retrieval as Attention: End-to-end Learning of Retrieval and Reading within a Single Transformercited by 45
Built on by
Citing papers per year: 2025: 1.
1 paper.
- 2025Rope to Nope and Back Again: A New Hybrid Attention Strategycited by 46
- 2025Rope to Nope and Back Again: A New Hybrid Attention Strategy30 Jan 2025
Similar, not cited
Close in wording, no citation either way
- 2025Beyond RAG vs. Long-Context: Learning Distraction-Aware Retrieval for Efficient Knowledge Grounding
- 2024Enhancing Long Context Performance in LLMs Through Inner Loop Query Mechanism
- 2025Infinite Retrieval: Attention Enhanced LLMs in Long-Context Processing
- 2023Retrieval meets Long Context Large Language Models
- 2024Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG
- 2024MemoRAG: Boosting Long Context Processing with Global Memory-Enhanced Retrieval Augmentation
- 2024Long Context vs. RAG for LLMs: An Evaluation and Revisits
- 2024Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approach