Source-linked AI summary

The Stable Entropy Hypothesis and Entropy-Aware Decoding: An Analysis and Algorithm for Robust Natural Language Generation

Kushal Arora, Timothy J. O'Donnell, Doina Precup, Jason Weston, Jackie C. K. Cheung

arXiv:2302.06784v1cs.CL

TL;DR

Open-ended generation can become repetitive and dull under deterministic decoding. The paper analyzes decoding through entropy and proposes a mostly greedy entropy-aware method; its experiments report competitive quality and repetitiveness with more contextual generations, while entropy-zone violations correlate with generation quality.

  • Problem

    Deterministic decoding can produce repetitive, dull outputs in open-ended generation, motivating analysis of its contrast with decoding behavior on strongly conditioned tasks.

    Source: §1 · p. 1
  • Method

    The paper analyzes decoding through the stable entropy hypothesis and uses that analysis to propose entropy-aware decoding that acts greedily most of the time.

    Source: §1 · pp. 1–2
  • Results

    Text completion and dialogue experiments find entropy-aware decoding competitive with other methods on quality and repetitiveness while being more contextual.

    Source: §5 · p. 9
  • Takeaways & Limitations

    In text completion, fewer stable-zone violations correlate with fewer repetitions and higher generation quality.

    Source: §2.2.2 · p. 5, §5 · p. 9

Abstract

from arXiv · show

State-of-the-art language generation models can degenerate when applied to open-ended generation problems such as text completion, story generation, or dialog modeling. This degeneration usually shows up in the form of incoherence, lack of vocabulary diversity, and self-repetition or copying from the context. In this paper, we postulate that ``human-like'' generations usually lie in a narrow and nearly flat entropy band, and violation of these entropy bounds correlates with degenerate behavior. Our experiments show that this stable narrow entropy zone exists across models, tasks, and domains and confirm the hypothesis that violations of this zone correlate with degeneration. We then use this insight to propose an entropy-aware decoding algorithm that respects these entropy bounds resulting in less degenerate, more contextual, and "human-like" language generation in open-ended text generation settings.

1. Introduction

The introduction links decoding behavior to entropy patterns, presenting a stable entropy zone, evidence that zone violations correlate with generation quality, and an entropy-aware decoding method for open-ended generation.

1. Introduction

  • Deterministic decoding produces repetitive, dull outputs in open-ended generation, while stochastic methods can yield more coherent, less repetitive text.The paper notes that stochastic methods also score highly on Mauve and human acceptability judgments.Source: §1 · p. 1
  • Mean entropy under training-data contexts remains stable over generation, defining a narrow stable entropy zone observed across tasks, domains, and model combinations.The paper calls the mean entropy the stable entropy baseline and the surrounding narrow band the stable entropy zone.Source: §1 · p. 1
  • In open-ended generation, deterministic decoders show a catastrophic entropy drop, while well-tuned stochastic decoding mostly stays within the zone; zone violations strongly correlate with generation quality.The paper proposes that staying mostly within the zone is associated with more coherent, less degenerate text.Source: §1 · pp. 1–2
  • For strongly conditioned tasks, beam search's smoothed entropy mostly respects the stable entropy zone bounds.Source: §1 · p. 2
  • Entropy-aware decoding is proposed to avoid degeneration while acting greedily most of the time, and yields less degenerate, more contextual, “human-like” generations on text completion and dialogue.Source: §1 · p. 2

2. Stable Entropy Analysis

The paper defines a narrow stable entropy zone around a model- and dataset-specific baseline, then tests whether decoding behavior and quality track adherence to it. The analysis finds the zone broadly stable and entropy violations associated with degeneration, while task conditioning distinguishes beam-search outcomes.

2.1. Stable Entropy Zone

  • The zone spans 1.5 standard deviations around the stable entropy baseline, covering approximately 87% of smoothed conditional entropies; smoothing reduces entropy variance.The baseline is mean smoothed entropy under the target context distribution at each timestep.Source: §2.1 · p. 2

