The Curious Case of Neural Text Degeneration
By Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, Yejin Choi. 2019
4,380 citations recorded by the source corpus.
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.
Subfields: Artificial Intelligence, Natural Language Processing
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Mohit Bansal
- Luke S. Zettlemoyer
- Jianfeng Gao
- Yejin Choi
- Percy Liang
- Graham Neubig
- Noah A. Smith
- Caiming Xiong
In Natural Language Processing
- Mohit Bansal
- Yejin Choi
- Luke S. Zettlemoyer
- Jianfeng Gao
- Graham Neubig
- Noah A. Smith
- Jason Aaron Edward Weston
- Percy Liang
Citations in the corpus
- Language Models are Few-Shot Learners (2020, methodology): “ title, in the style of Wallace Stevens. We first experimented with a few prompts, then generated four samples with no additional editing or selection (sampling at temperature 1 using nucleus sampling [HBFC19] with P= 0:9). Completions were truncated when the model began to write a new title and auth”
- Llama 2: Open Foundation and Fine-Tuned Chat Models (2023, methodology): “1 and use nucleus sampling (Holtzman et al., 2020) with top-p set to 0.”
- Experience Grounds Language (2020, background): “Sec-ondly, current cross entropy training losses actively discourage learning the tail of the distribution properly, as events that are statistically infrequent are drowned out (Pennington et al., 2014; Holtzman et al., 2020).”
- Automatic Detection of Generated Text is Easiest when Humans are Fooled (2019, background): “Holtzman et al. (2020) explain how a unique attribute of human language is that it dips in and out of low probability zones.”
- Defending Against Neural Fake News (2019, methodology): “…threshold p, at each timestep we sample from the most probable words whose cumulative probability comprises the top-p% of the entire vocabulary (Holtzman et al., 2019).6 4 Humans are Easily Fooled by Grover-written Propaganda We evaluate the quality of disinformation generated by our largest…”
- HellaSwag: Can a Machine Really Finish Your Sentence? (2019, neutral): “02) are zeroed out (Holtzman et al., 2019).”
- CTRL: A Conditional Transformer Language Model for Controllable Generation (2019, methodology): “…with prompts and prior generated text remains a difficult challenge, but this work found that relying on inference-time methods (Fan et al., 2018; Holtzman et al., 2019) that are closer in behavior to context-based losses (See et al., 2017; Welleck et al., 2019) provides a reasonable solution as…”
- Unified Scaling Laws for Routed Language Models (2022, methodology): “To ameliorate this, we can use Nucleus Sampling [Holtzman et al., 2019], which samples from the top-p set of experts E.”
- Challenges in Detoxifying Language Models (2021, methodology): “For all sampling we use nucleus sampling (Holtzman et al., 2020), with top-p = 0.”
- RealToxicityPrompts: Evaluating Neural Toxic Degeneration in Language Models (2020, methodology): “Generating from Models Unless otherwise noted, we use nucleus sampling (Holtzman et al., 2020) with p = 0.”
- Solving Quantitative Reasoning Problems with Language Models (2022, methodology): “When sampling multiple times per problem we use nucleus sampling (Holtzman et al., 2019) with temperature T = 0.”
- Self-Consistency Improves Chain of Thought Reasoning in Language Models (2022, methodology): “…to sampling strategies and parameters, by varying T in temperature sampling (Ackley et al., 1985; Ficler & Goldberg, 2017), k in top-k sampling (Fan et al., 2018; Holtzman et al., 2018; Radford et al., 2019), and p in nucleus sampling (Holtzman et al., 2020), over PaLM-540B in Figure 4 (left).”
- Competition-level code generation with AlphaCode (2022, methodology): “We also experimented with top-𝑘 (Fan et al., 2018) and nucleus sampling (Holtzman et al., 2019).”
- Evaluating Large Language Models Trained on Code (2021, methodology): “We use nucleus sampling (Holtzman et al., 2020) with top p = 0 .”
- Societal Biases in Language Generation: Progress and Challenges (2021, neutral): “• Nucleus sampling (Holtzman et al., 2019): at each time step, re-distribute the probability mass of the smallest set of words with a cumulative probability exceeding p and sample.”
- Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigm (2021, background): “Recent work in the literature has focused on controlling natural language generation using traditional approaches from machine learning like novel architectures which condition outputs [15, 16], more advanced sampling techniques [6, 11], gradient-based”
- Towards a Human-like Open-Domain Chatbot (2020, methodology): “We evaluate both temperature T and top-k to mitigate negative effects from the tail of the distribution (Holtzman et al., 2019).”