arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.04782cs.CL
收藏

通过利用不确定性感知的上下文学习提升大语言模型的可靠性

Improving the Reliability of Large Language Models by Leveraging Uncertainty-Aware In-Context Learning

University of Science and Technology of China(中国科学技术大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);Shanghai Jiao Tong University(上海交通大学)

Yuchen Yang, Houqiang Li, Yanfeng Wang, Yu Wang

AI总结:

针对大语言模型的幻觉与可靠性问题,提出不确定性感知上下文学习框架,以校准数据集微调模型,通过过滤高不确定性回答优化输出,实验验证了其有效性及模型对不确定性的自主识别能力。

摘要:

近年来,大语言模型(LLMs)凭借其出色的文本生成能力受到广泛关注,但这类模型常面临“幻觉”问题,削弱了其可靠性。本研究提出一种不确定性感知的上下文学习框架,使模型能够根据不确定性优化输出或拒绝输出。人工设计的不确定性估计方法通常假设“模型回答正确时的不确定性低于回答错误时”,但很难设定精确阈值来区分回答的正确性。因此,我们引入不确定性信息作为隐式影响模型行为的中介变量。这一创新的不确定性感知上下文学习框架包括使用校准数据集对LLM进行微调,目标是通过过滤掉高不确定性的回答,同时兼顾模型的知识局限性,来优化模型输出。我们通过考察同一问题的多个回答中是否存在正确答案,来评估模型的知识储备:当模型缺乏相关知识时,回答应表明无法解答该问题;反之,当模型具备相关知识时,回答应给出正确答案。大量实验证实了该框架的有效性,并得出两项关键结论:第一,LLM的logit输出值能在一定程度上反映内在不确定性;第二,我们的模型可自主识别不确定性,从而优化输出结果。

英文摘要:

In recent years, large-scale language models (LLMs) have gained attention for their impressive text generation capabilities. However, these models often face the challenge of "hallucination," which undermines their reliability. In this study, we introduce an uncertainty-aware in-context learning framework to empower the model to enhance or reject its output in response to uncertainty. Human-defined methods for estimating uncertainty typically assume that "uncertainty is lower when the model's response is correct compared to when it is incorrect." However, setting a precise threshold to distinguish correctness is challenging. Therefore, we introduce uncertainty information as an intermediary variable that implicitly influences the model's behavior. Our innovative uncertainty-aware in-context learning framework involves fine-tuning the LLM using a calibration dataset. Our aim is to improve the model's responses by filtering out answers with high uncertainty while considering the model's knowledge limitations. We evaluate the model's knowledge by examining multiple responses to the same question for the presence of a correct answer. When the model lacks relevant knowledge, the response should indicate that the question cannot be answered. Conversely, when the model has relevant knowledge, the response should provide the correct answer. Extensive experiments confirm the effectiveness of our framework, leading to two key findings. First, the logit output values of the LLM partly reflect inherent uncertainty. Second, our model autonomously recognizes uncertainty, resulting in improved responses.

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

↑