arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2007.03909cs.CLcs.DS
收藏

最佳优先束搜索

Best-First Beam Search

ETH Zürich(苏黎世联邦理工学院);Johns Hopkins University(约翰斯·霍普金斯大学);University of Cambridge(剑桥大学)

Clara Meister, Tim Vieira, Ryan Cotterell

摘要:

许多NLP任务的解码需要有效的启发式算法来近似精确搜索,因为搜索整个输出空间的问题通常是棘手的,或者在许多设置中是不切实际的。此作业的默认算法是束搜索--宽度优先搜索的精简版本。令人惊讶的是,由于NLP任务的有益搜索偏差,束搜索通常返回比精确推理更好的结果。在这项工作中,我们表明,标准的实施束搜索可以作出高达10倍的速度在实践中。我们的方法假设评分函数在序列长度上是单调的,这使得我们能够安全地修剪那些不能在最后一组假设中的假设。我们设计了有效的单调逼近流行的非单调评分函数,包括长度归一化和互信息解码。最后,我们提出了一个内存减少的最佳优先束搜索的变体,它具有类似的有益的搜索偏差在下游性能方面,但运行在一小部分的时间。

英文摘要:

Decoding for many NLP tasks requires an effective heuristic algorithm for approximating exact search since the problem of searching the full output space is often intractable, or impractical in many settings. The default algorithm for this job is beam search -- a pruned version of breadth-first search. Quite surprisingly, beam search often returns better results than exact inference due to beneficial search bias for NLP tasks. In this work, we show that the standard implementation of beam search can be made up to 10x faster in practice. Our method assumes that the scoring function is monotonic in the sequence length, which allows us to safely prune hypotheses that cannot be in the final set of hypotheses early on. We devise effective monotonic approximations to popular nonmonontic scoring functions, including length normalization and mutual information decoding. Lastly, we propose a memory-reduced variant of Best-First Beam Search, which has a similar beneficial search bias in terms of downstream performance, but runs in a fraction of the time.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