arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.09138cs.CLcs.AIcs.CY
收藏

用于保证大型语言模型可靠性的语义一致性

Semantic Consistency for Assuring Reliability of Large Language Models

Delhi Technological University(德里理工大学);Pennsylvania State University(宾夕法尼亚州立大学);AI Risk and Vulnerability Alliance(AI风险与漏洞联盟)

Harsh Raj, Vipul Gupta, Domenic Rosati, Subhabrata Majumdar

AI总结:

本文提出一种通用的语义一致性度量方法及名为Ask-to-Choose的新型提示策略,有效提升了大型语言模型在开放式文本生成中的输出一致性与可靠性。

摘要:

大型语言模型(LLMs)在各种自然语言任务中展现出惊人的流畅性和能力。然而,最近的研究强调了它们对输入提示变化的敏感性。为了以安全可靠的方式部署LLMs,当使用具有相同含义或意图的表达进行提示时,其输出保持一致至关重要。虽然一些现有工作探讨了最先进的LLMs如何解决这一问题,但它们的评估仅限于评估单个或多个词答案的词汇相等性,忽略了生成文本序列的一致性。为了更全面地理解LLMs在开放式文本生成场景中的一致性,我们引入了一种通用的语义一致性度量方法,并制定了该指标的多个版本以评估各种LLMs的性能。我们的方法表现出比基于词汇一致性的传统指标更高的一致性,并且与人类对输出一致性的评估具有更强的相关性。最后,我们提出了一种名为Ask-to-Choose (A2C)的新型提示策略,以增强语义一致性。在基于TruthfulQA基准的答案变体进行闭卷问答评估时,A2C将预训练和微调LLMs的准确率指标提高了多达47%,并将指令微调模型的语义一致性指标提高了多达7倍。

英文摘要:

Large Language Models (LLMs) exhibit remarkable fluency and competence across various natural language tasks. However, recent research has highlighted their sensitivity to variations in input prompts. To deploy LLMs in a safe and reliable manner, it is crucial for their outputs to be consistent when prompted with expressions that carry the same meaning or intent. While some existing work has explored how state-of-the-art LLMs address this issue, their evaluations have been confined to assessing lexical equality of single- or multi-word answers, overlooking the consistency of generative text sequences. For a more comprehensive understanding of the consistency of LLMs in open-ended text generation scenarios, we introduce a general measure of semantic consistency, and formulate multiple versions of this metric to evaluate the performance of various LLMs. Our proposal demonstrates significantly higher consistency and stronger correlation with human evaluations of output consistency than traditional metrics based on lexical consistency. Finally, we propose a novel prompting strategy, called Ask-to-Choose (A2C), to enhance semantic consistency. When evaluated for closed-book question answering based on answer variations from the TruthfulQA benchmark, A2C increases accuracy metrics for pretrained and finetuned LLMs by up to 47%, and semantic consistency metrics for instruction-tuned models by up to 7-fold.

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

↑