SSFO: Self-Supervised Faithfulness Optimization for Retrieval-Augmented Generation
Xiaqiang Tang, Yi Wang, Keyu Hu, Rui Xu, Chuang Li, Weigao Sun, Jian Li, Sihong Xie
TL;DR
SSFO tackles faithfulness hallucination in retrieval-augmented generation by a self-supervised alignment framework that builds preference data from the model’s own behavior when access to retrieved context is present versus absent. Using Direct Preference Optimization, SSFO nudges the model to prefer context-grounded outputs without external annotations, revealing a benign likelihood displacement mechanism that shifts probability mass toward context-consistent tokens. A variant, SSFO-λ, further amplifies this displacement to strengthen faithfulness, achieving state-of-the-art results across multiple faithfulness metrics and models, while preserving instruction-following capabilities and generalization to cross-lingual tasks. The method is data-efficient, requiring only hundreds of self-generated examples, and incurs negligible inference overhead, making it practical for broad deployment in RAG systems.
Abstract
Retrieval-Augmented Generation (RAG) systems require Large Language Models (LLMs) to generate responses that are faithful to the retrieved context. However, faithfulness hallucination remains a critical challenge, as existing methods often require costly supervision and post-training or significant inference burdens. To overcome these limitations, we introduce Self-Supervised Faithfulness Optimization (SSFO), the first self-supervised alignment approach for enhancing RAG faithfulness. SSFO constructs preference data pairs by contrasting the model's outputs generated with and without the context. Leveraging Direct Preference Optimization (DPO), SSFO aligns model faithfulness without incurring labeling costs or additional inference burden. We theoretically and empirically demonstrate that SSFO leverages a benign form of \emph{likelihood displacement}, transferring probability mass from parametric-based tokens to context-aligned tokens. Based on this insight, we propose a modified DPO loss function to encourage likelihood displacement. Comprehensive evaluations show that SSFO significantly outperforms existing methods, achieving state-of-the-art faithfulness on multiple context-based question-answering datasets. Notably, SSFO exhibits strong generalization, improving cross-lingual faithfulness and preserving general instruction-following capabilities. We release our code and model at the anonymous link: https://github.com/chkwy/SSFO
