The Curious Case of Neural Text Degeneration

Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, Yejin Choi

2020 · ICLR

The Curious Case of Neural Text Degeneration

Problem

Framing

Open-ended text generation lacked a decoding rule that avoids both beam-search repetition and unconstrained-sampling incoherence. The paper closes this gap with nucleus sampling, which truncates the unreliable tail adaptively and attains the best combined human-statistical score, HUSE 0.970.97.

Currently Used Methods

Direct antecedents

Proposed Method

Architecture

The method is a decoding rule layered on an autoregressive LM, not a new network. At step ii, it reads the model distribution P(xix1:i1)P(x_i \mid x_{1:i-1}) and adaptively truncates to a context-specific candidate set before sampling.

Loss / Objective

The underlying LM still optimizes standard autoregressive likelihood:

maxθi=1m+nlogPθ(xix1:i1).\max_\theta \sum_{i=1}^{m+n} \log P_\theta(x_i \mid x_{1:i-1}).

Sampling Rule / Algorithm

Nucleus sampling defines the smallest top-probability set whose cumulative mass exceeds pp, then renormalizes and samples from it.

V(p)=min{VV:xVP(xx1:i1)p}.V^{(p)} = \min \left\{ V' \subseteq V : \sum_{x \in V'} P(x \mid x_{1:i-1}) \ge p \right\}. P(p)(xx1:i1)=1[xV(p)]P(xx1:i1)xV(p)P(xx1:i1).P^{(p)}(x \mid x_{1:i-1}) = \frac{\mathbf{1}[x \in V^{(p)}] \, P(x \mid x_{1:i-1})}{\sum_{x' \in V^{(p)}} P(x' \mid x_{1:i-1})}.

Training Procedure

Evaluation

Datasets

Metrics

Headline results

Table 1: Main results for comparing decoding methods with selected parameters

MethodPerplexitySelf-BLEU4Zipf 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

Verified results page showing Table 1 and Figure 6 perplexity curves across beam, sampling, top-k, and nucleus decoding settings

Sample grid: example continuations for the same prompt, showing beam-search repetition, sampling incoherence, and stronger balance from nucleus sampling

Ablations

Method Strengths and Weaknesses

Strengths

Weaknesses

Suggestions from the authors

Links

Prior Papers

Further Papers