Papers
Topics
Authors
Recent
Search
2000 character limit reached

Efficient k-Nearest-Neighbor Machine Translation with Dynamic Retrieval

Published 10 Jun 2024 in cs.CL | (2406.06073v1)

Abstract: To achieve non-parametric NMT domain adaptation, kk-Nearest-Neighbor Machine Translation (kkNN-MT) constructs an external datastore to store domain-specific translation knowledge, which derives a kkNN distribution to interpolate the prediction distribution of the NMT model via a linear interpolation coefficient λ\lambda. Despite its success, kkNN retrieval at each timestep leads to substantial time overhead. To address this issue, dominant studies resort to kkNN-MT with adaptive retrieval (kkNN-MT-AR), which dynamically estimates λ\lambda and skips kkNN retrieval if λ\lambda is less than a fixed threshold. Unfortunately, kkNN-MT-AR does not yield satisfactory results. In this paper, we first conduct a preliminary study to reveal two key limitations of kkNN-MT-AR: 1) the optimization gap leads to inaccurate estimation of λ\lambda for determining kkNN retrieval skipping, and 2) using a fixed threshold fails to accommodate the dynamic demands for kkNN retrieval at different timesteps. To mitigate these limitations, we then propose kkNN-MT with dynamic retrieval (kkNN-MT-DR) that significantly extends vanilla kkNN-MT in two aspects. Firstly, we equip kkNN-MT with a MLP-based classifier for determining whether to skip kkNN retrieval at each timestep. Particularly, we explore several carefully-designed scalar features to fully exert the potential of the classifier. Secondly, we propose a timestep-aware threshold adjustment method to dynamically generate the threshold, which further improves the efficiency of our model. Experimental results on the widely-used datasets demonstrate the effectiveness and generality of our model.\footnote{Our code is available at \url{https://github.com/DeepLearnXMU/knn-mt-dr}.

Summary

No one has generated a summary of this paper yet.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.