The end-to-end nature of neural machine translation (NMT) removes many ways of manually guiding the translation process that were available in older paradigms. Recent work, however, has introduced a new capability: lexically constrained or guided decoding, a modification to beam search that forces the inclusion of pre-specified words and phrases in the output. However, while theoretically sound, existing approaches have computational complexities that are either linear (Hokamp and Liu, 2017) or exponential (Anderson et al., 2017) in the number of constraints. We present a algorithm for lexically constrained decoding with a complexity of O(1) in the number of constraints. We demonstrate the algorithms remarkable ability to properly place these constraints, and use it to explore the shaky relationship between model and BLEU scores. Our implementation is available as part of Sockeye.
Neural Machine Translation with Explicit Phrase Alignment
Institute for Artificial Intelligence(人工智能研究院);Tsinghua University(清华大学);Beijing National Research Center for Information Science and Technology(北京信息科学与技术国家研究中心);Sogou Inc.(搜狗公司)
A Template-based Method for Constrained Neural Machine Translation
Tsinghua University(清华大学);Beijing National Research Center for Information Science and Technology(北京信息科学与技术国家研究中心);Beijing Academy of Artificial Intelligence(北京智源人工智能研究院);International Innovation Center of Tsinghua University, Shanghai(清华大学上海国际创新中心);Quan Cheng Laboratory(之江实验室);Zhongguancun Laboratory(中关村实验室);Tencent AI Lab(腾讯人工智能实验室)
DOPRA: Decoding Over-accumulation Penalization and Re-allocation in Specific Weighting Layer
Northeastern University(东北大学);Sydney Smart Technology College(悉尼智能科技学院);Shanghai Jiao Tong University(上海交通大学);School of Electronic Information and Electrical Engineering(电子信息与电气工程学院)