2.1.2. RESULTS

  • Across models, tasks, and domains, baselines are nearly flat and zones narrow; near-zero fit slopes coexist with model- and dataset-specific intercepts.A flat 1-D line fits smoothed mean entropy with very low mean squared error.Source: Figure 2 · p. 3, Table 1 · p. 3, §2.1.2 · pp. 3–4

2.1.1. EMPIRICAL STUDY OF STABILITY

  • The stability study spans five tasks, six datasets, and five models, including text completion, dialog, summarization, and story generation.Source: §2.1.1 · p. 3

2.1.2. RESULTS

  • In Wikipedia text completion, the stable entropy zone is narrow (≈2 Nats) and flat, aside from the baseline’s first few steps.The unsmoothed entropy has sudden peaks and drops, motivating the use of smoothed entropy for analysis.Source: §2.1.2 · p. 3

2.2. Stable Entropy Hypothesis

  • Greedy and beam search show catastrophic entropy drops in open-ended completion, while well-tuned sampling mostly stays within the zone, motivating the stable entropy hypothesis.The hypothesis is that decoding whose entropy stays mostly inside the zone yields higher-quality, more coherent, less repetitive text.Source: §2.2 · p. 4

2.2.1. EXPERIMENTS

  • EVR combines the lower- and upper-bound violation ratios, which separately count smoothed entropy falling below or above the zone.Source: §2.2.1 · p. 4

2.2.2. RESULTS

  • ρ = −0.92 for EVR–Mauve, ρ = 0.96 for ELVR–Repeat Score@5, and ρ = −0.93 for EUVR–F1; high entropy also tracks incoherence.Fewer violations under top-k, nucleus, and typical sampling are associated with fewer repetitions, reasonable F1, and higher Mauve scores.Source: Figure 4 · p. 5, §2.2.2 · p. 5
  • Beam search shows high ELVR and low Mauve on open-ended text completion, but far fewer violations and near-state-of-the-art ROUGE-1 or BLEU on strongly conditioned tasks.Dialog falls between these settings; the larger BlenderBot model has fewer entropy violations.Source: §2.2.2 · p. 6

3. Entropy Aware Decoding

Entropy-aware decoding (EAD) intervenes when model entropy leaves a stable zone, otherwise decoding greedily. Across text completion and dialogue experiments, it combines strong generation quality with reduced repetition.

3. Entropy Aware Decoding

  • EAD decodes greedily unless entropy exceeds the zone’s upper bound or falls below its lower bound for N consecutive steps, triggering sampling or backoff.For lower-bound violations, it backs up N steps and selects the next-highest-ranked token, repeating until the consecutive violations stop.Source: §3 · p. 6

3.1.1. MODEL AND DATA

  • Experiments cover text completion and BlenderBot-90M dialogue on Blended Skills Talk, with dialogue contexts capped at 80 words and utterances at 128 tokens.The dialogue evaluation reports F1, Repeat Score@5, and entropy violation ratio.Source: §3.1.1 · p. 7

3.1.2. RESULTS

  • Human evaluators preferred EAD over typical sampling 57% of the time and over top-k sampling 64% of the time.The evaluation compared 100 samples for each pairing and collected judgments from eight evaluators.Source: §3.1.2 · p. 7
  • In text completion, EAD is competitive with typical sampling on quality and repetition, with higher F1, the lowest entropy violation ratio, and nearly 60% greedy decoding.The reported quality measures include high F1, low Repeat Score@5 and 3-gram repeats, and high Mauve.Source: §3.1.2 · p. 7, Table 3 · p. 8
  • In dialogue, EAD with top-k or top-p achieves the highest F1 while reducing repetition compared with greedy or beam search.The reported highest F1 holds irrespective of the sampling algorithm.Source: §3.1.2 · p. 7, Table 4 · p. 8

4. Discussion and Related Work

