Table of Contents
Fetching ...

SEReDeEP: Hallucination Detection in Retrieval-Augmented Models via Semantic Entropy and Context-Parameter Fusion

Lei Wang

TL;DR

SEReDeEP advances hallucination detection in retrieval-augmented models by embedding semantic entropy probes into decoder hidden states and combining External Context Entropy (ECE) with Parametric Knowledge Entropy (PKE) in a regression framework. This semantic-level augmentation builds on ReDeEP by addressing semantic deviations not captured by token-level measures, achieving robust improvements (3–10% accuracy gains) across multiple models and RAG datasets. The method demonstrates that deeper layers (post the 9th) provide richer semantic signals, and that interventions altering external or internal information flow produce consistent shifts in hallucination scores, confirming the method’s causal relevance. Overall, SEReDeEP delivers a cost-efficient, generalizable approach to detect and mitigate RAG hallucinations with strong practical impact for deploying reliable retrieval-augmented systems.

Abstract

Retrieval-Augmented Generation (RAG) models frequently encounter hallucination phenomena when integrating external information with internal parametric knowledge. Empirical studies demonstrate that the disequilibrium between external contextual information and internal parametric knowledge constitutes a primary factor in hallucination generation. Existing hallucination detection methodologies predominantly emphasize either the external or internal mechanism in isolation, thereby overlooking their synergistic effects. The recently proposed ReDeEP framework decouples these dual mechanisms, identifying two critical contributors to hallucinations: excessive reliance on parametric knowledge encoded in feed-forward networks (FFN) and insufficient utilization of external information by attention mechanisms (particularly copy heads). ReDeEP quantitatively assesses these factors to detect hallucinations and dynamically modulates the contributions of FFNs and copy heads to attenuate their occurrence. Nevertheless, ReDeEP and numerous other hallucination detection approaches have been employed at logit-level uncertainty estimation or language-level self-consistency evaluation, inadequately address the semantic dimensions of model responses, resulting in inconsistent hallucination assessments in RAG implementations. Building upon ReDeEP's foundation, this paper introduces SEReDeEP, which enhances computational processes through semantic entropy captured via trained linear probes, thereby achieving hallucination assessments that more accurately reflect ground truth evaluations.

SEReDeEP: Hallucination Detection in Retrieval-Augmented Models via Semantic Entropy and Context-Parameter Fusion

TL;DR

SEReDeEP advances hallucination detection in retrieval-augmented models by embedding semantic entropy probes into decoder hidden states and combining External Context Entropy (ECE) with Parametric Knowledge Entropy (PKE) in a regression framework. This semantic-level augmentation builds on ReDeEP by addressing semantic deviations not captured by token-level measures, achieving robust improvements (3–10% accuracy gains) across multiple models and RAG datasets. The method demonstrates that deeper layers (post the 9th) provide richer semantic signals, and that interventions altering external or internal information flow produce consistent shifts in hallucination scores, confirming the method’s causal relevance. Overall, SEReDeEP delivers a cost-efficient, generalizable approach to detect and mitigate RAG hallucinations with strong practical impact for deploying reliable retrieval-augmented systems.

Abstract

Retrieval-Augmented Generation (RAG) models frequently encounter hallucination phenomena when integrating external information with internal parametric knowledge. Empirical studies demonstrate that the disequilibrium between external contextual information and internal parametric knowledge constitutes a primary factor in hallucination generation. Existing hallucination detection methodologies predominantly emphasize either the external or internal mechanism in isolation, thereby overlooking their synergistic effects. The recently proposed ReDeEP framework decouples these dual mechanisms, identifying two critical contributors to hallucinations: excessive reliance on parametric knowledge encoded in feed-forward networks (FFN) and insufficient utilization of external information by attention mechanisms (particularly copy heads). ReDeEP quantitatively assesses these factors to detect hallucinations and dynamically modulates the contributions of FFNs and copy heads to attenuate their occurrence. Nevertheless, ReDeEP and numerous other hallucination detection approaches have been employed at logit-level uncertainty estimation or language-level self-consistency evaluation, inadequately address the semantic dimensions of model responses, resulting in inconsistent hallucination assessments in RAG implementations. Building upon ReDeEP's foundation, this paper introduces SEReDeEP, which enhances computational processes through semantic entropy captured via trained linear probes, thereby achieving hallucination assessments that more accurately reflect ground truth evaluations.
Paper Structure (21 sections, 21 equations, 5 figures, 4 tables)

This paper contains 21 sections, 21 equations, 5 figures, 4 tables.

Figures (5)

  • Figure 1: Two examples of language models: The example on the left is a RAG model, where connecting to external knowledge retrieval increases the uncertainty of language expression, intuitively manifesting as outputs with the same semantics but containing some "redundant" vocabulary that interferes with hallucination assessment. The example on the right is a language model without RAG enabled, which produces genuine hallucinations.
  • Figure 2: Schematic diagram of residual flow in the decoder. Extracting hallucination features from different parts of the decoder constitutes three mainstream approaches for hallucination detection in current RAG models: treating the attention module as interference factor E, treating the feed-forward network module as interference factor P, and directly sampling at the model's output end. ReDeEP decouples the influences of E and P in a hybrid approach, while INSIDE combines semantic analysis with output-end sampling.
  • Figure 3: Schematic diagram of SEReDeEP's working principle, with the decoder's residual flow direction in the center, the calculation process of External Context Entropy (ECE) at the left side, and the calculation process of Parametric Knowledge Entropy (PKE) at the right side.
  • Figure 4: Correlation experimental results between SEReDeEP and hallucinations. (a) shows the correlation coefficient graph between ECE scores of attention heads at each layer and hallucination labels, (b) presents the correlation coefficient graph between PKE scores of feed-forward networks at each layer and hallucination labels.
  • Figure 5: The result of Intervention Experiments