Towards Faster K-Nearest-neighbor Machine Translation

Xiangyu Shi,Yunlong Liang,Jinan Xu,Yufeng Chen
DOI: https://doi.org/10.54364/aaiml.2024.41111
2024-01-01
Advances in Artificial Intelligence and Machine Learning
Abstract:Recent works have proven the effectiveness of k-nearest-neighbor machine translation(a.k.akNN-MT) approaches to produce remarkable improvement in cross-domain translations.However, these models suffer from heavy retrieve overhead on the entire datastore whendecoding each token. We observe that during the decoding phase, about 67% to 84% oftokens are unvaried after searching over the corpus datastore, which means most of the tokenscause futile retrievals and introduce unnecessary computational costs by initiating k-nearest-neighbor searches. We consider this phenomenon is explainable in linguistics and propose asimple yet effective multi-layer perceptron (MLP) network to predict whether a token shouldbe translated jointly by the neural machine translation model and probabilities produced bythe kNN or just by the neural model. The results show that our method succeeds in reducingredundant retrieval operations and significantly reduces the overhead of kNN retrievals byup to 53% at the expense of a slight decline in translation quality. Moreover, our methodcould work together with all existing kNN-MT systems.
What problem does this paper attempt to address?