Two Views, Two Strengths: Factorized Contrastive Decoding for Context-Faithful Large Language Models
Abstract
Large language models often return a memorized fact although the passage in their prompt updates or contradicts it. Contrastive decoding counters this by amplifying the difference between predictions under the full prompt and under a modified view of it. However, existing methods mainly tune the strength of this difference and share one view, the question alone, which removes the passage and also changes the directive that refers to it. Replacing one at a time, we find that the passage moves predictions many times more than the directive, which acts mainly where the passage contradicts the memorized fact. Based on these findings, we propose factorized contrastive decoding (FCD), which contrasts the full prompt with two views, one replacing only the directive and one replacing only the passage, each with its own strength. On six models and five passage benchmarks, FCD gains 7.2 points over sampling on counterfactual passages without compromising accuracy on ordinary ones, and its average over the two is the highest of all compared methods. Beyond passages, a matched view also helps when an instruction conflicts with a memorized quote. These results suggest that the directive and the passage are better contrasted separately than together. Code is available at https://github.com/js-lee-AI/FCD.
Create a lesson
Metadata
- Comments
- 21 pages, 5 figures, 26 tables, Code: https://github.com/js-lee-AI/FCD
Related papers
Distilling Model-Inherent Reasoning Circuit for Large Language Models
Shared title terminologycs.CLWenshui Luo, Jialiang Tang, Jie Yang et al.
UnCommit: Unlearning Overcommitment to Reduce Hallucinations in Large Language Models
Shared title terminologycs.CLVy Nguyen, Ziqi Xu, Jeffrey Chan et al.
Not All Evidence Is Equal: Source-Sensitive Calibration in Large Language Models
Shared title terminologycs.CLSercan Karakaş, Yusuf Şimşek
CulturaVerse: Culturally-Aware Multilingual Jailbreak Attacks on Large Language Models
Shared title terminologycs.CLSaikat Mondal, Deeksha Varshney, Mamta et al.
Human-Centered Evaluation of Large Language Models: Multi-Problem Reasoning, Writing Competence, and Visual Referential Communication
Shared title terminologycs.CLZhengxiang Wang
Millie 2: Streaming a 177-Billion-Parameter Language Model on Phones at Million-Token Context
Shared title terminologycs.CLBen Krause