# Poster 30339

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/30339

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hello, my name is Jianrui, and I'm here to introduce inference scaling for long context retrieval augmented generation. This is the work during my internship at Google DeepMind. So I'll give a short introduction on inference scaling. So inference scaling is basically a way to improve performance in test time by increasing the computation that is allocated for inference.
So for retrieval augmented generation, there are some studies that increase the number of documents to increase test time compute in retrieval augmented generation, but we observe that RAC performance does not always increase as the retrieved context increases. So in this work, we explore two strategies for increasing the inference time compute for retrieval augmented generation.
The first one is demonstration-based rec, where we add additional in-context demonstrations for different rec examples. And the second one is iterative demonstration-based rec, in which the in-context examples not only has documents, the query, but also has the process of decomposing the query into subqueries, interleaving retrieval, and the final answer.
So we will introduce both strategies with more details here. So this is vanilla reg where we have the documents, we have the query, and then the model is asked to generate the final answer.
And for a demonstration-based REC, which is REC, we have basically prepended M in context examples. Each in context example has some documents, the query, and the final answer. And then we have all of those in context examples plus the test time documents and the test time query. And we let the model generate the final answer based on all of these examples and test to curate.
And for iterative rec, all the in-context examples, not for the essence of the in-context examples, those include both the subcuries, the interleaving documents, as well as the final answer that is generated based on the subcuries, the answer to the subcuries, and which led the model to basically learn to decompose the query into subqueries and do interleaving retrieval and then finally generate.
generate a better final answer.
So we have done extensive experiments with different budgets, and we explore different number of shots of in-context examples and different number of documents here. So what we observe is that for different budgets, the performance would, the optimal performance would basically have different, very different configurations. So for 8K, for example, we have two documents and one shot, but this is the context length of 8K. So for 16K, you see the optimal configuration.
Configuration is not necessary and follows a similar pattern. So this is the same with 32K and also one to 28K. So although this optimal configurations happens differently, we observe that the performance can increase basically linearly with increased effective context length.
So this is what we observe in different data sets. For music, we observe almost linear increase when you basically expand the effective context length by incorporating more in-context examples or decomposition. Basically, that's the iterative decomposition of the input query.
So these are our main results. We see that for different maximum effective context length, the performance basically can almost consistently increase up until 5 million context length. And this is a simple version of that. So basically, we see that iterative reg can almost outperform all other variants significantly when given enough test time compute.
So then the question is how can we compute the optimal configuration? We see that the benefits are different when we increase number of documents or the number of shots. So here we introduce a quantitative model where we use a learnable parameter to ABC to estimate the parameters. And C is basically depends on the data set and we also have sigmoid, which is a function that improves the feeling of the curve.
So we have used this model to estimate the performance with VS. The actual experiment results, we see a very good fitting results of R-squared over 0.9. And our experiment results and the estimated results are also highly similar.
So we also test the different configurations, for example, generalization to other data sets in context length and context length extrapolation. So both of our models work pretty well. So this is basically our work. We thank you for listening.
