Table of Contents
Fetching ...

Addressing Uncertainty in LLMs to Enhance Reliability in Generative AI

Ramneet Kaur, Colin Samplawski, Adam D. Cobb, Anirban Roy, Brian Matejek, Manoj Acharya, Daniel Elenius, Alexander M. Berenbeim, John A. Pavlik, Nathaniel D. Bastian, Susmit Jha

TL;DR

A dynamic semantic clustering approach inspired by the Chinese Restaurant Process is presented, aimed at addressing uncertainty in the inference of Large Language Models (LLMs) by calculating entropy of the generated semantic clusters.

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, Llama2 and Mistral. Our approach achieves 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.

Addressing Uncertainty in LLMs to Enhance Reliability in Generative AI

TL;DR

A dynamic semantic clustering approach inspired by the Chinese Restaurant Process is presented, aimed at addressing uncertainty in the inference of Large Language Models (LLMs) by calculating entropy of the generated semantic clusters.

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, Llama2 and Mistral. Our approach achieves 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.

Paper Structure

This paper contains 16 sections, 5 equations, 6 figures, 8 tables, 2 algorithms.

Figures (6)

  • Figure 1: Comparison of Accuracy (left) and Set Size of prediction sets (right) with Conformal Prediction baseline conformal_lang_modeling.
  • Figure 2: Alg. \ref{['alg:cp_sets']}'s Accuracy (left) and Set Size (right) evaluation on COQA for Llama-13b.
  • Figure 3: Clusters generated by kuhn's approach on COQA example.
  • Figure 4: Clusters generated by our approach (Alg. \ref{['alg:clustering']}) on COQA example.
  • Figure 5: Clusters generated by kuhn's approach on TriviaQA example.
  • ...and 1 more figures