Improving Uncertainty Estimation through Semantically Diverse Language Generation

Lukas Aichberger, Kajetan Schweighofer, Mykyta Ielanskyi, Sepp Hochreiter
6/6/2024
cs.LGcs.AI

No official code found. Best implementation: ml-jku/SDLG (28 stars, last commit 2024-06-07).

Abstract

Large language models (LLMs) can suffer from hallucinations when generating text. These hallucinations impede various applications in society and industry by making LLMs untrustworthy. Current LLMs generate text in an autoregressive fashion by predicting and appending text tokens. When an LLM is uncertain about the semantic meaning of the next tokens to generate, it is likely to start hallucinating. Thus, it has been suggested that predictive uncertainty is one of the main causes of hallucinations. We introduce Semantically Diverse Language Generation (SDLG) to quantify predictive uncertainty in LLMs. SDLG steers the LLM to generate semantically diverse yet likely alternatives for an initially generated text. This approach provides a precise measure of aleatoric semantic uncertainty, detecting whether the initial text is likely to be hallucinated. Experiments on question-answering tasks demonstrate that SDLG consistently outperforms existing methods while being the most computationally efficient, setting a new standard for uncertainty estimation in LLMs.

View on arXivView PDF

Code Implementations(1)

ml-jku/SDLGCommunity100%

SDLG is an efficient method to accurately estimate aleatoric semantic uncertainty in LLMs

282Python, Jupyter NotebookJun 6, 20242 years ago

Similar Papers

Cite this paper

@article{aichberger2024improving,
  title  = {Improving Uncertainty Estimation through Semantically Diverse Language Generation},
  author = {Lukas Aichberger and Kajetan Schweighofer and Mykyta Ielanskyi and Sepp Hochreiter},
  year   = {2024},
  eprint = {2406.04306},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.04306v2},
  journal = {ICLR 2024 2024}
}

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

Discussion