Addressing Uncertainty in LLMs to Enhance Reliability in Generative AI

Abstract

In this paper, we present a dynamic semantic clustering approach inspired by the Chinese Restaurant Process, aimed at addressing uncertainty in the inference of Large Language Models (LLMs). We quantify uncertainty of an LLM on a given query by calculating entropy of the generated semantic clusters. Further, we propose leveraging the (negative) likelihood of these clusters as the (non)conformity score within Conformal Prediction framework, allowing the model to predict a set of responses instead of a single output, thereby accounting for uncertainty in its predictions. We demonstrate the effectiveness of our uncertainty quantification (UQ) technique on two well-known question-answering benchmarks, COQA and TriviaQA, utilizing two LLMs—Llama-2-13b and Mistral-7b. Our approach achieves state-of-the-art (SOTA) performance in UQ, as assessed by metrics such as AUROC, AUARC, and AURAC. The proposed conformal predictor is also shown to produce smaller prediction sets while maintaining the same probabilistic guarantee of including the correct response, in comparison to existing SOTA conformal prediction baseline. Our code is publicly accessible at https://shorturl.at/7yHSq.

Cite

Text

Kaur et al. "Addressing Uncertainty in LLMs to Enhance Reliability in Generative AI." NeurIPS 2024 Workshops: SafeGenAi, 2024.

Markdown

[Kaur et al. "Addressing Uncertainty in LLMs to Enhance Reliability in Generative AI." NeurIPS 2024 Workshops: SafeGenAi, 2024.](https://mlanthology.org/neuripsw/2024/kaur2024neuripsw-addressing/)

BibTeX

@inproceedings{kaur2024neuripsw-addressing,
  title     = {{Addressing Uncertainty in LLMs to Enhance Reliability in Generative AI}},
  author    = {Kaur, Ramneet and Samplawski, Colin and Cobb, Adam D. and Roy, Anirban and Matejek, Brian and Acharya, Manoj and Elenius, Daniel and Berenbeim, Alexander Michael and Pavlik, John A. and Bastian, Nathaniel D. and Jha, Susmit},
  booktitle = {NeurIPS 2024 Workshops: SafeGenAi},
  year      = {2024},
  url       = {https://mlanthology.org/neuripsw/2024/kaur2024neuripsw-addressing/}
}