Simple and Scalable Nearest Neighbor Machine Translation
Yuhan Dai, Zhirui Zhang, Qiuzhi Liu, Qu Cui, Weihua Li, Yichao Du, Tong Xu
Abstract
kNN- MT (Khandelwal et al., 2021) 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 (kNN) retrieval to achieve domain adaptation without retraining. Despite being conceptually attractive, kNN-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 kNN-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 kNN-MT, based on which we further introduce a distance-aware adapter to adaptively incorporate the kNN 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 kNN-MT.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 6507eba6-61bd-4075-b946-8bdbca2e13f7Cited by top-tier papers5
- kNN-TL: k-Nearest-Neighbor Transfer Learning for Low-Resource Neural Machine TranslationShudong Liu, Xuebo Liu, Derek F. Wong, Zhaocong Li et al.ACL 2023 · 14 citations
- Subset Retrieval Nearest Neighbor Machine TranslationHiroyuki Deguchi, Taro Watanabe, Yusuke Matsui, Masao Utiyama et al.ACL 2023 · 7 citations
- Nearest Neighbor Machine Translation is Meta-Optimizer on Output Projection LayerRuize Gao, Zhirui Zhang, Yichao Du, Lemao Liu et al.EMNLP 2023 · 3 citations
- Revisiting Source Context in Nearest Neighbor Machine TranslationXuanhong Li, Peng Li, Po HuEMNLP 2023
- IMTLab: An Open-Source Platform for Building, Evaluating, and Diagnosing Interactive Machine Translation SystemsXu Huang, Zhirui Zhang, Ruize Gao, Yichao Du et al.EMNLP 2023
Builds on13
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text RetrievalLee Xiong, Chenyan Xiong, Ye Li, Kwok-Fung Tang et al.ICLR 2021 · 1,547 citations
- Generalization through Memorization: Nearest Neighbor Language ModelsUrvashi Khandelwal, Omer Levy, Dan Jurafsky, Luke Zettlemoyer et al.ICLR 2020 · 1,038 citations
- Nearest Neighbor Machine TranslationUrvashi Khandelwal, Angela Fan, Dan Jurafsky, Luke Zettlemoyer et al.ICLR 2021 · 323 citations
- Efficient Cluster-Based k-Nearest-Neighbor Machine TranslationDexin Wang, Kai Fan, Boxing Chen, Deyi XiongACL 2022 · 35 citations
Related papers
- Chunk-based Nearest Neighbor Machine TranslationPedro Henrique Martins, Zita Marinho, André F. T. MartinsEMNLP 2022 · 17 citations
- Bridging the Domain Gaps in Context Representations for k-Nearest Neighbor Neural Machine TranslationZhiwei Cao, Baosong Yang, Huan Lin, Suhang Wu et al.ACL 2023 · 1 citation
- Enhancing Neural Machine Translation Through Target Language Data: A kNN-LM Approach for Domain AdaptationAbudurexiti Reheman, Hongyu Liu, Junhao Ruan, Abudukeyumu Abudula et al.ACL 2025
- Efficient Nearest Neighbor Language ModelsJunxian He, Graham Neubig, Taylor Berg-KirkpatrickEMNLP 2021
- Learning Kernel-Smoothed Machine Translation with Retrieved ExamplesQingnan Jiang, Mingxuan Wang, Jun Cao, Shanbo Cheng et al.EMNLP 2021 · 1 citation
