Retrieval-Augmented Generation (RAG) has become a cornerstone of modern Large Language Model (LLM) applications, aiming to ground model outputs in external, verifiable context. Despite its success, RAG systems frequently suffer from "unfaithfulness"—instances where the model hallucinates information not present in the retrieved documents or ignores the context in favor of its own internal, potentially outdated training data.
To address these challenges, researchers at UCLA have developed a novel framework consisting of SYNCHECK, a real-time faithfulness monitor, and Faithfulness-Oriented Decoding (FOD), an intelligent steering mechanism.
The SYNCHECK & FOD Framework
The core innovation lies in the ability to monitor and correct faithfulness errors synchronously during the generation process, rather than relying on slow post-hoc revisions.
SYNCHECK: Real-Time Monitoring
SYNCHECK acts as a lightweight aggregator that evaluates four distinct signals during decoding:
- Sequence Likelihood: The standard probability assigned to generated tokens.
- Uncertainty Quantification: Measures of token-level entropy and Local Intrinsic Dimension (LID) to gauge model confidence.
- Context Influence: A metric calculating the KL-divergence between output distributions with and without the provided context. A low divergence suggests the model is ignoring its sources.
- Semantic Alignment: A rapid entailment check using tools like AlignScore to ensure logical consistency with the context.
Faithfulness-Oriented Decoding (FOD)
When SYNCHECK identifies a drop in faithfulness below a predefined threshold, the FOD algorithm intervenes through a two-stage process:
- Backtracking: The model identifies the unfaithful sentence and deletes it.
- Guided Beam Search: Instead of simple re-generation, the system initiates a beam search where SYNCHECK's faithfulness scores are used to prune unfaithful paths and prioritize grounded ones.
Experimental Evaluation
The framework was tested across diverse long-form generation tasks, including Question Answering (QA), Summarization, and Data-to-Text from the RAGTruth benchmark, as well as biography generation using FactScore (FS). Additionally, the authors introduced F-100 and F-100-anti—the latter being an adversarial dataset designed to test the model's resistance to internal bias when presented with conflicting context.
Key Results
The proposed system demonstrated significant improvements in both detection and generation quality:
- Detection Accuracy: SYNCHECK achieved an AUROC of 0.85, significantly outperforming existing critique-token methods like Self-RAG.
- Generation Performance: The FOD algorithm improved faithfulness by 12% over standard greedy search and 19% over Context-Aware Decoding (CAD).
Insights and Future Directions
A key finding of this research is that a model's "internal dynamics"—its own decoding signals—are highly predictive of its faithfulness. Furthermore, the SYNCHECK monitor exhibits strong generalizability; a monitor trained on one task (e.g., biographies) performs effectively on others (e.g., QA), suggesting a universal "signature" for unfaithful generation.
While the framework introduces a slight "latency tax" due to backtracking and beam search, it remains significantly more efficient than using heavy "judge" LLMs like GPT-4 for post-hoc verification. Future work aims to refine the system's granularity from the sentence level down to sub-sentence monitoring and to further explore the distinction between document faithfulness and objective truth.
Summary updated