Improving Open-Ended Text Generation via Adaptive Decoding
Wenhong Zhu, Hongkun Hao, Zhiwei He, Yiming Ai, Rui Wang
TL;DR
This work introduces adaptive decoding, a method that dynamically determines the next-token candidate set for open-ended text generation by tracking the incremental increase in a normalized entropy-based confidence, $\text{Conf}_k(X)$. By iteratively transferring tokens with high probability into a growing candidate set and stopping when the confidence gain falls below a threshold $\epsilon$, the approach balances diversity and coherence while mitigating degeneration phenomena such as repetition and incoherence. Empirical results across GPT2-XL and Llama2-7B family models show improved MAUVE and diversity, with human evaluations indicating more human-preferred outputs; the method also yields gains on policy-tuned models and provides potential benefits for reasoning tasks in smaller models. The work demonstrates that entropy-based, adaptive truncation can offer robust improvements over traditional decoding schemes, albeit with extra computational overhead that can be mitigated with parallelization.
Abstract
Current language models decode text token by token according to probabilistic distribution, and determining the appropriate candidates for the next token is crucial to ensure generation quality. This study introduces adaptive decoding, a mechanism that dynamically empowers language models to ascertain a sensible candidate set during generation. Specifically, we introduce an entropy-based metric called confidence and conceptualize determining the optimal candidate set as a confidence-increasing process. The rationality of including a token in the candidate set is assessed by leveraging the increment of confidence. Experimental results reveal that our method balances diversity and coherence well. The human evaluation shows that our method can generate human-preferred text. Additionally, our method can potentially improve the reasoning ability of language models.
