Simple and Scalable Nearest Neighbor Machine Translation
- URL: http://arxiv.org/abs/2302.12188v1
- Date: Thu, 23 Feb 2023 17:28:29 GMT
- Title: Simple and Scalable Nearest Neighbor Machine Translation
- Authors: Yuhan Dai, Zhirui Zhang, Qiuzhi Liu, Qu Cui, Weihua Li, Yichao Du,
Tong Xu
- Abstract summary: $k$NN-MT is a powerful approach for fast domain adaptation.
We propose a simple and scalable nearest neighbor machine translation framework.
Our proposed approach achieves almost 90% speed as the NMT model without performance degradation.
- Score: 11.996135740547897
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: $k$NN-MT is a straightforward yet powerful approach for fast domain
adaptation, which directly plugs pre-trained neural machine translation (NMT)
models with domain-specific token-level $k$-nearest-neighbor ($k$NN) retrieval
to achieve domain adaptation without retraining. Despite being conceptually
attractive, $k$NN-MT is burdened with massive storage requirements and high
computational complexity since it conducts nearest neighbor searches over the
entire reference corpus. In this paper, we propose a simple and scalable
nearest neighbor machine translation framework to drastically promote the
decoding and storage efficiency of $k$NN-based models while maintaining the
translation performance. To this end, we dynamically construct an extremely
small datastore for each input via sentence-level retrieval to avoid searching
the entire datastore in vanilla $k$NN-MT, based on which we further introduce a
distance-aware adapter to adaptively incorporate the $k$NN retrieval results
into the pre-trained NMT models. Experiments on machine translation in two
general settings, static domain adaptation and online learning, demonstrate
that our proposed approach not only achieves almost 90% speed as the NMT model
without performance degradation, but also significantly reduces the storage
requirements of $k$NN-MT.
Related papers
- Efficient k-Nearest-Neighbor Machine Translation with Dynamic Retrieval [49.825549809652436]
$k$NN-MT constructs an external datastore to store domain-specific translation knowledge.
adaptive retrieval ($k$NN-MT-AR) dynamically estimates $lambda$ and skips $k$NN retrieval if $lambda$ is less than a fixed threshold.
We propose dynamic retrieval ($k$NN-MT-DR) that significantly extends vanilla $k$NN-MT in two aspects.
arXiv Detail & Related papers (2024-06-10T07:36:55Z) - Nearest Neighbor Machine Translation is Meta-Optimizer on Output
Projection Layer [44.02848852485475]
Nearest Neighbor Machine Translation ($k$NN-MT) has achieved great success in domain adaptation tasks.
We comprehensively analyze $k$NN-MT through theoretical and empirical studies.
arXiv Detail & Related papers (2023-05-22T13:38:53Z) - Better Datastore, Better Translation: Generating Datastores from
Pre-Trained Models for Nearest Neural Machine Translation [48.58899349349702]
Nearest Neighbor Machine Translation (kNNMT) is a simple and effective method of augmenting neural machine translation (NMT) with a token-level nearest neighbor retrieval mechanism.
In this paper, we propose PRED, a framework that leverages Pre-trained models for Datastores in kNN-MT.
arXiv Detail & Related papers (2022-12-17T08:34:20Z) - Chunk-based Nearest Neighbor Machine Translation [7.747003493657217]
We introduce a textitchunk-based $k$NN-MT model which retrieves chunks of tokens from the datastore, instead of a single token.
Experiments on machine translation in two settings, static domain adaptation and on-the-fly'' adaptation, show that the chunk-based model leads to a significant speed-up (up to 4 times) with only a small drop in translation quality.
arXiv Detail & Related papers (2022-05-24T17:39:25Z) - Efficient Cluster-Based k-Nearest-Neighbor Machine Translation [65.69742565855395]
k-Nearest-Neighbor Machine Translation (kNN-MT) has been recently proposed as a non-parametric solution for domain adaptation in neural machine translation (NMT)
arXiv Detail & Related papers (2022-04-13T05:46:31Z) - Non-Parametric Unsupervised Domain Adaptation for Neural Machine
Translation [61.27321597981737]
$k$NN-MT has shown the promising capability of directly incorporating the pre-trained neural machine translation (NMT) model with domain-specific token-level $k$-nearest-neighbor retrieval.
We propose a novel framework that directly uses in-domain monolingual sentences in the target language to construct an effective datastore for $k$-nearest-neighbor retrieval.
arXiv Detail & Related papers (2021-09-14T11:50:01Z) - Adaptive Nearest Neighbor Machine Translation [60.97183408140499]
kNN-MT combines pre-trained neural machine translation with token-level k-nearest-neighbor retrieval.
Traditional kNN algorithm simply retrieves a same number of nearest neighbors for each target token.
We propose Adaptive kNN-MT to dynamically determine the number of k for each target token.
arXiv Detail & Related papers (2021-05-27T09:27:42Z) - Nearest Neighbor Machine Translation [113.96357168879548]
We introduce $k$-nearest-neighbor machine translation ($k$NN-MT)
It predicts tokens with a nearest neighbor classifier over a large datastore of cached examples.
It consistently improves performance across many settings.
arXiv Detail & Related papers (2020-10-01T22:24:46Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.