PoLLMgraph: Unraveling Hallucinations in Large Language Models via State Transition Dynamics

Derui Zhu, Dingfan Chen, Qing Li, Zongxiong Chen, Lei Ma +2 more
4/6/2024
cs.CLcs.CRcs.SE

No official code found. Best implementation: hitum-dev/PoLLMGraph-NAACL (6 stars, last commit 2024-10-21).

Abstract

Despite tremendous advancements in large language models (LLMs) over recent years, a notably urgent challenge for their practical deployment is the phenomenon of hallucination, where the model fabricates facts and produces non-factual statements. In response, we propose PoLLMgraph, a Polygraph for LLMs, as an effective model-based white-box detection and forecasting approach. PoLLMgraph distinctly differs from the large body of existing research that concentrates on addressing such challenges through black-box evaluations. In particular, we demonstrate that hallucination can be effectively detected by analyzing the LLM's internal state transition dynamics during generation via tractable probabilistic models. Experimental results on various open-source LLMs confirm the efficacy of PoLLMgraph, outperforming state-of-the-art methods by a considerable margin, evidenced by over 20% improvement in AUC-ROC on common benchmarking datasets like TruthfulQA. Our work paves a new way for model-based white-box analysis of LLMs, motivating the research community to further explore, understand, and refine the intricate dynamics of LLM behaviors.

View on arXivView PDF

Code Implementations(1)

62C++, CSSJan 30, 20242 years ago

Similar Papers

Cite this paper

@article{zhu2024pollmgraph,
  title  = {PoLLMgraph: Unraveling Hallucinations in Large Language Models via State Transition Dynamics},
  author = {Derui Zhu and Dingfan Chen and Qing Li and Zongxiong Chen and Lei Ma and Jens Grossklags and Mario Fritz},
  year   = {2024},
  eprint = {2404.04722},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.04722v1}
}

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

Discussion