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

上下文序列似然:用于自然语言生成的增强置信度分数

Contextualized Sequence Likelihood: Enhanced Confidence Scores for Natural Language Generation

University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Carle’s Illinois College of Medicine, University of Illinois at Urbana-Champaign(卡尔伊利诺伊医学院,伊利诺伊大学厄巴纳-香槟分校)

Zhen Lin, Shubhendu Trivedi, Jimeng Sun

AI总结:

本文提出上下文序列似然(CSL),通过利用基础LLM的注意力值对不同token加权,显著提升了生成序列置信度评估的可靠性。

摘要:

大型语言模型(LLMs)的出现极大地推进了众多自然语言生成任务的最先进水平。为了可靠地应用LLMs,必须对其置信度有准确的衡量。目前,最常用的置信度分数函数是生成序列的似然,然而它将语义和句法成分混为一谈。例如,在问答(QA)任务中,正确答案的笨拙措辞可能导致较低的概率预测。此外,应根据上下文对不同token进行不同的加权。在本工作中,我们提出通过使用从基础LLM引出的注意力值对各种token分配不同权重,来增强预测序列概率。通过采用验证集,我们能够识别相关的注意力头,从而显著提高普通序列概率置信度度量的可靠性。我们将这种新分数称为上下文序列似然(CSL)。CSL易于实现、计算快速,并提供了通过任务特定提示进一步改进的巨大潜力。在多个QA数据集和多种LLMs上,以AUROC或AUARC衡量,CSL在预测生成质量方面显示出比最先进基线更高的可靠性。

英文摘要:

The advent of large language models (LLMs) has dramatically advanced the state-of-the-art in numerous natural language generation tasks. For LLMs to be applied reliably, it is essential to have an accurate measure of their confidence. Currently, the most commonly used confidence score function is the likelihood of the generated sequence, which, however, conflates semantic and syntactic components. For instance, in question-answering (QA) tasks, an awkward phrasing of the correct answer might result in a lower probability prediction. Additionally, different tokens should be weighted differently depending on the context. In this work, we propose enhancing the predicted sequence probability by assigning different weights to various tokens using attention values elicited from the base LLM. By employing a validation set, we can identify the relevant attention heads, thereby significantly improving the reliability of the vanilla sequence probability confidence measure. We refer to this new score as the Contextualized Sequence Likelihood (CSL). CSL is easy to implement, fast to compute, and offers considerable potential for further improvement with task-specific prompts. Across several QA datasets and a diverse array of LLMs, CSL has demonstrated significantly higher reliability than state-of-the-art baselines in predicting generation quality, as measured by the AUROC or AUARC.

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

↑