Mitigating LLM Hallucinations via Conformal Abstention

Yasin Abbasi Yadkori, Ilja Kuzborskij, David Stutz, András György, Adam Fisch +7 more
4/4/2024
cs.LGcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

We develop a principled procedure for determining when a large language model (LLM) should abstain from responding (e.g., by saying "I don't know") in a general domain, instead of resorting to possibly "hallucinating" a non-sensical or incorrect answer. Building on earlier approaches that use self-consistency as a more reliable measure of model confidence, we propose using the LLM itself to self-evaluate the similarity between each of its sampled responses for a given query. We then further leverage conformal prediction techniques to develop an abstention procedure that benefits from rigorous theoretical guarantees on the hallucination rate (error rate). Experimentally, our resulting conformal abstention method reliably bounds the hallucination rate on various closed-book, open-domain generative question answering datasets, while also maintaining a significantly less conservative abstention rate on a dataset with long responses (Temporal Sequences) compared to baselines using log-probability scores to quantify uncertainty, while achieveing comparable performance on a dataset with short answers (TriviaQA). To evaluate the experiments automatically, one needs to determine if two responses are equivalent given a question. Following standard practice, we use a thresholded similarity function to determine if two responses match, but also provide a method for calibrating the threshold based on conformal prediction, with theoretical guarantees on the accuracy of the match prediction, which might be of independent interest.

View on arXivView PDF

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{yadkori2024mitigating,
  title  = {Mitigating LLM Hallucinations via Conformal Abstention},
  author = {Yasin Abbasi Yadkori and Ilja Kuzborskij and David Stutz and András György and Adam Fisch and Arnaud Doucet and Iuliya Beloshapka and Wei-Hung Weng and Yao-Yuan Yang and Csaba Szepesvári and Ali Taylan Cemgil and Nenad Tomasev},
  year   = {2024},
  eprint = {2405.01563},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.01563v1}
}

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

Discussion