Bridging the Domain Gaps in Context Representations for k-Nearest Neighbor Neural Machine Translation

05/26/2023
by   Zhiwei Cao, et al.
0

k-Nearest neighbor machine translation (kNN-MT) has attracted increasing attention due to its ability to non-parametrically adapt to new translation domains. By using an upstream NMT model to traverse the downstream training corpus, it is equipped with a datastore containing vectorized key-value pairs, which are retrieved during inference to benefit translation. However, there often exists a significant gap between upstream and downstream domains, which hurts the retrieval accuracy and the final translation quality. To deal with this issue, we propose a novel approach to boost the datastore retrieval of kNN-MT by reconstructing the original datastore. Concretely, we design a reviser to revise the key representations, making them better fit for the downstream domain. The reviser is trained using the collected semantically-related key-queries pairs, and optimized by two proposed losses: one is the key-queries semantic distance ensuring each revised key representation is semantically related to its corresponding queries, and the other is an L2-norm loss encouraging revised key representations to effectively retain the knowledge learned by the upstream NMT model. Extensive experiments on domain adaptation tasks demonstrate that our method can effectively boost the datastore retrieval and translation quality of kNN-MT.[Our code is available at <https://github.com/DeepLearnXMU/RevisedKey-knn-mt>.]

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/17/2022

Towards Robust k-Nearest-Neighbor Machine Translation

k-Nearest-Neighbor Machine Translation (kNN-MT) becomes an important res...
research
02/23/2023

Simple and Scalable Nearest Neighbor Machine Translation

kNN-MT is a straightforward yet powerful approach for fast domain adapta...
research
05/27/2021

Adaptive Nearest Neighbor Machine Translation

kNN-MT, recently proposed by Khandelwal et al. (2020a), successfully com...
research
04/13/2022

Efficient Cluster-Based k-Nearest-Neighbor Machine Translation

k-Nearest-Neighbor Machine Translation (kNN-MT) has been recently propos...
research
09/19/2022

Learning Decoupled Retrieval Representation for Nearest Neighbour Neural Machine Translation

K-Nearest Neighbor Neural Machine Translation (kNN-MT) successfully inco...
research
11/08/2022

What Knowledge Is Needed? Towards Explainable Memory for kNN-MT Domain Adaptation

kNN-MT presents a new paradigm for domain adaptation by building an exte...
research
06/10/2023

INK: Injecting kNN Knowledge in Nearest Neighbor Machine Translation

Neural machine translation has achieved promising results on many transl...

Please sign up or login with your details

Forgot password? Click here to reset