Maximally-Informative Retrieval for State Space Model Generation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Becker, Evan, Bowman, Benjamin, Trager, Matthew, Liu, Tian Yu, Zancato, Luca, Xia, Wei, Soatto, Stefano
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915343166865408
author Becker, Evan
Bowman, Benjamin
Trager, Matthew
Liu, Tian Yu
Zancato, Luca
Xia, Wei
Soatto, Stefano
author_facet Becker, Evan
Bowman, Benjamin
Trager, Matthew
Liu, Tian Yu
Zancato, Luca
Xia, Wei
Soatto, Stefano
contents 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 \emph{no finetuning}. Furthermore, when evaluated on quality of the final prediction, our method often outperforms fine-tuned dense retrievers such as E5.
format Preprint
id arxiv_https___arxiv_org_abs_2506_12149
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Maximally-Informative Retrieval for State Space Model Generation
Becker, Evan
Bowman, Benjamin
Trager, Matthew
Liu, Tian Yu
Zancato, Luca
Xia, Wei
Soatto, Stefano
Computation and Language
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 \emph{no finetuning}. Furthermore, when evaluated on quality of the final prediction, our method often outperforms fine-tuned dense retrievers such as E5.
title Maximally-Informative Retrieval for State Space Model Generation
topic Computation and Language
url https://arxiv.org/abs/2506.12149