Domain Machine Translation Method with Dynamic Incorporation of k-Nearest Neighbor Knowledge
Domain machine translation methods based on k-nearest neighbour retrieval improve translation quality by incorporating translation knowledge retrieved from a translation knowledge base.Existing methods enhance translation performance by fusing the decoder prediction distribution with k-nearest neighbour knowledge.However,the inaccuracy of the retrieved k-nearest neighbor knowledge may interfere with the prediction results of the model.To address this issue,a domain machine translation method with dynamic incorporation of k-nearest neighbor knowledge is proposed.The confidence of the decoder output distribution is first assessed.With the combination of gating mechanism,the proposed method dynamically decides whether to incorporate the k-nearest-neighbor retrieval results,thereby adjusting the degree of incorporation of k-nearest neighbor knowledge flexibly.The adaptive k-value module is introduced to reduce the interference caused by incorrect k-nearest neighbor knowledge.Besides,the distribution-guided loss is designed to steer the model output approach the target distribution gradually.On four domain-specific German-English machine translation datasets,the proposed method achieves improvements.