Maximally-Informative Retrieval for State Space Model Generation
Not on the map. Why?
Abstract (arXiv)
Given a query and dataset, the optimal way of answering the query is to make use all the information available. Modern LLMs exhibit impressive ability to memorize training data, but data not deemed important during training is forgotten, and information outside that training set cannot be made use of. Processing an entire dataset at inference time is infeasible due to the bounded nature of model resources (e.g. context size in transformers or states in state space models), meaning we must resort to external memory. This constraint naturally leads to the following problem: How can we decide based on the present query and model, what among a virtually unbounded set of known data matters for inference? To minimize model uncertainty for a particular query at test-time, we introduce Retrieval In-Context Optimization (RICO), a retrieval method that uses gradients from the LLM itself to learn the optimal mixture of documents for answer generation. Unlike traditional retrieval-augmented generation (RAG), which relies on external heuristics for document retrieval, our approach leverages direct feedback from the model. Theoretically, we show that standard top-k retrieval with model gradients can approximate our optimization procedure, and provide connections to the leave-one-out loss. We demonstrate empirically that by minimizing an unsupervised loss objective in the form of question perplexity, we can achieve comparable retriever metric performance to BM25 with no finetuning. Furthermore, when evaluated on quality of the final prediction, our method often outperforms fine-tuned dense retrievers such as E5.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 39 of its 47 references that are in the map. First posted on arXiv 13 Jun 2025.
Builds on
39 of 47 references.
References · 39
- 2017Attention Is All You Needcited by 60,361
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,182
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
- 2023Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflectioncited by 1,839
- 2016MS MARCO: A Human Generated MAchine Reading COmprehension Datasetcited by 1,605
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
- 2020Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Stepscited by 1,282
- 2022Text Embeddings by Weakly-Supervised Contrastive Pre-trainingcited by 1,253
- 2024M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillationcited by 1,073
- 2022Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questionscited by 923
27 more
- 2021MuSiQue: Multihop Questions via Single-hop Question Compositioncited by 916
- 2023REPLUG: Retrieval-Augmented Black-Box Language Modelscited by 792
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
- 2022MTEB: Massive Text Embedding Benchmarkcited by 640
- 2022Precise Zero-Shot Dense Retrieval without Relevance Labelscited by 517
- 2023Active Retrieval Augmented Generationcited by 516
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 514
- 2024NV-Embed: Improved Techniques for Training LLMs as Generalist Embedding Modelscited by 472
- 2024A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Modelscited by 452
- 2024LLM2Vec: Large Language Models Are Secretly Powerful Text Encoderscited by 404
- 2023Improving Text Embeddings with Large Language Modelscited by 303
- 2023RECOMP: Improving Retrieval-Augmented LMs with Compression and Selective Augmentationcited by 256
- 2024Generative Representational Instruction Tuningcited by 233
- 2019Task2Vec: Task Embedding for Meta-Learningcited by 205
- 2022SGPT: GPT Sentence Embeddings for Semantic Searchcited by 204
- 2023Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMscited by 178
- 2024Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAGcited by 123
- 2024Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approachcited by 119
- 2023Improving Language Models via Plug-and-Play Retrieval Feedbackcited by 87
- 2024Making Text Embedders Few-Shot Learnerscited by 79
- 2023Self-Knowledge Guided Retrieval Augmentation for Large Language Modelscited by 69
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Modelscited by 67
- 2024RAGChecker: A Fine-grained Framework for Diagnosing Retrieval-Augmented Generationcited by 61
- 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
- 2020Backpropagated Gradient Representations for Anomaly Detectioncited by 54
- 2020Gradients as Features for Deep Representation Learningcited by 30
- 2024B'MOJO: Hybrid State Space Realizations of Foundation Models with Eidetic and Fading Memorycited by 26
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026In-Context Optimization for Retrieval-Augmented Generation: A Gradient-Descent Perspective
- 2025Retrieval-Augmented Generation as Noisy In-Context Learning: A Unified Theory and Risk Bounds
- 2024Enhancing Long Context Performance in LLMs Through Inner Loop Query Mechanism
- 2024Inference Scaling for Long-Context Retrieval Augmented Generation
- 2024Better RAG using Relevant Information Gain
- 2025Dynamic Context Selection for Retrieval-Augmented Generation: Mitigating Distractors and Positional Bias
- 2025Direct Retrieval-augmented Optimization: Synergizing Knowledge Selection and Language Models
- 2024CARROT: A Learned Cost-Constrained Retrieval Optimization System for RAG