arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.03158cs.CLcs.AI
收藏

CSS:用于大型语言模型不确定性量化的对比语义相似度

CSS: Contrastive Semantic Similarity for Uncertainty Quantification of LLMs

Knowledge Media Institute (KMi)(知识媒体研究所(KMi));The Open University(开放大学)

Shuang Ao, Stefan Rueger, Advaith Siddharthan

AI总结:

针对LLM生成不确定性量化中NLI分类器logits缺乏聚类特征信息的问题,提出基于CLIP的对比语义相似度模块提取文本对相似度特征,应用于选择性NLG以拒绝不可靠生成,实验证明其优于基线方法。

摘要:

尽管大型语言模型(LLMs)能力惊人,但了解何时信任其生成内容仍是一个开放挑战。近期关于自然语言生成(NLG)不确定性量化的文献利用传统的自然语言推理(NLI)分类器来衡量LLM响应的语义分散程度。这些研究使用NLI分类器的logits进行语义聚类以估计不确定性。然而,logits代表预测类别的概率,几乎不包含用于潜在聚类的特征信息。作为替代,CLIP(Contrastive Language-Image Pre-training)在提取图文对特征和衡量其相似度方面表现出色。为了扩展其可用性,我们提出了对比语义相似度,这是基于CLIP的特征提取模块,用于获取相似度特征以衡量文本对的不确定性。我们将此方法应用于选择性NLG,检测并拒绝不可靠的生成内容,以提升LLMs的可信度。我们在多个基准问答数据集上使用三个LLM进行了广泛实验,并采用全面的评估指标。结果表明,我们提出的方法在估计LLMs可靠响应方面优于可比基线。结果表明,我们提出的方法在估计LLMs可靠响应方面优于可比基线。代码可在 https://github.com/AoShuang92/css_uq_llms 获取。

英文摘要:

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}.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