TL;DR
Current Retrieval-Augmented Generation (RAG) systems force Large Language Models (LLMs) to awkwardly translate their rich internal thoughts into plain-English search queries just to communicate with a separate search engine. This paper introduces LAnR (Latent Abstraction for RAG), a unified framework where a single LLM encodes documents, searches for missing evidence, and decides when to stop—all directly inside its own mathematical hidden state. It’s faster, eliminates the need for a separate retriever model, and actually improves accuracy on complex multi-step questions.
What Problem Does This Paper Address?
Imagine you’re trying to answer a multi-step trivia question: "What is the home stadium of the team David Beckham last played for?"
In conventional RAG systems, an LLM solves this by talking out loud to itself. It generates a chain of tokens ("First, I need to know Beckham's last team..."), writes a text search query, waits for a completely separate embedding model to fetch Wikipedia articles, reads them, writes another text query for the stadium, and finally decides it has enough info to answer.
This standard setup has two major bottlenecks:
- The Translation Bottleneck: Forcing a high-dimensional neural network to squeeze its nuanced information needs into discrete words at every step wastes compute and adds massive latency—generating tokens one by one is slow.
- Architectural Separation: Keeping the retriever and generator as separate models prevents the system from sharing its deep representational capacity.
Methods
LAnR collapses the retriever, query-writer, and generator into a single LLM backbone (specifically Qwen2.5-3B and 7B) using three clever mechanisms:
- Latent Query Construction (
[PRED]token): Instead of generating words to search, LAnR appends a special[PRED]token to the current context. During a single forward pass, this token attends to everything the model has seen so far, and its final-layer hidden state vector becomes the dense search query. Documents in the database are pre-encoded by the exact same LLM (using last-token pooling), putting queries and documents in one unified mathematical space. - MLP Retrieval Control Head: How does the model know when to stop searching without writing "I think I have enough info"? A lightweight Multi-Layer Perceptron (MLP) sits right on top of that
[PRED]hidden state and outputs a probability between 0 and 1. Above 0.5 means "keep digging"; below 0.5 means "stop and generate the final answer." - Multi-Turn Joint Training: The whole system is trained end-to-end with three objectives: standard next-token prediction for answering (masking out retrieved text so the model doesn't memorize Wikipedia), binary cross-entropy for the MLP controller, and an adaptive contrastive loss. Crucially, in multi-hop searches, once a gold-standard document is found in Turn 1, it is removed from the target set in Turn 2, steering the next
[PRED]vector strictly toward missing evidence. Labels for the stop-controller are generated automatically by checking if all gold documents have been found yet—no human annotations or LLM judges required.
Datasets
No new datasets are introduced, though the setup tests strong zero-shot generalization:
- External Knowledge Corpus: The 2018 Wikipedia dump.
- Training: Models are trained only on a combination of Natural Questions (NQ) and HotpotQA.
- Evaluation: Five open-domain QA benchmarks—two single-hop (NQ, TriviaQA) and three multi-hop compositional datasets (HotpotQA, 2WikiMultihopQA, and MuSiQue). Because the model never sees TriviaQA, 2Wiki, or MuSiQue during training, those evaluate out-of-distribution generalization.
Key Insights and Ideas
- Latent vectors capture "residual curiosity" better than words: When you have half the puzzle, formulating a text query for the missing half is surprisingly hard. LAnR’s hidden-state queries consistently find relevant documents in fewer hops than text-based iterative searchers, widening its lead on harder multi-hop tasks.
- One model really can wear both hats: Usually, turning a generative causal LLM into a dense retriever hurts either its search recall or its text generation. By masking retrieved tokens during training, LAnR matches or beats dedicated text-embedding heavyweights (like BGE and E5) while staying sharp at answering questions.
- You don't need verbalized Chain-of-Thought to know what you don't know: Uncertainty is already baked into the LLM's hidden representations. A tiny MLP head is enough to adaptively trigger 1 search call for simple trivia and 2–3+ calls for tangled multi-hop chains.
Key Results
Comparison of inference time, generated output tokens, and Exact Match accuracy across five benchmarks.
- Higher Accuracy: Across all five benchmarks (using Qwen2.5-3B-Instruct), LAnR achieves the highest average Exact Match (EM) score of 0.419, beating strong iterative RL/agentic baselines like AutoRefine (0.397) and Search-R1 (0.345). Gains are most pronounced on unseen multi-hop tests like 2Wiki (0.408 vs. 0.380) and MuSiQue (0.193 vs. 0.169).
- Massive Speedup & Token Savings: Because LAnR doesn't "think out loud" during search, it generates only ~5 output tokens per query—roughly 30× fewer than Search-R1 (~163) or AutoRefine (~168). This slashes end-to-end query latency to 0.81–1.61 seconds, delivering a 1.5× to 2.7× wall-clock speedup.
- Superior Retrieval Recall: Under a matched 10-document budget, adaptive LAnR hits 0.905 recall on HotpotQA and 0.828 on 2Wiki, outperforming specialized dense retrievers BGE (0.880 / 0.715) and E5 (0.875 / 0.717).
Limitations and Future Work
While the main text does not feature a dedicated "Limitations" section, the authors note an important empirical bottleneck in their multi-hop analysis: on highly compositional 3-to-4-hop questions (MuSiQue), the control head's "productive hop rate" (how often an extra search actually nabs a new gold document) drops to 23% (compared to 75% on 2Wiki), as missing any single link in a long reasoning chain makes bridging the remaining gap very difficult. Additionally, because document representations come from the fine-tuned LLM itself, deploying LAnR requires encoding the retrieval corpus with that unified model rather than plugging into an off-the-shelf index.
Summary updated