[论文解读] Fine-tuning Language Models for Factuality
本文介绍一种无参考与有参考的事实性微调方法,使用直接偏好优化来微调大语言模型,使长篇文本在事实性方面更加准确,无需人工标签,在传记与医学问答任务中优于基于RLHF和解码的方法。
The fluency and creativity of large pre-trained language models (LLMs) have led to their widespread use, sometimes even as a replacement for traditional search engines. Yet language models are prone to making convincing but factually inaccurate claims, often referred to as 'hallucinations.' These errors can inadvertently spread misinformation or harmfully perpetuate misconceptions. Further, manual fact-checking of model responses is a time-consuming process, making human factuality labels expensive to acquire. In this work, we fine-tune language models to be more factual, without human labeling and targeting more open-ended generation settings than past work. We leverage two key recent innovations in NLP to do so. First, several recent works have proposed methods for judging the factuality of open-ended text by measuring consistency with an external knowledge base or simply a large model's confidence scores. Second, the direct preference optimization algorithm enables straightforward fine-tuning of language models on objectives other than supervised imitation, using a preference ranking over possible model responses. We show that learning from automatically generated factuality preference rankings, generated either through existing retrieval systems or our novel retrieval-free approach, significantly improves the factuality (percent of generated claims that are correct) of Llama-2 on held-out topics compared with RLHF or decoding strategies targeted at factuality. At 7B scale, compared to Llama-2-chat, we observe 58% and 40% reduction in factual error rate when generating biographies and answering medical questions, respectively.
研究动机与目标
- 激励并解决大语言模型中的事实性错误(“幻觉”)挑战。
- 提出一个基于事实的微调流水线,使用自动生成的偏好数据且无需人工标注。
- 比较基于参考与无参考的真实性估计器以指导学习。
- 证明以事实性为重点的微调能够超过RLHF并与解码阶段的真实性干预互为补充。
- 在传记生成和医学问答任务上进行评估,以展示普遍性和鲁棒性。
提出的方法
- 使用Direct Preference Optimization (DPO) 从偏好对中微调语言模型,无需显式奖励建模或在线采样。
- 通过对无标签提示使用真实性估计器(基于参考或无参考)对候选回答进行评分,并将更真实的回答选为偏好选项。
- 对于基于参考的真实性,提取原子性断言并使用对维基百科进行微调的事实检查模型(FactScore)核对支持性。
- 对于无参考的真实性,将每个原子性断言转化为最少歧义的问题,并通过重新采样回答来估计模型置信度以衡量不确定性。
- 使用DPO在得到的偏好数据上训练,使模型输出更真实。
- 研究与基于RLHF的聊天模型的兼容性,以及与解码阶段真实性干预(如DOLA)的潜在协同。
实验结果
研究问题
- RQ1是否可以通过学习自动生成的偏好排序在不需要人工标签的情况下改善长篇生成的真实性?
- RQ2基于参考和无参考的真实性估计器在引导真实性微调方面有何差异?
- RQ3以真实性为焦点的微调是对RLHF和解码阶段干预的互补还是冲突?
- RQ4该方法在多个领域有效吗,例如传记与医学问答,以及用于聊天模型?
- RQ5在真实性微调后,模型输出会出现哪些质的变化(如风格、结构)?
主要发现
- 使用FactTune-FS(基于参考的偏好)的真实性微调在传记和医学问答任务中,始终优于RLHF和解码基线,在真实性方面提升准确性。
- FactTune-FS 减少事实错误,增加正确事实,在两项任务上实现比基线更高的 %Correct。
- FactTune-MC(无参考、模型置信偏好)同样减少错误率、改善真实性,提供一个强大、可扩展的替代方案,无需外部参考。
- 真实性微调可以与解码阶段干预(如DOLA)互补,真实性提升结果时好时坏但通常积极。
- 在与真实性目标结合时,微调可提升RLHF聊天模型(Llama-2-7b-Chat)的真实性。
- 人类和GPT-4评估与FactScore提升相关,表明减少奖励过拟合并带来真实的事实改进。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。