CLAIJun 5, 2024

CSS: Contrastive Semantic Similarity for Uncertainty Quantification of LLMs

arXiv:2406.03158v14 citationsHas Code
Originality Incremental advance
AI Analysis

This addresses the challenge of knowing when to trust LLM generations, which is crucial for improving trustworthiness in applications like selective natural language generation, though it appears incremental as it builds on existing CLIP technology.

The paper tackles the problem of uncertainty quantification in large language models (LLMs) by proposing Contrastive Semantic Similarity (CSS), a CLIP-based feature extraction method for measuring semantic similarity in text pairs, and shows it performs better than baselines in estimating reliable responses on benchmark question-answering datasets.

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) utilises 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. Results show that our proposed method performs better in estimating reliable responses of LLMs than comparable baselines. The code are available at \url{https://github.com/AoShuang92/css_uq_llms}.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes