Entropy-Aligned Decoding of LMs for Better Writing and Reasoning

Ahmed, Kareem, Singh, Sameer

–arXiv.org Artificial Intelligence 

Stochastic sampling tends to produce low quality text due to sampling the unreliable tails of the distribution.1 Consequently, many decoding algorithms have been proposed that either statically (Fan et al., 2018b) or dynamically (Holtzman et al., 2020b; Freitag & Al-Onaizan, 2017a; Minh et al., 2025; Hewitt et al., 2022a; Meister et al., 2023) intervene on the next-token distribution, in an effort to truncate, or restrict, the LM distribution to a nucleus set of the most promising sentences. Unfortunately, these heuristics are often ad hoc, based only on empirical observations. Furthermore, these ad hoc heuristics are often implemented greedily at every step of the generation, yielding a myopic rendition of the desired target distribution. Instinctively, one might be tempted to associate with high-quality human-like generations a high probability under the LM distribution. Paradoxically, that does not seem to be the case. In fact, empirical studies have shown (Holtzman et al., 2020b; Zhang et al., 2021; Meister et al., 2022) the quality of a generation to exhibits a peculiar relationship with regards to its probability under the LM distribution: there is indeed a positive correlation between the probability prescribed by a LM to a generation and its perceived quality up to an inflection point after which the perceived quality of the generation negatively correlates with its probability. This empirical observation offers a heuristic explanation for the phenomenon whereby lower probability generations returned by stochastic decoding approaches appear to outperform text generated using probability-maximizing approaches such as beam search (Lowerre, 1976; Reddy, 1977; Sutskever et al., 2014; Bahdanau et al., 2015). Information theory offers a principled account of why naive LM sampling fails.