The discussion distinguishes stable entropy from surprisal-based accounts of natural-sounding language and relates the hypothesis to decoding methods and information-density hypotheses.

Entropy-based Decoding Approaches

  • Typical sampling selects tokens whose likelihood is close to model entropy, with the retained token count controlled by cumulative probability.The discussion also notes Mirostat and η-sampling as entropy-related stochastic approaches.Source: §4 · p. 8
  • Unlike fully stochastic methods, EAD samples only when entropy exceeds the zone’s upper bound; the discussion links this selective sampling with higher F1.The paper notes that fully stochastic sampling may reduce contextuality and factuality, while EAD’s selective behavior is associated with more contextual generations.Source: §4 · p. 8

Stable Entropy Hypothesis and Uniform Information Density Hypothesis

  • Both stable entropy and uniform information density predict stability under human context, but the former bounds expected surprisal while the latter expects generated surprisal to stay nearly flat.Stable entropy allows a narrow zone rather than requiring nearly flat surprisal.Source: §4 · p. 8

Stable Entropy Hypothesis and Expected Information Hypothesis

  • The expected information hypothesis anchors its Goldilocks zone to ancestral sampling, a choice the paper questions given that method’s reported quality and contextuality.The stable entropy hypothesis instead uses a temporal zone anchored in model entropy under the target context distribution.Source: §4 · p. 9

Stable Entropy Hypothesis and Local Typicality

  • Unlike stable entropy, local typicality bounds token surprisal against entropy under the current decoder, so greedy degeneration can still appear typical.The paper argues that greedy decoding’s collapsing entropy can keep surprisal within local-typicality bounds even when the output degenerates.Source: §4 · p. 9

5. Conclusion

The conclusion presents stable entropy as a narrow band around a target-context baseline and reports that EAD is competitive while more contextual. Factuality remains a proposed benefit, not an evaluated result.

5. Conclusion

  • The stable entropy hypothesis states that natural-language entropy stays in a narrow zone around the model’s mean entropy under the target context distribution.The paper reports verification in text completion, where fewer zone violations correlate with fewer repetitions and higher generation quality.Source: §5 · p. 9
  • Text-completion and dialogue experiments find EAD competitive on quality and repetition while producing more contextual generations.The conclusion characterizes EAD as mostly deterministic.Source: §5 · p. 9
  • Whether EAD’s mostly deterministic operation improves factuality is left for future work.The paper identifies factuality as an important issue before wide-scale deployment of large language models.Source: §5 · p. 9

6. Acknowlegment

The acknowledgments credit compute resources, institutional support, and contributors. The accompanying figure passage reports that smoothed and unsmoothed entropy baselines and zones are mostly flat across time.

6. Acknowlegment

  • The authors acknowledge compute resources and support from Calcul Québec, Compute Canada, and the Mila IDT team.Timothy J. O’Donnell, Doina Precup, and Jackie C.K. Cheung are noted as supported by the Canada CIFAR AI Chair program.Source: §6 · p. 9
  • The authors thank named colleagues for input, discussion, and feedback on the paper.The acknowledgments list Khimya Khetarpal, Doina Precup, and others among those thanked.Source: §6 · p. 9

A. Unsmoothed And Smoothed Stable Entropy Baseline and Stable Entropy Zone

  • Smoothed and unsmoothed stable entropy baselines and zones remain mostly flat, except at the first and last few time steps.Source: Figure 5 · p. 12

B. Additional Correlational Plots And Configurations for Stable Entropy Hypothesis Analysis

The text-completion plots associate both excessive and insufficient repetition with poorer generation quality, while top-k best balances contextuality and quality among stochastic methods. Repetition is strongly negatively correlated with entropy upper-zone violations.

