Skip to main content
QUICK REVIEW

[Paper Review] Factuality Enhanced Language Models for Open-Ended Text Generation

Nayeon Lee, Ping Wei|arXiv (Cornell University)|Jun 9, 2022
Topic ModelingComputer Science54 citations
TL;DR

The paper measures and improves factual accuracy in open-ended text generation, introducing FactualityPrompts, factual-nucleus sampling, and factuality-enhanced training to reduce nonfactual outputs in very large LMs.

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 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.

Motivation & Objective

  • Define a benchmark and metrics to automatically assess factuality in open-ended LM generations using plain-text sources (Wikipedia).
  • Systematically analyze factuality across model scales (126M to 530B) and decoding strategies.
  • Propose decoding and training techniques to improve factuality without sacrificing generation quality.
  • Show that factuality-enhanced training plus factual-nucleus sampling substantially reduces factual errors in very large LMs.

Proposed method

  • Create FactualityPrompts test set with factual and nonfactual prompts.
  • Ground truth preparation using Wikipedia at document or sentence level for factual verification.
  • Employ NE-based factuality metric and textual entailment metric to quantify factuality of generations.
  • Compare decoding algorithms (greedy vs nucleus/top-p) and identify their effects on factuality and diversity.
  • Introduce factual-nucleus sampling that decays nucleus probability over sentence progression to reduce factual errors.
  • Propose factuality-enhanced continued training with TopicPrefix and a sentence completion loss to improve fact awareness during learning.

Experimental results

Research questions

  • RQ1How does factuality in open-ended generation scale with model size from 126M to 530B?
  • RQ2How do decoding strategies (greedy vs nucleus/top-p) impact factuality and generation quality?
  • RQ3Can decoding and training be adjusted to improve factual accuracy without sacrificing fluency or diversity?
  • RQ4Does factuality-enhanced training with TopicPrefix and sentence completion loss reduce named-entity errors and improve factual entailment?

Key findings

  • Factuality tends to improve with model size; NE_Er drops from 63.69% (126M, p=0.9) to 33.30% (530B).
  • Top-p nucleus sampling harms factuality due to accumulated randomness; greedy decoding is more factual but less diverse.
  • Factual-nucleus sampling improves factuality-diversity/repetition trade-offs over standard nucleus sampling, depending on hyperparameters.
  • Direct continued training on factual data alone does not guarantee improved factuality; incorporating TopicPrefix and a sentence completion loss yields substantial reductions in factual errors.
  • Factuality-enhanced training with factual-nucleus sampling can reduce named-entity factual errors to as low as 14.5% for 530B models under chosen settings.
  • TopicPrefix plus targeted training strategies mitigate mis-associations learned from fragmented training corpora.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.