Parallel Key-Value Cache Fusion for Position Invariant RAG
Philhoon Oh, Jinwoo Shin, James Thorne
TL;DR
This work tackles the Lost in the Middle problem in retrieval-augmented generation by introducing KV-Fusion, a two-decoder framework that preloads shared key-value caches from retrieved passages and trains a decoder to generate answers conditioned on these caches. By injecting uniform positional information and grounding generation in reshaped KV caches, KV-Fusion achieves position-invariant outputs and strong robustness to irrelevant passages across Natural Questions, TriviaQA, and POPQA. The approach reduces reliance on reranking and demonstrates near-perfect token-level consistency under context-order perturbations, marking a notable advance for decoder-only RAG systems. Practically, KV-Fusion enables reliable, order-agnostic QA in open domains with large context sets and enhances robustness against context noise in retrieval pipelines.
Abstract
Recent advancements in Large Language Models (LLMs) underscore the necessity of Retrieval Augmented Generation (RAG) to leverage external information. However, LLMs are sensitive to the position of relevant information within contexts and tend to generate incorrect responses when such information is placed in the middle, known as `Lost in the Middle' phenomenon. In this paper, we introduce a framework that generates consistent outputs for decoder-only models, irrespective of the input context order. Experimental results for three open domain question answering tasks demonstrate position invariance, where the model is not sensitive to input context order, and superior robustness to irrelevent passages compared to prevailing approaches for RAG pipelines.
