Reinforcement Fine-Tuning for History-Aware Dense Retriever in RAG

Yicheng Zhang, Zhen Qin, Zhaomin Wu, Wenqi Zhang, Shuiguang DengarXiv 2026

TL;DR

The paper introduces HARR (History-Aware Reinforced Retriever), a novel framework that uses reinforcement learning (RL) to fine-tune dense retrievers directly based on downstream RAG task performance. By framing retrieval as a stochastic Markov Decision Process and incorporating retrieval history to eliminate "state aliasing," HARR achieves significant performance gains across multi-hop question-answering tasks with minimal computational overhead.

What Problem Does This Paper Address?

Retrieval-Augmented Generation (RAG) systems typically consist of two components optimized in isolation: a retriever that grabs relevant documents, and an LLM that generates the final answer. This loose coupling creates an objective mismatch—the retriever is trained to maximize semantic relevance (e.g., via proxy metrics like contrastive loss), which doesn't always align with what the LLM actually needs to generate a correct answer.

While fine-tuning the LLM to adapt to the retriever is an option, it is incredibly resource-intensive as models scale. Optimizing the retriever via Reinforcement Learning (RL) based on final answer correctness is a more lightweight alternative, but it faces two major roadblocks:

  1. Deterministic Retrieval: Standard retrievers use deterministic top-$k$ selection, which prevents the stochastic exploration required by RL algorithms.
  2. State Aliasing in Multi-Hop Reasoning: In iterative or multi-hop RAG pipelines, generating a sub-query based only on the current step can lead to identical queries being generated from entirely different contexts. Without knowing the retrieval history, the system suffers from "state aliasing," leading to highly unstable reward assignments and poor learning.

Methods

The authors propose HARR to transform the retriever into an RL-optimizable agent by formulating the RAG pipeline as a Markov Decision Process (MDP).

Figure 1. Overview of HARR

Key components of the architecture include:

  • History-Aware State Space: To eliminate state aliasing, the state at step $t$ is defined as $s_t = (H_{t-1}, q_t)$, combining the accumulated retrieval history ($H_{t-1}$) with the current sub-query ($q_t$).
  • Stochastic Policy via Plackett-Luce: Instead of a hard top-$k$ cut, the retriever is modeled as a stochastic ranking policy using the Plackett-Luce model. Documents are sampled sequentially without replacement based on a softmax distribution of their similarity scores, enabling the exploration needed for RL.
  • Group Relative Policy Optimization (GRPO): HARR employs GRPO to optimize the policy using relative outcome-based advantages from a group of sampled trajectories, bypassing the need for an explicit, complex value function estimator. The reward is sparse and terminal, based on the F1 score of the final generated answer.
  • Practical Approximations for Scalability: To make training feasible on massive corpora, HARR introduces two optimizations: Candidate Pool Restriction (pre-filtering a smaller candidate pool of $K$ documents before sampling) and Document Encoder Freezing (only updating the state encoder during training).

Datasets

HARR was evaluated on two widely used question-answering benchmarks:

  • HotpotQA: A challenging multi-hop question-answering dataset that requires reasoning across multiple documents.
  • Natural Questions (NQ): A standard single-hop dataset used to evaluate general factoid question-answering performance.

Evaluation metrics followed the SQuAD standard, reporting both Exact Match (EM) and F1 scores.

Key Insights and Ideas

  • Direct Alignment Beats Proxy Targets: Traditional retriever fine-tuning methods like REPLUG try to minimize the KL-divergence between retriever scores and LLM perplexity. HARR demonstrates that directly optimizing for the end-task reward (answer correctness) yields better task performance because it directly bridges the retriever-generator objective gap.
  • History Matters for Gradient Stability: Incorporating the retrieval history provides a much cleaner learning signal. As shown in the paper's gradient analysis, the history-aware variant maintains consistently larger gradient norms, proving that mitigating state aliasing prevents reward ambiguity from washing out the policy updates.
  • Model Capacity Constraints: The benefits of history-awareness scale with the retriever's capacity. While smaller retriever models (e.g., 0.6B parameters) benefit significantly from pure RL fine-tuning, larger models (e.g., 4B parameters) are uniquely equipped to exploit the historical context provided by the history-aware state space.

Key Results

HARR was tested across two different RAG architectures (a ReAct Agent and Search-R1) using Qwen3-Embedding models (4B and 0.6B).

  • Accuracy Gains: HARR outperformed the frozen retriever baseline in 18 out of 20 metrics and beat the strong REPLUG baseline in 17 out of 20 metrics. For instance, on the ReAct pipeline with a 4B retriever, HARR improved the average EM/F1 scores from 30.73/40.55 to 31.39/41.24.
  • Training Efficiency: Because HARR keeps the LLM frozen and only updates the lightweight retriever state encoder, it is highly efficient. A single training run converges rapidly (typically within 100 steps) and takes under 3 hours on standard hardware—a massive savings compared to the 10+ hours typically required for LLM fine-tuning.

Limitations and Future Work

  • Reward Oscillations: The authors noted that the training reward trajectories exhibit visible oscillations. This instability is a known side-effect of using sparse terminal rewards combined with off-policy training approximations.
  • Memory Footprint for Large Retrievers: While the 0.6B model easily fits within consumer-grade GPU memory (<32 GB), scaling up to the 4B model demands substantial VRAM (up to 65 GB) under default configurations. Implementing more aggressive memory optimizations like gradient accumulation remains an area for practical improvement.

Summary updated

BibTeX
@misc{zhang2026reinforcement,
  author = {Yicheng Zhang and Zhen Qin and Zhaomin Wu and Wenqi Zhang and Shuiguang Deng},
  title = {{Reinforcement Fine-Tuning for History-Aware Dense Retriever in RAG}},
  year = {2026},
  eprint = {2602.03645},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.03645},
}
Figure