TL;DR
Self-Retrieval is a novel end-to-end architecture that collapses the entire information retrieval (IR) pipeline—indexing, retrieval, and reranking—into a single Large Language Model (LLM). By "internalizing" a corpus into its own parameters and using constrained decoding to generate passages directly, it significantly outperforms traditional multi-stage retrieval systems and boosts the performance of downstream tasks like Retrieval-Augmented Generation (RAG).
The Problem with Fragmented Retrieval
Traditional Information Retrieval (IR) systems are typically fragmented. They operate as a multi-stage pipeline: first, an external index (like a vector database) is built; then, a retriever (like BM25 or a dense encoder) finds candidates; finally, a separate model (often an LLM) reranks them.
The authors argue that this separated architecture is inefficient and prevents deep collaboration between the retrieval process and the LLM’s internal knowledge. Dense retrieval, for instance, forces complex natural language into a single vector, which can lose a lot of nuance. Meanwhile, existing "generative retrieval" methods often rely on abstract document IDs that fail to leverage the LLM's pre-trained linguistic strengths. The goal of this research is to create a unified system where one model handles the entire process.
Methods: The Self-Retrieval Framework
The "Self-Retrieval" framework unifies the IR pipeline into three integrated phases:
- Indexing (Internalization): Instead of relying on an external database, the model "memorizes" the corpus through self-supervised learning. It is trained on a sentence-to-passage task: given a single sentence from the corpus, the model must generate the full passage it belongs to. This bakes the document content directly into the LLM's weights.
- Retrieval (Sequential Generation): When a user asks a query, the model doesn't "look up" a document; it generates one. To ensure the model doesn't hallucinate a non-existent document, the authors use constrained decoding. They build a trie (a prefix tree) of the entire corpus. During generation, the model is only allowed to produce tokens that exist in the trie, ensuring the output matches a real document in the library.
- Reranking (Self-Assessment): After generating candidate passages, the model performs a self-critique. It generates a response like "can answer the query" or "cannot answer the query." The probability (logit) of these responses is used as a relevance score to rank the passages.
For RAG applications, the model simply continues generating the final answer immediately after the retrieval and assessment steps, all in a single inference pass.
Key Insights
- The LLM as the Index: The most provocative idea is that we don't need external vector stores for specific corpora. By treating indexing as a "continued pre-training" task, the model develops a much more granular understanding of the documents than a vector embedding ever could.
- Constrained Decoding as a Safety Rail: One of the biggest fears with generative retrieval is hallucination. By using a trie-based constraint, the authors turn a creative generator into a precise search engine.
- Natural Compatibility with RAG: Because the retriever and the "reader" (the part that answers the question) are the same model, there is no "knowledge gap." The model is already familiar with the documents it is retrieving because it helped "index" them.
- Scaling Benefits: The paper shows that as the LLM gets larger, retrieval performance consistently improves, suggesting that IR is a capability that scales with general intelligence.
Key Results
Self-Retrieval (using Llama 2 7B or StableLM 3B) achieved state-of-the-art results across several standard IR benchmarks, including Natural Questions (NQ), TriviaQA, MS MARCO, and KILT.
- Passage Retrieval: On NQ, it achieved a Mean Reciprocal Rank (M@5) of 70.00, significantly beating strong dense retrievers like BGE-FT (63.99) and other generative models like DSI-XXL (50.20).
- Document Retrieval: On the NQ320K dataset, it reached a Hits@1 of 73.3, outperforming the previous best generative retriever (GenRet) by 5.2 points.
- RAG Performance: In end-to-end question answering, Self-Retrieval 7B outperformed a standard BGE-retriever + Llama-reader pipeline (53.26 vs 49.10 Exact Match score on NQ 10K).
Limitations and Future Work
- Efficiency: While memory-efficient (it doesn't need a massive external vector index), generating text via beam search is computationally slower than a simple vector dot product.
- Corpus Scaling: The experiments were conducted on up to 200,000 documents. While impressive, this is still far from "web-scale" (billions of pages). Testing on larger, noisier collections is a necessary next step.
- Dynamic Updates: Currently, to add new documents to the "index," you would likely need to fine-tune the model again. The authors suggest "incremental learning" as a vital area for future research to allow the model to learn new information on the fly without forgetting the old.
Summary updated