DecoPrompt : Decoding Prompts Reduces Hallucinations when Large Language Models Meet False Premises

Nan Xu, Xuezhe MaarXiv 2024 · DOI

Introduction

Large Language Models (LLMs) are remarkably susceptible to "false premises"—queries that embed incorrect factual assumptions (e.g., "How long has Taylor Swift been a UNICEF Goodwill Ambassador?"). Even when a model possesses the correct internal knowledge to debunk the claim, it often falls into a "sycophancy" trap, playing along with the user's error and generating a detailed, hallucinated response. This behavior undermines the reliability of LLMs in factual information retrieval tasks.

The "false premise" trap: LLMs often play along with incorrect assumptions even when they possess the correct underlying knowledge.

Methodology: The DecoPrompt Framework

Researchers have discovered that an LLM's likelihood of hallucinating is closely tied to the predictive entropy of the prompt itself. To address this, they proposed DecoPrompt, an inference-time strategy that requires no retraining or fine-tuning.

Entropy Calculation and Selection

The core of DecoPrompt is the use of Length-Normalized Predictive Entropy ($PE^{LN}$). By treating the prompt as a sequence to be "decoded," the system measures how uncertain the model is about the input tokens. High entropy indicates that the model finds the prompt's phrasing "surprising" or uncertain, which correlates strongly with factual failure.

The DecoPrompt Pipeline

  1. Paraphrasing: When a user submits a prompt, an auxiliary model generates several semantically identical paraphrases.
  2. Ranking: The target LLM calculates the entropy for the original prompt and all paraphrases.
  3. Selection: The system selects the candidate with the lowest entropy—the version the model "finds least surprising"—to generate the final response.

Experimental Insights

The researchers evaluated DecoPrompt on two datasets: a Fictitious Dataset (testing resilience against non-existent entities like "ZeroGravity Boots") and an Authorship Dataset (testing resilience against misattributed real-world facts).

A striking finding is the clear linear correlation between prompt entropy and hallucination rates. As the model's uncertainty about the input increases, its tendency to fabricate information in the output skyrockets. By selecting lower-entropy paraphrases, DecoPrompt successfully steers the model toward its internal factual knowledge.

Correlation between prompt entropy and hallucination percentage, demonstrating that lower-entropy prompts lead to more factually correct responses.

Key Results and Performance

DecoPrompt demonstrated significant reductions in hallucinations across several open-source models, including Llama-2 and Vicuna:

  • Fictitious Dataset: On Llama-2-7b-chat, hallucinations dropped from 7.3% to 0.0%. On Vicuna-13b, they were reduced from 38.1% to 10.0%.
  • Authorship Dataset: Vicuna-7b saw a reduction from 68.0% to 59.0%, while Vicuna-13b dropped from 49.0% to 41.0%.
  • Cross-Model Transferability: Interestingly, a prompt that has low entropy for a small model often works well for a larger model, suggesting that "cheap" models can be used to optimize prompts for expensive, proprietary APIs.

Conclusion

DecoPrompt shifts the focus of hallucination research from the entropy of the generated text to the entropy of the input prompt. By simply rephrasing questions to align with a model's internal expectations, we can significantly improve the factual resilience of LLMs against deceptive or erroneous user inputs.

Summary updated

BibTeX
@misc{xu2024decoprompt,
  author = {Nan Xu and Xuezhe Ma},
  title = {{DecoPrompt : Decoding Prompts Reduces Hallucinations when Large Language Models Meet False Premises}},
  year = {2024},
  eprint = {2411.07457},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.07457},
}
Figure