论文标题

开放式文本生成的事实增强了语言模型

Factuality Enhanced Language Models for Open-Ended Text Generation

论文作者

Lee, Nayeon, Ping, Wei, Xu, Peng, Patwary, Mostofa, Fung, Pascale, Shoeybi, Mohammad, Catanzaro, Bryan

论文摘要

预审前的语言模型(LMS)容易生成具有非事实信息的文本。在这项工作中,我们测量并提高了开放式文本生成的大规模LMS的事实准确性。我们设计了FactualityPrompts测试集和指标来衡量LM世代的事实。基于此,我们研究了参数尺寸范围从126m到530b不等的LMS的事实准确性。有趣的是,我们发现较大的LM比较小的LM更为事实,尽管先前的研究表明,在误解方面较大的LMS可能不太真实。此外,开放式文本生成中流行的抽样算法(例如,顶级P)可能会损害由于每个采样步骤中介绍的“统一随机性”而引起的事实。我们提出的事实核采样算法会动态适应随机性,以改善发电的事实,同时保持质量。此外,我们分析了从事实文本语料库(例如Wikipedia)学习实体之间正确关联的标准培训方法的效率低下。我们提出了一种事实性增强的培训方法,该方法使用主题重组来更好地意识到事实和句子完成作为培训目标,这可以大大减少事实错误。我们在以下网址发布代码和FactualityPrompts基准:https://github.com/nayeon7lee/factualityprompt。

Pretrained language models (LMs) are susceptible to generate text with nonfactual information. In this work, we measure and improve the factual accuracy of large-scale LMs for open-ended text generation. We design the FactualityPrompts test set and metrics to measure the factuality of LM generations. Based on that, we study the factual accuracy of LMs with parameter sizes ranging from 126M to 530B. Interestingly, we find that larger LMs are more factual than smaller ones, although a previous study suggests that larger LMs can be less truthful in terms of misconceptions. In addition, popular sampling algorithms (e.g., top-p) in open-ended text generation can harm the factuality due to the ''uniform randomness'' introduced at every sampling step. We propose the factual-nucleus sampling algorithm that dynamically adapts the randomness to improve the factuality of generation while maintaining quality. Furthermore, we analyze the inefficiencies of the standard training method in learning correct associations between entities from factual text corpus (e.g., Wikipedia). We propose a factuality-enhanced training method that uses TopicPrefix for better awareness of facts and sentence completion as the training objective, which can vastly reduce the factual errors. We release our code and FactualityPrompts benchmark at: https://github.com/nayeon7lee/FactualityPrompt.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源