Mask-DPO: Generalizable Fine-grained Factuality Alignment of LLMs
本文提出了一种名为Mask-DPO的细粒度事实一致性对齐方法,显著提高了大型语言模型(LLMs)回答问题的准确性,减少了幻觉现象。
更新于 2025-03-05。作者:Yuzhe Gu、Wenwei Zhang、Chengqi Lyu、Dahua Lin、Kai Chen。
中文摘要
大型语言模型(LLMs)在作为各个领域的AI助手时,会表现出幻觉(即不忠实或不合逻辑的信息)。由于幻觉总是伴随着LLM回答中的真实内容,因此之前的基于事实一致性对齐的方法,在执行回答层面的偏好学习时,不可避免地会在训练过程中引入噪声。因此,本文提出了一种基于直接偏好优化(DPO)的细粒度事实一致性对齐方法,称为Mask-DPO。Mask-DPO将句子级别的事实性作为掩码信号,只从偏好样本中的事实正确句子中学习,并防止对不偏好样本中的事实内容进行惩罚,从而解决了偏好学习中的歧义。大量的实验结果表明,Mask-DPO可以显著提高LLMs对来自领域内和领域外数据集问题的回答的事实性,尽管这些问题及其对应的话题在训练期间并未见过。仅训练于ANAH训练集,Llama3.1-8B-Instruct在ANAH测试集上的得分从49.19%提高到77.53%,甚至超过了Llama3.1-70B-Instruct(53.44%)的得分,而其在领域外传记数据集上的FactScore也从30.29%提高到39.39%。我们进一步研究了Mask-DPO的泛化特性,使用了不同的训练样本缩放策略,发现缩放数据集中的主题数量比问题数量更有效。我们提出了关于事实一致性对LLMs所做假设,并进行了概念验证实验来验证它。我们希望该方法和研究发现为未来关于事实一致性缩放的研究铺平道路。
英文摘要
Large language models (LLMs) exhibit hallucinations (i.e., unfaithful or nonsensical information) when serving as AI assistants in various domains. Since hallucinations always come with truthful content in the LLM responses, previous factuality alignment methods that conduct response-level preference learning inevitably introduced noises during training. Therefore, this paper proposes a fine-grained factuality alignment method based on Direct Preference Optimization (DPO), called Mask-DPO. Incorporating sentence-level factuality as mask signals, Mask-DPO only learns from factually correct sentences in the preferred samples and prevents the penalty on factual contents in the not preferred samples, which resolves the ambiguity in the preference learning. Extensive experimental results demonstrate that Mask-DPO can significantly improve the factuality of LLMs responses to questions from both in-domain and out-of-domain datasets, although these questions and their corresponding topics are unseen during training. Only trained on the ANAH train set, the score of Llama3.1-8B-Instruct on the ANAH test set is improved from 49.19% to 77.53%, even surpassing the score of Llama3.1-70B-Instruct (53.44%), while its FactScore on the out-of-domain Biography dataset is also improved from 30.29% to 39.39%. We further study the generalization property of Mask-DPO using different training sample scaling strategies and find that scaling the number of topics in the dataset is more effective than the number of questions. We provide a hypothesis of what factual alignment is doing with LLMs, on the implication of this phenomenon, and conduct proof-of-concept experiments to verify it. We hope the method and the findings pave the way for future research on scaling factuality alignment.
解读
一句话总结
本文提出了一种名为Mask-DPO的细粒度事实一致性对齐方法,显著提高了大型语言模型(LLMs)回答问题的准确性,减少了幻觉现象。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:大型语言模型(LLMs)在作为AI助手时会产生幻觉,即生成看似合理但实际上不准确或无意义的信息。
- 现有方案不足:现有的基于偏好学习的对齐方法在训练过程中不可避免地引入了噪声。
- 研究目标:提出一种细粒度事实一致性对齐方法,减少LLMs的幻觉现象。
问题2:论文的核心创新点是什么?
- 技术创新:利用句子级事实性作为掩码信号,只从事实正确的句子中学习,避免对不喜欢的样本中的事实内容进行惩罚。
- 方法改进:对DPO算法进行了改进,通过掩码方案解决偏好学习中的模糊性。
- 优势:显著提高了LLMs回答问题的准确性,减少了幻觉现象。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在ANAH和Biography数据集上进行的实验。
- 性能提升:在ANAH测试集上,Llama3.1-8B-Instruct的得分从49.19%提高到77.53%,超过了Llama3.1-70B-Instruct(53.44%)和DPO(68.44%)。
- 对比结果:与基线方法相比,Mask-DPO在事实一致性方面有显著提升。
问题4:这个研究的实际应用价值是什么?
- 应用场景:AI助手、问答系统、文本生成等。
- 实施建议:使用Mask-DPO进行LLMs的事实一致性对齐,以提高其回答问题的准确性。
- 局限与展望:Mask-DPO在细粒度幻觉缓解方面表现出色,但仍存在一些局限性,如潜在的奖励黑客风险和有限的评估数据集。未来研究方向包括探索更有效的奖励模型和更广泛的评估数据集。
来源
机器可读索引:llms.txt