根据模型不确定度动态调整生成分支数,提升推理效率与质量。
Entropy-informed Decoding: Adaptive Information-Driven Branching

- 依据输出分布熵自适应调整分支数量,高熵时多分支探索,低熵时收敛生成。
- 在数学推理等任务中,以更少计算量实现比固定宽度束搜索更高的准确率。
- 理论证明熵递增的分支策略优于固定分支,且可量化收益差距。
大型语言模型虽生成能力强大,但输出质量依赖解码策略。现有采样方法(如top-k、核采样)通常只走一条路径,而搜索类方法(如束搜索、best-of-n)则常因任务复杂度不一而浪费计算资源。为此,我们提出熵感知解码(EDEN),一种即插即用、与模型无关的解码框架,能根据模型自身不确定性自适应分配计算量,以较少扩展次数逼近更高宽度束搜索的效果。每步生成时,EDEN估计输出词元分布的熵,并单调地随熵值增加分支数:高熵区域扩大探索,低熵区域更趋贪婪,从而提升词元效率。在数学推理、代码生成和科学问答等复杂任务上的实验表明,EDEN持续优于现有解码策略,在准确率-扩展量权衡上表现更优。通过将下一步词元选择建模为噪声最大化问题,我们证明熵单调递增的分支策略,在相同总扩展预算下,必能找到比任意固定分支数更优(即概率更高)的延续路径,并推导出明确的后悔率来刻画自适应分配的优势。
原文摘要 · Abstract (English)
Large language models (LLMs) achieve remarkable generative performance, yet their output quality is dependent on the decoding strategy. While sampling-based methods (e.g., top-k, nucleus) and search-and-select based methods (e.g., beam search, best-of-n, majority voting) can improve upon greedy decoding, both approaches suffer from limitations: sampling generally commits to a single path, while search often expends excessive computation regardless of task complexity. To address these, we introduce Entropy-informed decoding (EDEN), a plug-and-play, model-agnostic decoding framework that adaptively allocates computation based on the model's own uncertainty, approximating higher-width beam search with fewer expansions. At each generation step, EDEN estimates the entropy of the output token distribution and adjusts the branching factor monotonically with the entropy, expanding more candidates in high-entropy regions and following a greedier path in low-entropy regions, improving token efficiency. Experiments across complex tasks, including mathematical reasoning, code generation, and scientific questions, demonstrate that EDEN consistently improves output quality over existing decoding strategies, achieving better accuracy-expansion trade-offs than fixed-width beam search. By treating next-token selection as a noisy maximisation problem, we prove that branching factors monotone in entropy are guaranteed to find better (i.e. more probable) continuations than any fixed branching factor within the same total expansion budget, and derive explicit regret rates characterising the benefit of the adaptive allocation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。