Language models (LMs) are trained on billions of tokens in an attempt to recover the true language distribution. Still, vanilla random sampling from LMs yields low quality generations. Decoding algorithms attempt to restrict the LM distribution to a set of high-probability continuations, but rely on greedy heuristics that introduce myopic distortions, yielding sentences that are homogeneous, repetitive and incoherent. In this paper, we introduce EPIC, a hyperparameter-free decoding approach that incorporates the entropy of future trajectories into LM decoding. EPIC explicitly regulates the amount of uncertainty expressed at every step of generation, aligning the sampling distribution's entropy to the aleatoric (data) uncertainty. Through Entropy-Aware Lazy Gumbel-Max sampling, EPIC manages to be exact, while also being efficient, requiring only a sublinear number of entropy evaluations per step. Unlike current baselines, EPIC yields sampling distributions that are empirically well-aligned with the entropy of the underlying data distribution. Across creative writing and summarization tasks, EPIC consistently improves LM-as-judge preference win-rates over widely used decoding strategies. These preference gains are complemented by automatic metrics, showing that EPIC produces more diverse generations and more faithful summaries. We also evaluate EPIC on mathematical reasoning, where it outperforms all baselines.


翻译:语言模型(LMs)经过数十亿词元的训练,旨在恢复真实的语言分布。然而,从语言模型中进行普通的随机采样仍会生成低质量的文本。解码算法试图将语言模型的分布限制在一组高概率的延续序列上,但依赖于引入短视偏差的贪婪启发式方法,导致生成的句子同质化、重复且不连贯。本文提出EPIC,一种无需超参数的解码方法,它将未来轨迹的熵纳入语言模型解码过程。EPIC明确调控生成每一步所表达的不确定性量,使采样分布的熵与偶然性(数据)不确定性对齐。通过熵感知惰性Gumbel-Max采样,EPIC实现了精确性,同时保持了高效性,每一步仅需亚线性次数的熵评估。与现有基线方法不同,EPIC产生的采样分布在经验上与底层数据分布的熵良好对齐。在创意写作和摘要生成任务中,相较于广泛使用的解码策略,EPIC持续提升了基于语言模型评判的偏好胜率。这些偏好增益得到了自动评估指标的补充,表明EPIC能生成更多样化的文本和更忠实的摘要。我们还在数学推理任务上评估了EPIC,其表现优于所有基线方法。

0
下载
关闭预览

相关内容

【CVPR2024】掩码自解码器是有效的多任务视觉通用模型
专知会员服务
20+阅读 · 2024年3月16日
【CVPR2022】MSDN: 零样本学习的互语义蒸馏网络
专知会员服务
21+阅读 · 2022年3月8日
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
【NeurIPS2019】图变换网络:Graph Transformer Network
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关VIP内容
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2016年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员