Factuality Enhanced Language Models for Open-Ended Text Generation
Nayeon Lee † Thanks: Work done during an internship at NVIDIA. Affiliation: Hong Kong University of Science and Technology Wei Ping Thanks: Correspondence to: Nayeon Lee Wei Ping Affiliation: NVIDIA Peng Xu Affiliation: NVIDIA Mostofa Patwary Affiliation: NVIDIA Pascale Fung Affiliation: Hong Kong University of Science and Technology Mohammad Shoeybi Affiliation: NVIDIA Bryan Catanzaro Affiliation: NVIDIA
Abstract
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 comp
原文 arXiv:2206.04624;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2206.04624v3