# Retrieval from Within: An Intrinsic Capability of Attention-Based Models

*Elad Hoffer, Yochai Blau, Edan kinderman, Ron Banner, Daniel Soudry, Boris Ginsburg*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/154257) · [OpenReview](https://openreview.net/forum?id=F87kwK5CpT) · [alphaXiv](https://www.alphaxiv.org/abs/2605.05806) · [Open on the map](../papers.html#p154257)

Category: [LLM Reasoning, Memory & RAG](../pcat/19.md) › [Retrieval-Augmented Generation](../pgroup/64.md) · Type: new method · Keywords: intrinsic retrieval, attention mechanism, question answering, RAG, encoder-decoder

Areas: [Retrieval-Augmented Generation](../areas/rag.md) › Language Model Retrieval › Internal Retrieval Mechanisms

## Summary
INTRA is a framework that enables attention-based encoder-decoder models to retrieve from their internal representations, unifying retrieval and generation.

## Explained to a 5-year-old
Some computer programs read questions and try to answer them. Usually they have one part that finds information and another part that writes the answer. This paper shows that the same part that reads can also look inside its own memory to find the answer. By doing this, the program can answer better and uses less extra memory. It works like a smart notebook that can turn to the right page without opening a separate book.

## Explained to a 5-year-old, longer
Many computer programs are made to answer questions, like virtual assistants. To answer a question, they need to find the right information first. In most systems, there is a separate tool that searches for information, and another tool that writes the answer. This can cause problems because the search tool and the writing tool might not work well together. The paper explores whether a single tool can both read the question and find the answer inside its own memory. It shows that the attention mechanism inside a model can be used to retrieve information without needing a separate search tool. The model stores pieces of information as "chunks" while reading the whole text. When answering a new question, the model looks at these stored chunks and picks the most relevant ones. These selected chunks are then used directly as context for generating the answer. This way, the model reuses the same memory for both reading and answering, which saves time and computer power. It also reduces the mismatch between searching and answering, leading to better accuracy. The result is a simpler and more efficient way to build question-answering systems.

## For a technical reader
The paper proposes a way to integrate retrieval directly into the attention mechanism of encoder-decoder models, eliminating the need for a separate retriever module. By scoring pre-encoded evidence chunks with decoder attention and reusing them as context, the approach unifies retrieval and generation while amortizing the cost of encoding. Experiments on question-answering benchmarks show that this intrinsic retrieval yields higher evidence recall and better end-to-end answer quality than conventional RAG pipelines. The method also reduces the complexity of deploying retrieval-augmented systems because it removes the retriever-generator mismatch and reuses encoder states across queries. This design suggests that existing attention-based models can be adapted to perform retrieval without adding external components, offering a simpler and more efficient architecture for RAG applications.

## Problem
Existing retrieval-augmented generation systems treat retrieval and generation as separate components, leading to a mismatch between the retriever and generator. This paper asks whether an attention-based model can intrinsically retrieve from its own internal representations instead of using an external retriever.

## Method
The approach uses decoder attention queries to score pre-encoded evidence chunks and reuses those chunks as context for generation, amortizing encoder computations by reusing precomputed encoder states across queries.

## Results
The approach achieves higher evidence recall and better answer quality compared to strong engineered retrieval pipelines on question-answering benchmarks.

## Contributions
It demonstrates that attention-based encoder-decoder models already possess an intrinsic retrieval capability that can be elicited without an external retriever. It proposes a unified framework that scores and reuses internal evidence chunks, achieving better recall and answer quality on benchmarks.

## Practical relevance
This can simplify RAG pipelines and reduce computational overhead for deploying retrieval-augmented systems.

## Research questions this paper is counted under

- [How can we integrate retrieval and generation to reduce representational bottlenecks and improve efficiency in RAG systems?](../q/231.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/154257)
