arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2105.14528cs.CL
收藏

快速最近邻机器翻译

Fast Nearest Neighbor Machine Translation

Peking University(北京大学);Zhejiang University(浙江大学);Nanyang Technological University(南洋理工大学)

Yuxian Meng, Xiaoya Li, Xiayu Zheng, Fei Wu, Xiaofei Sun, Tianwei Zhang, Jiwei Li

摘要:

虽然最近邻机器翻译($k$ NN-MT)\citep{khandelwal2020nearest}已经证明比标准的神经MT系统引入了显著的性能提升,但是它非常慢,因为它使用整个参考语料库作为最近邻搜索的搜索器。这意味着束搜索中的每个束的每个步骤必须在整个参考语料库上搜索。因此,$k$ NN-MT比普通MT模型慢两个数量级,这使得它很难应用于现实世界的应用,特别是在线服务。在这项工作中,我们提出了快速$k$ NN-MT来解决这个问题。Fast $k$ NN-MT为最近邻搜索构造了一个明显更小的搜索器:对于源句子中的每个单词,Fast $k$ NN-MT首先选择其最近的标记级邻居,这仅限于与查询标记相同的标记。然后,在每个解码步骤,与使用整个语料库作为语料库相反,搜索空间被限制为与先前选择的参考源标记相对应的目标标记。该策略避免了在整个帧中搜索最近邻,大大提高了解码效率。在不损失性能的情况下,快速$k$ NN-MT比$k$ NN-MT快两个数量级,并且仅比标准NMT模型慢两倍。快速$k$ NN-MT使$k$ NN-MT系统能够在实际MT应用中得到实际应用。代码可在\url{https://github.com/ShannonAI/fast-knn-nmt}上获得

英文摘要:

Though nearest neighbor Machine Translation ($k$NN-MT) \citep{khandelwal2020nearest} has proved to introduce significant performance boosts over standard neural MT systems, it is prohibitively slow since it uses the entire reference corpus as the datastore for the nearest neighbor search. This means each step for each beam in the beam search has to search over the entire reference corpus. $k$NN-MT is thus two-orders slower than vanilla MT models, making it hard to be applied to real-world applications, especially online services. In this work, we propose Fast $k$NN-MT to address this issue. Fast $k$NN-MT constructs a significantly smaller datastore for the nearest neighbor search: for each word in a source sentence, Fast $k$NN-MT first selects its nearest token-level neighbors, which is limited to tokens that are the same as the query token. Then at each decoding step, in contrast to using the entire corpus as the datastore, the search space is limited to target tokens corresponding to the previously selected reference source tokens. This strategy avoids search through the whole datastore for nearest neighbors and drastically improves decoding efficiency. Without loss of performance, Fast $k$NN-MT is two-orders faster than $k$NN-MT, and is only two times slower than the standard NMT model. Fast $k$NN-MT enables the practical use of $k$NN-MT systems in real-world MT applications. The code is available at \url{https://github.com/ShannonAI/fast-knn-nmt}

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

↑