CSS: Contrastive Semantic Similarities for Uncertainty Quantification of LLMs

Published: 26 Apr 2024, Last Modified: 15 Jul 2024UAI 2024 posterEveryoneRevisionsBibTeXCC BY 4.0
Keywords: uncertainty quantification, LLMs, CLIP, semantic similarity, spectral cluster
TL;DR: Propose the contrastive semantic similarity to estimate uncertainty of LLMs.
Abstract: Despite the impressive capability of large language models (LLMs), knowing when to trust their generations remains an open challenge. The recent literature on uncertainty quantification of natural language generation (NLG) utilizes a conventional natural language inference (NLI) classifier to measure the semantic dispersion of LLMs responses. These studies employ logits of NLI classifier for semantic clustering to estimate uncertainty. However, logits represent the probability of the predicted class and barely contain feature information for potential clustering. Alternatively, CLIP (Contrastive Language–Image Pre-training) performs impressively in extracting image-text pair features and measuring their similarity. To extend its usability, we propose Contrastive Semantic Similarity, the CLIP-based feature extraction module to obtain similarity features for measuring uncertainty for text pairs. We apply this method to selective NLG, which detects and rejects unreliable generations for better trustworthiness of LLMs. We conduct extensive experiments with three LLMs on several benchmark question-answering datasets with comprehensive evaluation metrics. Results show that our proposed method performs better in estimating reliable responses of LLMs than comparable baselines.
List Of Authors: Ao, Shuang and Rueger, Stefan and Siddharthan, Advaith
Latex Source Code: zip
Signed License Agreement: pdf
Code Url: https://github.com/AoShuang92/css_uq_llms
Submission Number: 544
Loading