Delta -- Contrastive Decoding Mitigates Text Hallucinations in Large Language Models

Cheng Peng Huang, Hao-Yuan Chen
2/9/2025
cs.CLcs.AI

No confident code implementation found for this paper. 7 possible matches can be shown below.

Abstract

Large language models (LLMs) demonstrate strong capabilities in natural language processing but remain prone to hallucinations, generating factually incorrect or fabricated content. This issue undermines their reliability, particularly in high-stakes domains such as healthcare and legal advisory. To address this challenge, we propose Delta, an inference-time method that reduces hallucinations without requiring model retraining or additional data. Delta works by randomly masking parts of the input prompt and contrasting the output distributions for the original and masked inputs, effectively suppressing hallucinations through inference-only computations. We evaluate Delta on context-rich question-answering benchmarks, achieving absolute improvements of approximately 3 and 6 percentage points on SQuAD v1.1 and v2, respectively, and 7 and 2 percentage points on TriviaQA and Natural Questions under-sampling decoding. Delta also improves the no-answer exact match score on SQuAD v2 by over ten percentage points, demonstrating its effectiveness in mitigating hallucinations arising from contextual ambiguity. These results highlight Delta as a computationally efficient and scalable approach for improving the reliability of LLMs in real-world applications.

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. 7 weaker matches are hidden by default — 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{huang2025delta,
  title  = {Delta -- Contrastive Decoding Mitigates Text Hallucinations in Large Language Models},
  author = {Cheng Peng Huang and Hao-Yuan Chen},
  year   = {2025},
  eprint = {2502.05825},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.05825v1}
}

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/2502.05825.svg)](https://codeofpaper.com/paper/2502.05825)

Discussion