Table of Contents
Fetching ...

Stable-RAG: Mitigating Retrieval-Permutation-Induced Hallucinations in Retrieval-Augmented Generation

Qianchi Zhang, Hainan Zhang, Liang Pang, Hongwei Zheng, Zhiming Zheng

TL;DR

This work identifies a critical vulnerability in retrieval-augmented generation: outputs can vary markedly with the order of retrieved documents, even when content is identical. It introduces Stable-RAG, which estimates permutation sensitivity via layer-wise hidden-state clustering, decodes representative states from dominant reasoning clusters, and aligns outputs across permutations using Direct Preference Optimization to reduce hallucinations. The method demonstrates consistent improvements in accuracy, reasoning stability, and cross-domain generalization across three QA datasets and multiple retrievers, while preserving efficiency through cluster-centered decoding. By linking internal reasoning trajectories to robust external outputs, Stable-RAG offers a practical, model-agnostic approach to mitigating permutation-induced hallucinations in RAG systems with real-world impact for search, QA, and AI-assisted reasoning tasks.

Abstract

Retrieval-Augmented Generation (RAG) has become a key paradigm for reducing factual hallucinations in large language models (LLMs), yet little is known about how the order of retrieved documents affects model behavior. We empirically show that under Top-5 retrieval with the gold document included, LLM answers vary substantially across permutations of the retrieved set, even when the gold document is fixed in the first position. This reveals a previously underexplored sensitivity to retrieval permutations. Although robust RAG methods primarily focus on enhancing LLM robustness to low-quality retrieval and mitigating positional bias to distribute attention fairly over long contexts, neither approach directly addresses permutation sensitivity. In this paper, we propose Stable-RAG, which exploits permutation sensitivity estimation to mitigate permutation-induced hallucinations. Stable-RAG runs the generator under multiple retrieval orders, clusters hidden states, and decodes from a cluster-center representation that captures the dominant reasoning pattern. It then uses these reasoning results to align hallucinated outputs toward the correct answer, encouraging the model to produce consistent and accurate predictions across document permutations. Experiments on three QA datasets show that Stable-RAG significantly improves answer accuracy, reasoning consistency and robust generalization across datasets, retrievers, and input lengths compared with baselines.

Stable-RAG: Mitigating Retrieval-Permutation-Induced Hallucinations in Retrieval-Augmented Generation

TL;DR

This work identifies a critical vulnerability in retrieval-augmented generation: outputs can vary markedly with the order of retrieved documents, even when content is identical. It introduces Stable-RAG, which estimates permutation sensitivity via layer-wise hidden-state clustering, decodes representative states from dominant reasoning clusters, and aligns outputs across permutations using Direct Preference Optimization to reduce hallucinations. The method demonstrates consistent improvements in accuracy, reasoning stability, and cross-domain generalization across three QA datasets and multiple retrievers, while preserving efficiency through cluster-centered decoding. By linking internal reasoning trajectories to robust external outputs, Stable-RAG offers a practical, model-agnostic approach to mitigating permutation-induced hallucinations in RAG systems with real-world impact for search, QA, and AI-assisted reasoning tasks.

Abstract

Retrieval-Augmented Generation (RAG) has become a key paradigm for reducing factual hallucinations in large language models (LLMs), yet little is known about how the order of retrieved documents affects model behavior. We empirically show that under Top-5 retrieval with the gold document included, LLM answers vary substantially across permutations of the retrieved set, even when the gold document is fixed in the first position. This reveals a previously underexplored sensitivity to retrieval permutations. Although robust RAG methods primarily focus on enhancing LLM robustness to low-quality retrieval and mitigating positional bias to distribute attention fairly over long contexts, neither approach directly addresses permutation sensitivity. In this paper, we propose Stable-RAG, which exploits permutation sensitivity estimation to mitigate permutation-induced hallucinations. Stable-RAG runs the generator under multiple retrieval orders, clusters hidden states, and decodes from a cluster-center representation that captures the dominant reasoning pattern. It then uses these reasoning results to align hallucinated outputs toward the correct answer, encouraging the model to produce consistent and accurate predictions across document permutations. Experiments on three QA datasets show that Stable-RAG significantly improves answer accuracy, reasoning consistency and robust generalization across datasets, retrievers, and input lengths compared with baselines.
Paper Structure (55 sections, 14 equations, 13 figures, 8 tables)

This paper contains 55 sections, 14 equations, 13 figures, 8 tables.

Figures (13)

  • Figure 1: Perturbation Success Rate (PSR) on the NQ test set across different LLaMA models. PSR is computed as the proportion of successful document-order perturbations to produce hallucination results among 1000 randomly sampled instances, with the gold document fixed in the different positions. Qwen models' results can be seen in Appendix \ref{['Qwen3']}.
  • Figure 2: Hidden-state clustering behaviors across layers for LLaMA3-8B-Instruct on the NQ train set with DPR retriever and Qwen3-8B on the HotpotQA train set with Contriever retriever, using 1,000 random sampled instances. Different colored lines indicate the number of clusters of final reasoning states produced by the LLM under all $5! (=120)$ permutations of the Top-5 retrieved documents (e.g., the green line indicates 3–5 cluster states). Other scales are reported in Appendix \ref{['Instability']}.
  • Figure 3: The layer-wise visualization of case study from the NQ train set on LLaMA-3-8B-Instruct. Each point corresponds to a document order, and its color represents the model’s final answer.
  • Figure 4: Overall framework of our Stable-RAG.
  • Figure 5: (Left)Cross-Dataset Generalization. We evaluate on three test sets with the Contriever retriever using SubEM. (Middle)Cross-Retriever Transferability. (Right)Cross-Top-K Robustness. We evaluate on the NQ test set with the Contriever retriever. All experiments are conducted on LLaMA3-8B-Instruct.
  • ...and 8 more figures