让大模型学会评估自己回答的可信度,减少胡说八道。
Enhancing Trust in Large Language Models via Uncertainty-Calibrated Fine-Tuning
- 用新损失函数训练模型,让它自知何时不确定。
- 在多个问答数据集上,不确定性估计更准确。
- 适合需要高可信输出的应用场景,如医疗、法律。
大语言模型在自然语言处理中表现出色,但常生成看似合理实则错误的信息,即所谓幻觉。可靠的不确定性估计对建立对其输出的信任至关重要,是检测和防止错误输出的关键工具。为实现开放域自由文本生成中的可靠且校准良好的不确定性量化,我们提出一种不确定性感知的微调方法。该方法在不损害准确性的情况下增强模型提供可靠不确定性估计的能力,从而引导其生成更可信的回答。我们引入一种基于决策理论的新型不确定性感知因果语言建模损失函数。在多个自由格式问答数据集和模型上的严格评估表明,与标准因果语言建模损失微调相比,我们的方法在自然语言生成任务中获得了更校准的不确定性估计。此外,实验结果表明,该方法显著提升了模型检测幻觉和识别领域外提示的能力。
原文摘要 · Abstract (English)
Large language models (LLMs) have revolutionized the field of natural language processing with their impressive reasoning and question-answering capabilities. However, these models are sometimes prone to generating credible-sounding but incorrect information, a phenomenon known as LLM hallucinations. Reliable uncertainty estimation in LLMs is essential for fostering trust in their generated responses and serves as a critical tool for the detection and prevention of erroneous or hallucinated outputs. To achieve reliable and well-calibrated uncertainty quantification in open-ended and free-form natural language generation, we propose an uncertainty-aware fine-tuning approach for LLMs. This approach enhances the model's ability to provide reliable uncertainty estimates without compromising accuracy, thereby guiding them to produce more trustworthy responses. We introduce a novel uncertainty-aware causal language modeling loss function, grounded in the principles of decision theory. Through rigorous evaluation on multiple free-form question-answering datasets and models, we demonstrate that our uncertainty-aware fine-tuning approach yields better calibrated uncertainty estimates in natural language generation tasks than fine-tuning with the standard causal language modeling loss. Furthermore, the experimental results show that the proposed method significantly improves the model's ability to detect hallucinations and identify out-of-domain prompts.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。