B. Additional Correlational Plots And Configurations for Stable Entropy Hypothesis Analysis

  • A strong negative correlation links repetition issues with entropy upper-zone violations, indicating that lower-bound violations are mostly responsible for copying and repetitions.The figure also reports that too many repeats and too few repeats both hurt generation quality.Source: Figure 6 · p. 12
  • Among stochastic decoding methods, top-k sampling best balances contextuality and generation quality.Source: Figure 6 · p. 12
  • Beam search, greedy search, and low-temperature sampling produce too many repeats, while high-temperature sampling produces too few.Both repetition extremes hurt generation quality.Source: Figure 6 · p. 12

C. Quantitative Results for Analysis of Various Decoding Algorithms for Text Completion Setup.

The section defines measures for text-completion contextuality, repetition, and entropy-bound violations. It also reports entropy trajectories and qualitative examples contrasting decoding methods in text completion and dialog.

C. Quantitative Results for Analysis of Various Decoding Algorithms for Text Completion Setup.

  • Table 5 defines F1 as contextuality, 3-gram repeats as repetition, and ELVR, EUVR, and EVR as lower-bound, upper-bound, and combined entropy violation frequencies.Source: Table 5 · p. 13

D. Mean Conditional Entropies of Various Decoding Algorithms

  • Greedy and beam search entropy drops near-monotonically over sequence length, while well-tuned sampling methods and entropy-aware decoding nearly follow the stable entropy baseline.Source: Figure 7 · p. 14

E.1. Wikipedia Text Completion

  • In the GPT-2 XL Wikipedia completion examples, greedy and beam search show catastrophic degeneration, whereas stochastic methods produce relatively more coherent completions.The context concerns Michigan plans to convert the eastern US 2 corridor into a freeway.Source: Table 6 · p. 14, §E.1 · p. 14

E.2. Dialog Generation

  • The dialog examples show beam-search outputs with at least two 3-gram repeats.Source: Table 7 · p. 15

F.1. Various Configurations of Decoding Algorithm Evaluated in Section 2.2.1

The experiments evaluate multiple configurations of stochastic decoding methods on three seeds. The appendix also lists state-of-the-art model sources and describes a length-normalized Repeat Score@5 for measuring repetition.

F.1. Various Configurations of Decoding Algorithm Evaluated in Section 2.2.1

  • Each stochastic decoding algorithm configuration is run on three different seeds.Source: §F.1 · p. 15

State of the Art Models in Table 2

G. Repeat Score@5

  • Repeat Score@5 is a length-normalized modification of the original metric that exponentially weights 1-gram through 5-gram repetitions to capture average repeats per token.Source: G. Repeat Score@5 · p. 16

H. Entropy Aware Decoding Analysis

The analysis finds that entropy upper-bound interventions account for most gains, while lower-bound-only interventions do not work. It also reports higher F1 for top-k with EAD and poorer performance at high alpha values.

H. Entropy Aware Decoding Analysis

  • Only entropy lower-bound interventions do not work; most gains come from entropy upper-bound interventions.Source: Figure 8 · p. 16
  • Top-k sampling combined with EAD results in a higher F1 score.Source: Figure 8 · p. 16
  • High alpha values result in poorer performance, supporting use of the band of ≤1.Source: Figure 8 · p. 16

I. Surprisal Under Different Decoding Algorithms

Stochastic decoding and entropy-aware decoding keep surprisal centered around the target information rate, while greedy and beam search show a catastrophic drop. Figure 9 visualizes these patterns against a stable-entropy baseline.

I. Surprisal Under Different Decoding Algorithms

  • Figure 9 plots smoothed surprisal (window size 5) for decoding algorithms on the Table 6 text-completion prompt against a stable-entropy target-rate baseline.Source: Figure 9 · p. 17
  • Stochastic decoding and entropy-aware decoding keep surprisal centered around the target information rate, while greedy and beam search show a catastrophic drop.Source: §I · p. 17, Figure 9 · p. 17
  • The greedy- and beam-search surprisal drop resembles the drop reported in Figure 3.Source: §I · p. 17
Loading 2302.06784v1…