Skip to main content
QUICK REVIEW

[Paper Review] The Curious Case of Neural Text Degeneration

Ari Holtzman, Jan Buys|arXiv (Cornell University)|Apr 22, 2019
Topic Modeling40 references1,100 citations
TL;DR

The paper analyzes decoding strategies for open-ended text generation and introduces Nucleus Sampling, which truncates the unreliable tail of the distribution to produce higher-quality and more diverse text than prior methods.

ABSTRACT

Despite considerable advancements with deep neural language models, the enigma of neural text degeneration persists when these models are tested as text generators. The counter-intuitive empirical observation is that even though the use of likelihood as training objective leads to high quality models for a broad range of language understanding tasks, using likelihood as a decoding objective leads to text that is bland and strangely repetitive. In this paper, we reveal surprising distributional differences between human text and machine text. In addition, we find that decoding strategies alone can dramatically effect the quality of machine text, even when generated from exactly the same neural language model. Our findings motivate Nucleus Sampling, a simple but effective method to draw the best out of neural generation. By sampling text from the dynamic nucleus of the probability distribution, which allows for diversity while effectively truncating the less reliable tail of the distribution, the resulting text better demonstrates the quality of human text, yielding enhanced diversity without sacrificing fluency and coherence.

Motivation & Objective

  • Expose neural text degeneration in open-ended generation.
  • Compare decoding strategies across distributional, perplexity, and human-evaluated criteria.
  • Propose and validate Nucleus Sampling as the preferred decoding method for long-form text.
  • Provide practical guidance on when and why to use nucleus sampling over alternatives.

Proposed method

  • Define top-p (nucleus) vocabulary as the smallest set whose cumulative probability reaches p.
  • Renormalize the distribution over the nucleus and sample from it.
  • Compare nucleus sampling with top-k, temperature, beam search, and pure sampling using distributional metrics and human evaluation (HUSE).
  • Evaluate on GPT-2 Large (762M) Generatively Pre-trained Transformer with WebText data.
  • Analyze perplexity, Zipf coefficient, Self-BLEU, repetition, and HUSE to assess quality and diversity.

Experimental results

Research questions

  • RQ1Can maximization-based decoding (e.g., beam search) produce degenerate, repetitive text in open-ended generation?
  • RQ2Does sampling from a truncated tail of the model distribution (nucleus sampling) yield text that is both high-quality and diverse?
  • RQ3How do different decoding strategies compare to human text across distributional, statistical, and human-evaluated criteria?

Key findings

MethodPerplexitySelf-BLEUZipf CoefficientRepetition %HUSE
Human12.380.310.930.28-
Greedy1.500.501.0073.66-
Beam, b=161.480.440.9428.94-
Stochastic Beam, b=1619.200.280.910.32-
Pure Sampling22.730.280.930.220.67
Sampling, t=0.910.250.350.960.660.79
Top-k=406.880.390.960.780.19
Top-k=64013.820.320.960.280.94
Top-k=40, t=0.73.480.441.008.860.08
Nucleus p=0.9513.130.320.950.360.97
  • Maximization-based decoding often yields repetitive or generic text for open-ended generation.
  • The model’s tail distribution is unreliable and should be truncated during generation.
  • Nucleus Sampling closely matches human perplexity and diversity, and achieves the best overall quality-diversity trade-off per HUSE evaluation.
  • Nucleus Sampling yields near-human distribution characteristics on Zipf and diversity metrics while avoiding repetition.
  • Top-k sampling and temperature have context-dependent drawbacks, while pure sampling can be incoherent.

Better researchstarts right now

From paper design to paper writing, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.