Alleviating Hallucinations of Large Language Models through Induced Hallucinations

Yue Zhang, Leyang Cui, Wei Bi, Shuming Shi
12/25/2023
cs.CLcs.AI

No official code found. Best implementation: hiyouga/LlamaFactory (72,841 stars, Apache-2.0, last commit 2026-04-29). 1 more below.

Abstract

Despite their impressive capabilities, large language models (LLMs) have been observed to generate responses that include inaccurate or fabricated information, a phenomenon commonly known as ``hallucination''. In this work, we propose a simple \textit{Induce-then-Contrast} Decoding (ICD) strategy to alleviate hallucinations. We first construct a factually weak LLM by inducing hallucinations from the original LLMs. Then, we penalize these induced hallucinations during decoding to enhance the factuality of the generated content. Concretely, we determine the final next-token predictions by amplifying the predictions from the original model and downplaying the induced untruthful predictions via contrastive decoding. Experimental results on both discrimination-based and generation-based hallucination evaluation benchmarks, such as TruthfulQA and \textsc{FActScore}, demonstrate that our proposed ICD methods can effectively enhance the factuality of LLMs across various model sizes and families. For example, when equipped with ICD, Llama2-7B-Chat and Mistral-7B-Instruct achieve performance comparable to ChatGPT and GPT4 on TruthfulQA, respectively.

View on arXivView PDF

Code Implementations(2)

Apache-2.0

Unified Efficient Fine-Tuning of 100+ LLMs & VLMs (ACL 2024)

72,8418,898Python, MakefileMay 28, 20235 months agoApache-2.0
agentaideepseekfine-tuninggemma+15 more
HillZhang1999/ICDCommunity100%
MIT

Code & Data for our Paper "Alleviating Hallucinations of Large Language Models through Induced Hallucinations"

7010C, C++Dec 23, 20232 years agoMIT
decoding-algorithmhallucinationlarge-language-models

Similar Papers

Cite this paper

@article{zhang2023alleviating,
  title  = {Alleviating Hallucinations of Large Language Models through Induced Hallucinations},
  author = {Yue Zhang and Leyang Cui and Wei Bi and Shuming Shi},
  year   = {2023},
  eprint = {2312.15710},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.15710v2}
}

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

Discussion