Retrieval from Within: An Intrinsic Capability of Attention-Based Models
cs.LG
Submitted: 2026-05-07
Updated: 2026-09-30
Comments: Accepted to NeurIPS 2026
Code: https://github.com/rapidsai/cuvs
License: http://creativecommons.org/licenses/by/4.0/
The gist: Retrieval-augmented generation (RAG) typically treats retrieval and generation as separate systems.
Terminology
Abstract
Retrieval-augmented generation (RAG) typically treats retrieval and generation as separate systems. We ask whether an attention-based encoder-decoder can instead retrieve directly from its own internal representations. We introduce INTRA (INTrinsic Retrieval via Attention), a framework where decoder attention queries score pre-encoded evidence chunks that are then directly reused as context for generation. By construction, INTRA unifies retrieval and generation, eliminating the retriever-generator mismatch typical of RAG pipelines. This design also amortizes context encoding by reusing precomputed encoder states across queries. On question-answering benchmarks, INTRA outperforms strong engineered retrieval pipelines on both evidence recall and end-to-end answer quality. Our results demonstrate that attention-based models already possess a retrieval mechanism that can be elicited, rather than added as an external module.
Sources
- Longformer: The Long-Document Transformer
- Rethinking Attention with Performers
- ColPali: Efficient Document Retrieval with Vision Language Models
- Mamba: Linear-Time Sequence Modeling with Selective State Spaces
- CLaRa: Bridging Retrieval and Generation with Continuous Latent Reasoning
- Search-o1: Agentic Search-Enhanced Large Reasoning Models
- Jamba: A Hybrid Transformer-Mamba Language Model
- NoLiMa: Long-Context Evaluation Beyond Literal Matching
- Hyena Hierarchy: Towards Larger Convolutional Language Models
- Agentic Retrieval-Augmented Generation: A Survey on Agentic RAG
- InstructRetro: Instruction Tuning post Retrieval-Augmented Pretraining
- HELMET: How to Evaluate Long-Context Language Models Effectively and Thoroughly
- Big Bird: Transformers for Longer Sequences
- T5Gemma 2: Seeing, Reading, and Understanding Longer
- Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks