Papers › The Curious Case of Neural Text Degeneration

The Curious Case of Neural Text Degeneration

22 Apr 2019ICLR 2020 1arXiv:1904.09751archive 2025-07-28

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

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.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1904.09751")

Code

Syntology Ran 8 of 17 code samples harvested from 6 repositories linked to this paper; 9 have no recorded run. Of those that ran: 1 ran · honoured contract; 4 ran · our draft was wrong; 1 ran · fixture could not drive it; 2 ran with no contract checked.

By repository: official repository: 6 samples from 1 repository, 4 ran; community (archive-listed): 10 samples from 5 repositories, 3 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

17 repositories listed; official and paper-mentioned ones first.

ari-holtzman/degen officialmentioned in paperpytorch report
AleksSol/mmp_activity_diary mentioned on GitHub report
THUDM/KOBE mentioned on GitHubpytorchMIT report
THUcqb/KOBE mentioned on GitHubpytorchMIT report
TaiseiAso/BiGruAttEncDec mentioned on GitHubpytorch report
c00k1ez/plain-transformers mentioned on GitHubpytorch report
colorfulscoop/tfdlg mentioned on GitHubtfMIT report
microsoft/kid mentioned on GitHubpytorchMIT report
noriyukipy/tfchat mentioned on GitHubtfMIT report
noriyukipy/tfdlg mentioned on GitHubtf report
prakhar21/textaugmentation-gpt2 mentioned on GitHubpytorchMIT report
qibinc/KOBE mentioned on GitHubpytorchMIT report
thu-coai/CDial-GPT mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 8 ran; 1 honoured the contract we drafted; 9 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
4ran · our draft was wrong
1ran · fixture could not drive it
2ran
9unverified

Licence: 11 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 6 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

_gumbel ari-holtzman/degen/gen.py official repository ran · our draft was wrong fingerprinted GPL-3.0 (copyleft) · pointer only · 2d61025ad472d12d · report
_shift_gumbel_maximum ari-holtzman/degen/gen.py official repository ran · our draft was wrong fingerprinted GPL-3.0 (copyleft) · pointer only · 7c5ca0a2e17c5e6b · report
gumbel_sbs_decode ari-holtzman/degen/gen.py official repository ran · our draft was wrong GPL-3.0 (copyleft) · pointer only · 46d2256fd27f9ce4 · report
gumbel_with_maximum ari-holtzman/degen/gen.py official repository ran · our draft was wrong fingerprinted GPL-3.0 (copyleft) · pointer only · 975e63af902daf2e · report
gumbel ari-holtzman/degen/gen.py official repository unverified GPL-3.0 (copyleft) · pointer only · c8316a45e99146db · report
gumbel_like ari-holtzman/degen/gen.py official repository unverified GPL-3.0 (copyleft) · pointer only · 6c601d82e95610de · report
NucleusSampler labmlai/annotated_deep_learning_paper_implementations/labml_nn/sampling/nucleus.py community (archive-listed) ran fingerprinted MIT (permissive) · 5a0768b2c98ccd3a · report
Sampling sander102907/autoencoder_program_synthesis/autoencoder_program_synthesis/utils/Sampling.py community (archive-listed) ran Apache-2.0 (permissive) · 27aeb9112fe4cf52 · report
filter_to_topp noriyukipy/tfdlg/tfdlg/generations.py community (archive-listed) ran · honoured contract fingerprinted MIT (permissive) · f10aa6a3b19fd64e · report
Sampler labmlai/annotated_deep_learning_paper_implementations/labml_nn/sampling/nucleus.py community (archive-listed) unverified MIT (permissive) · 7d8fed5b92965553 · report
accuracy THUDM/KOBE/kobe/utils/helpers.py community (archive-listed) unverified MIT (permissive) · 6135894d997967b3 · report
entity_enhance TaiseiAso/BiGruAttEncDec/decode.py community (archive-listed) unverified no licence file found · pointer only · 717c7692322af957 · report
get_bert_vocab_size THUDM/KOBE/kobe/utils/helpers.py community (archive-listed) unverified MIT (permissive) · b9ed4ea16c8288f0 · report
inf_suppression TaiseiAso/BiGruAttEncDec/decode.py community (archive-listed) unverified no licence file found · pointer only · 7b0560d1ecad407a · report
repetitive_suppression TaiseiAso/BiGruAttEncDec/decode.py community (archive-listed) unverified no licence file found · pointer only · 4aa0814a647dbccb · report
top_p_sampling_search TaiseiAso/BiGruAttEncDec/decode.py community (archive-listed) unverified no licence file found · pointer only · 2cd2fb7377190229 · report
top_filtering identical code first harvested elsewhere ran · fixture could not drive it licence of this copy not recorded · 695eaa24be6f2a1d · report

Tasks

DiversityLanguage ModelingLanguage Modelling

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections