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.


翻译:大型语言模型(LLM)展现出卓越的生成性能,但其输出质量依赖于解码策略。基于采样的方法(如top-k、核采样)与基于搜索选择的方法(如束搜索、最佳N选、多数投票)虽能改进贪婪解码,但两类方法均存在局限:采样通常局限于单一路径,而搜索常因任务复杂度不同而消耗过量计算资源。为此,我们提出基于熵的解码(EDEN)——一种即插即用、模型无关的解码框架,能依据模型自身不确定性自适应分配计算资源,以更少扩展近似更高束宽的搜索。在每个生成步骤中,EDEN估计输出词元分布的熵,并随熵值单调调整分支因子:在熵值较高区域扩展更多候选路径,在熵值较低区域采用更贪婪路径,从而提升词元效率。在数学推理、代码生成和科学问答等复杂任务上的实验表明,EDEN能持续优于现有解码策略,实现比固定束宽搜索更优的准确率-扩展权衡。通过将下一词元选择视为带噪声的最大化问题,我们证明:若分支因子随熵单调变化,则在相同总扩展预算下,其能找到比任何固定分支因子更优(即概率更高)的延续序列,并推导出显式遗憾率来刻画自适应分配的优势。

0
下载
关闭预览

相关内容

大规模语言模型增强推荐系统:分类、趋势、应用与未来
专知会员服务
40+阅读 · 2024年12月22日
大模型如何迭代?北大等《大型语言模型自我进化》综述
变分自编码器VAE:一步到位的聚类方案
PaperWeekly
25+阅读 · 2018年9月18日
深度学习文本分类方法综述(代码)
中国人工智能学会
28+阅读 · 2018年6月16日
谷歌推出新型数据增强算法:AutoAugment
论智
20+阅读 · 2018年6月6日
【干货】深入理解自编码器(附代码实现)
从香农熵到手推KL散度:一文带你纵览机器学习中的信息论
算法与数学之美
10+阅读 · 2018年1月14日
【直观详解】信息熵、交叉熵和相对熵
机器学习研究会
10+阅读 · 2017年11月7日
自然语言处理(二)机器翻译 篇 (NLP: machine translation)
DeepLearning中文论坛
12+阅读 · 2015年7月1日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 6月15日
Arxiv
0+阅读 · 5月5日
VIP会员
最新内容
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
4+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
相关资讯
相关基金
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员