We present a new approach to encourage neural machine translation to satisfy lexical constraints. Our method acts at the training step and thereby avoiding the introduction of any extra computational overhead at inference step. The proposed method combines three main ingredients. The first one consists in augmenting the training data to specify the constraints. Intuitively, this encourages the model to learn a copy behavior when it encounters constraint terms. Compared to previous work, we use a simplified augmentation strategy without source factors. The second ingredient is constraint token masking, which makes it even easier for the model to learn the copy behavior and generalize better. The third one, is a modification of the standard cross entropy loss to bias the model towards assigning high probabilities to constraint words. Empirical results show that our method improves upon related baselines in terms of both BLEU score and the percentage of generated constraint terms.
翻译:我们提出了一个鼓励神经机器翻译以满足词汇限制的新办法。 我们的方法是在培训阶段采取行动, 从而避免引入任何额外的计算间接费, 在推理阶段。 拟议的方法结合了三个主要因素。 第一个是增加培训数据以具体说明制约因素。 直观地说, 这鼓励模型在遇到约束条件时学习复制行为。 与以往的工作相比, 我们使用简化的增强战略, 没有源因素。 第二个因素是限制符号掩码, 这使得模型更容易学习复制行为, 并更好地概括化。 第三个因素是修改标准交叉导流损失, 将模型偏向于指定高概率约束词。 经验性结果显示,我们的方法在相关的基线上, 在BLEU得分和生成约束条件的百分比方面都有改进。