Balancing Factuality and Diversity in Language Model Decoding

This direction is merged into another direction: semantic-diversity trade-off. Its last version stays readable and citable here.

Version 1 of 145 papers51 conceptsfrozen 2026-10-04

Large language models (LLMs) face a fundamental "decoding paradox": the strategies that make them accurate often make them boring, while the strategies that make them creative often make them liars. This tension, frequently described as the factuality-diversity trade-off, is a central challenge in generating text that is both human-like and reliable.

The Inverse Relationship

In language generation, we typically choose between two families of decoding strategies. Likelihood-based search (like greedy decoding or beam search) selects the most probable next tokens. As Antoine Bosselut and colleagues noted in their work on COMET, these methods maximize precision and logical consistency but often result in repetitive, generic, and "dull" outputs.

Conversely, stochastic sampling (like nucleus or top-k sampling) introduces randomness to increase lexical variety. While this makes the text more engaging, Luca Massarelli and Fabio Petroni demonstrated that this randomness significantly increases the likelihood of generating unverifiable or false claims. In their analysis, they found a clear inverse relationship: as text diversity goes up, factual verifiability goes down.

Why the Trade-off Exists

The intuition behind this conflict lies in the "probability space" of the model. Factual information—like a specific date or a person's name—usually occupies a very narrow band of high-probability tokens. When a model is forced to be creative via sampling, it often drifts away from these "sharp" factual peaks into "flat" regions of the distribution where multiple tokens are plausible but only one is correct.

As Nayeon Lee and Peng Xu observed, standard stochastic methods often substitute correct entities with incorrect but "plausible-sounding" alternatives. This "diversity tax" means that to ensure a model doesn't hallucinate, researchers often have to settle for more repetitive output.

Moving Toward Adaptive Decoding

Recent research has shifted from choosing a single static strategy to developing adaptive decoding mechanisms that change behavior based on the context of the sentence.

Temporal and Positional Adjustments

One approach is to vary the "randomness" (temperature) over the course of a generation. Massarelli et al. introduced Delayed Beam Search (DELAYEDBS), which uses sampling at the start of a sentence to ensure variety and then switches to beam search to maintain factual consistency. Similarly, Lee et al. proposed a dynamic sampling algorithm that reduces randomness as a sentence progresses, helping the model "lock in" on facts after a creative opening.

Content-Aware Focus

More sophisticated methods attempt to identify "knowledge-intensive" moments in real-time. Wen Luo and Feifan Song developed Dynamic Focus Decoding (DFD), which monitors the model's internal layer distributions. When the model is about to output a fact, DFD "sharpens" the focus (lowers temperature); when it moves to a creative transition, it "relaxes" the focus.

A similar intuition drives REAL Sampling by Haw-Shiuan Chang and Nanyun Peng, which uses a small forecasting model to predict when an LLM is likely to hallucinate based on "Residual Entropy," adjusting sampling thresholds on the fly.

Optimization and Extrapolation

Beyond just adjusting temperature, researchers are exploring how to "filter" the model's output by comparing different models. Contrastive Decoding (CD), introduced by Xiang Lisa Li and Ari Holtzman, generates text by maximizing the difference between a large "expert" model and a small "amateur" model. This effectively subtracts common failure modes like repetition while keeping the expert's factual knowledge.

Building on this, Haw-Shiuan Chang proposed Asymptotic Probability Decoding (APD), which treats decoding as a linear extrapolation toward an infinitely large, hypothetical model. This method significantly boosts factuality in reasoning tasks, though the authors note it can sometimes suppress the rare-word selection that makes creative writing interesting.

The Path Forward: Self-Regulation

The most recent frontier involves teaching models to manage their own diversity. Ilia Kulikov and Jason Weston introduced Latent Preference Optimization (LPO), allowing a model to learn when to be "greedy" for math and "creative" for storytelling within the same response. Similarly, Mingyue Liu and colleagues showed that LLMs can "self-regulate" by prompting them to decide their own sampling parameters before answering, allowing the model to consciously choose between a "precise" or "creative" persona based on the task at hand.

Papers in this version

History & citationVersion 1 · 2026-10-04

Merged into another direction · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_balancing_factuality_and_diversity_in_la_3e4c5f0e,
  title = {Balancing Factuality and Diversity in Language Model Decoding},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/balancing-factuality-and-diversity-in-language-model-decoding/rdr_3e4c5f0e5b314530b7ac8368737de73a},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-19},
}

This exact version (version 1, frozen text):

@misc{lacuna_balancing_factuality_and_diversity_in_la_3e4c5f0e_v1,
  title = {Balancing Factuality and Diversity in Language Model Decoding},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/balancing-factuality-and-diversity-in-language-model-decoding/rdr_3e4c5f0e5b314530b7ac8368737de73a/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-19},
}