Alleviating Hallucinations in Large Language Models through Multi-Model Contrastive Decoding and Dynamic Hallucination Detection

Chenyu Zhu, Ye-Feng Liu, Hao Zhang, Ao-Wen Wang, Xue Yang +4 more
1/1/2025

No confident code implementation found for this paper.

Abstract

Despite their outstanding performance in numerous applications, large language models (LLMs) remain prone to hallucinations, generating content inconsistent with their pretraining corpora. Currently, almost all contrastive decoding approaches alleviate hallucinations by introducing a model susceptible to hallucinations and appropriately widening the contrastive logits gap between hallucinatory tokens and target tokens.

Show full abstract

However, although existing contrastive decoding methods mitigate hallucinations, they lack enough confidence in the factual accuracy of the generated content. In this work, we propose M ulti-Model C ontrastive D ecoding (MCD), which integrates a pretrained language model with an evil model and a truthful model for contrastive decoding. Intuitively, a token is assigned a high probability only when deemed potentially hallucinatory by the evil model while being considered factual by the truthful model. This decoding strategy significantly enhances the model’s confidence in its generated responses and reduces potential hallucinations. Furthermore, we introduce a dynamic hallucination detection mechanism that facilitates token-by-token identification of hallucinations during generation and a tree-based revision mechanism to diminish hallucinations further. Extensive experimental evaluations demonstrate that our MCD strategy effectively reduces hallucinations in LLMs and outperforms state-of-the-art methods across various benchmarks.

DOISemantic Scholar

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{zhu2025alleviating,
  title  = {Alleviating Hallucinations in Large Language Models through Multi-Model Contrastive Decoding and Dynamic Hallucination Detection},
  author = {Chenyu Zhu and Ye-Feng Liu and Hao Zhang and Ao-Wen Wang and Xue Yang and Guan-Hua Chen and Long-Yue Wang and Wei-Hua Luo and Kai-Fu Zhang},
  year   = {2025},
  doi    = {10.52202/085713-5513},
  url    = {https://doi.org/10.52202/085713-5513},
  journal = {Neural Information Processing Systems}
}

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

Discussion