Improving Contextual Faithfulness of Large Language Models via Retrieval Heads-Induced Optimization

Lei Huang, Xiaocheng Feng, Weitao Ma, Yuchun Fan, Xiachong Feng +7 more
1/23/2025
cs.CL

No confident code implementation found for this paper.

Abstract

Ensuring contextual faithfulness in retrieval-augmented large language models (LLMs) is crucial for building trustworthy information-seeking systems, particularly in long-form question-answering (LFQA) scenarios. In this work, we identify a salient correlation between LFQA faithfulness and retrieval heads, a set of attention heads responsible for retrieving contextual information. Leveraging this insight, we propose RHIO, a framework designed to teach LLMs to explicitly discriminate between faithful and unfaithful generations. RHIO first augments unfaithful samples that simulate realistic model-intrinsic errors by selectively masking retrieval heads. Then, these samples are incorporated into joint training, enabling the model to distinguish unfaithful outputs from faithful ones conditioned on control tokens. Furthermore, these control tokens are leveraged to self-induce contrastive outputs, amplifying their difference through contrastive decoding. Additionally, to facilitate the evaluation of contextual faithfulness, we also introduce GroundBench, a comprehensive benchmark compiled from five existing LFQA datasets. Extensive experimental results on GroundBench demonstrate that RHIO significantly improves faithfulness, even outperforming GPT-4o.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{huang2025improving,
  title  = {Improving Contextual Faithfulness of Large Language Models via Retrieval Heads-Induced Optimization},
  author = {Lei Huang and Xiaocheng Feng and Weitao Ma and Yuchun Fan and Xiachong Feng and Yangfan Ye and Weihong Zhong and Yuxuan Gu and Baoxin Wang and Dayong Wu and Guoping Hu and Bing Qin},
  year   = {2025},
  eprint = {2501.13573},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.13573v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.13573.svg)](https://codeofpaper.com/paper/2501.13573)

Discussion