Adaptive Nearest Neighbor Machine Translation
Not on the map. Why?
Abstract (arXiv)
kNN-MT, recently proposed by Khandelwal et al. (2020a), successfully combines pre-trained neural machine translation (NMT) model with token-level k-nearest-neighbor (kNN) retrieval to improve the translation accuracy. However, the traditional kNN algorithm used in kNN-MT simply retrieves a same number of nearest neighbors for each target token, which may cause prediction errors when the retrieved neighbors include noises. In this paper, we propose Adaptive kNN-MT to dynamically determine the number of k for each target token. We achieve this by introducing a light-weight Meta-k Network, which can be efficiently trained with only a few training samples. On four benchmark machine translation datasets, we demonstrate that the proposed method is able to effectively filter out the noises in retrieval results and significantly outperforms the vanilla kNN-MT model. Even more noteworthy is that the Meta-k Network learned on one domain could be directly applied to other domains and obtain consistent improvements, illustrating the generality of our method. Our implementation is open-sourced at https://github.com/zhengxxn/adaptive-knn-mt.
Key facts. Cited by 58 papers in the map (data through 7 Oct 2026). Builds on 17 of its 20 references that are in the map. First posted on arXiv 27 May 2021.
Builds on
17 of 20 references.
References · 17
- 2017Attention Is All You Needcited by 59,932
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2017Billion-scale similarity search with GPUscited by 2,477
- 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,486
- 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 788
- 2017Six Challenges for Neural Machine Translationcited by 334
- 2020Nearest Neighbor Machine Translationcited by 209
- 2019Facebook FAIR's WMT19 News Translation Task Submissioncited by 179
- 2018Achieving Human Parity on Automatic Chinese to English News Translationcited by 119
5 more
- 2018Guiding Neural Machine Translation with Retrieved Translation Piecescited by 63
- 2020BERT-kNN: Adding a kNN Search Component to Pretrained Language Models for Better QAcited by 36
- 2019Non-Parametric Adaptation for Neural Machine Translationcited by 34
- 2019Unsupervised Domain Adaptation for Neural Machine Translation with Domain-Aware Feature Embeddingscited by 14
- 2020Iterative Domain-Repaired Back-Translationcited by 13
Built on by
Citing papers per year: 2021: 3; 2022: 18; 2023: 20; 2024: 13; 2025: 3; 2026: 1.
58 papers.
Sort:
By area:
- 2022A Survey on Retrieval-Augmented Text Generationcited by 157
- 2022Training Language Models with Memory Augmentationcited by 112
- 2024Retrieval-Augmented Generation for Natural Language Processing: A Surveycited by 70
- 2024Measuring and Enhancing Trustworthiness of LLMs in RAG through Grounded Attributions and Learning to Refusecited by 33
- 2022Efficient Cluster-Based k-Nearest-Neighbor Machine Translationcited by 24
- 2022Improving Few-Shot Performance of Language Models via Nearest Neighbor Calibrationcited by 24
- 2022Chunk-based Nearest Neighbor Machine Translationcited by 21
- 2024Non-Exchangeable Conformal Language Generation with Nearest Neighborscited by 21
- 2021Non-Parametric Unsupervised Domain Adaptation for Neural Machine Translationcited by 20
- 2021Layer-wise Model Pruning based on Mutual Informationcited by 19
- 2022You can't pick your neighbors, or can you? When and how to rely on retrieval in the kNN-LMcited by 18
- 2022Towards Robust k-Nearest-Neighbor Machine Translationcited by 15
38 more
- 2023Retrosynthesis Prediction with Local Template Retrievalcited by 15
- 2023kNN-Adapter: Efficient Domain Adaptation for Black-Box Language Modelscited by 13
- 2022Non-Parametric Domain Adaptation for End-to-End Speech Translationcited by 12
- 2023Simple and Scalable Nearest Neighbor Machine Translationcited by 12
- 2022Nearest Neighbor Knowledge Distillation for Neural Machine Translationcited by 10
- 2021Non-Parametric Online Learning from Human Feedback for Neural Machine Translationcited by 8
- 2024Communication-Efficient Personalized Federated Learning for Speech-to-Text Taskscited by 8
- 2022Efficient Machine Translation Domain Adaptationcited by 7
- 2022Nearest Neighbor Non-autoregressive Text Generationcited by 7
- 2022Improving Retrieval Augmented Neural Machine Translation by Controlling Source and Fuzzy-Match Interactionscited by 7
- 2022What Knowledge Is Needed? Towards Explainable Memory for kNN-MT Domain Adaptationcited by 7
- 2023KIT's Multilingual Speech Translation System for IWSLT 2023cited by 7
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarizationcited by 6
- 2023INK: Injecting kNN Knowledge in Nearest Neighbor Machine Translationcited by 6
- 2022Integrating Translation Memories into Non-Autoregressive Machine Translationcited by 5
- 2023Federated Nearest Neighbor Machine Translationcited by 5
- 2024NNOSE: Nearest Neighbor Occupational Skill Extractioncited by 5
- 2024Mind Your Neighbours: Leveraging Analogous Instances for Rhetorical Role Labeling for Legal Documentscited by 5
- 2022Learning Decoupled Retrieval Representation for Nearest Neighbour Neural Machine Translationcited by 4
- 2023kNN-BOX: A Unified Framework for Nearest Neighbor Generationcited by 3
- 2023Multilingual k-Nearest-Neighbor Machine Translationcited by 3
- 2022Improving Robustness of Retrieval Augmented Translation via Shuffling of Suggestionscited by 2
- 2022Better Datastore, Better Translation: Generating Datastores from Pre-Trained Models for Nearest Neural Machine Translationcited by 2
- 2023Prompting Neural Machine Translation with Translation Memoriescited by 2
- 2023Towards Example-Based NMT with Multi-Levenshtein Transformerscited by 2
- 2024Generating Diverse Translation with Perturbed kNN-MTcited by 2
- 2024Efficient k-Nearest-Neighbor Machine Translation with Dynamic Retrievalcited by 2
- 2023N-Gram Nearest Neighbor Machine Translationcited by 1
- 2023Nearest Neighbor Machine Translation is Meta-Optimizer on Output Projection Layercited by 1
- 2023Rethinking Translation Memory Augmented Neural Machine Translationcited by 1
- 2023knn-seq: Efficient, Extensible kNN-MT Frameworkcited by 1
- 2023Towards Faster k-Nearest-Neighbor Machine Translationcited by 1
- 2024Cross-lingual Contextualized Phrase Retrievalcited by 1
- 2024A Large Language Model-based Framework for Semi-Structured Tender Document Retrieval-Augmented Generationcited by 1
- 2025Long-Tail Crisis in Nearest Neighbor Language Modelscited by 1
- 2025Angular Dispersion Accelerates k-Nearest Neighbors Machine Translationcited by 1
- 2022Blur the Linguistic Boundary: Interpreting Chinese Buddhist Sutra in English via Neural Machine Translationcited by 0
- 2023Retrieval-Augmented Classification with Decoupled Representationcited by 0
50 most cited of 58 All 58 (JSON)
- 2026Warranted Attention: Learning What to Pass from Attention to Prediction29 Jun 2026
- 2025Angular Dispersion Accelerates k-Nearest Neighbors Machine Translation20 Sep 2025
- 2025Long-Tail Crisis in Nearest Neighbor Language Models28 Mar 2025
- 2025Label Distribution Learning-Enhanced Dual-KNN for Text Classification6 Mar 2025
- 2024A Large Language Model-based Framework for Semi-Structured Tender Document Retrieval-Augmented Generation4 Oct 2024
- 2024Measuring and Enhancing Trustworthiness of LLMs in RAG through Grounded Attributions and Learning to Refuse17 Sep 2024
- 2024A Debiased Nearest Neighbors Framework for Multi-Label Text Classification6 Aug 2024
- 2024Simply Trainable Nearest Neighbour Machine Translation with GPU Inference29 Jul 2024
- 2024Exploiting Pre-trained Models for Drug Target Affinity Prediction with Nearest Neighbors21 Jul 2024
- 2024Retrieval-Augmented Generation for Natural Language Processing: A Survey18 Jul 2024
- 2024Efficient k-Nearest-Neighbor Machine Translation with Dynamic Retrieval10 Jun 2024
- 2024Mind Your Neighbours: Leveraging Analogous Instances for Rhetorical Role Labeling for Legal Documents31 Mar 2024
38 more
- 2024Cross-lingual Contextualized Phrase Retrieval25 Mar 2024
- 2024Generating Diverse Translation with Perturbed kNN-MT14 Feb 2024
- 2024Non-Exchangeable Conformal Language Generation with Nearest Neighbors1 Feb 2024
- 2024NNOSE: Nearest Neighbor Occupational Skill Extraction30 Jan 2024
- 2024Communication-Efficient Personalized Federated Learning for Speech-to-Text Tasks18 Jan 2024
- 2023Towards Faster k-Nearest-Neighbor Machine Translation12 Dec 2023
- 2023Multilingual k-Nearest-Neighbor Machine Translation23 Oct 2023
- 2023knn-seq: Efficient, Extensible kNN-MT Framework18 Oct 2023
- 2023IMTLab: An Open-Source Platform for Building, Evaluating, and Diagnosing Interactive Machine Translation Systems17 Oct 2023
- 2023Towards Example-Based NMT with Multi-Levenshtein Transformers13 Oct 2023
- 2023Rethinking Translation Memory Augmented Neural Machine Translation12 Jun 2023
- 2023INK: Injecting kNN Knowledge in Nearest Neighbor Machine Translation10 Jun 2023
- 2023KIT's Multilingual Speech Translation System for IWSLT 20238 Jun 2023
- 2023Retrosynthesis Prediction with Local Template Retrieval7 Jun 2023
- 2023Bridging the Domain Gaps in Context Representations for k-Nearest Neighbor Neural Machine Translation26 May 2023
- 2023Non-parametric, Nearest-neighbor-assisted Fine-tuning for Neural Machine Translation23 May 2023
- 2023Nearest Neighbor Machine Translation is Meta-Optimizer on Output Projection Layer22 May 2023
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarization18 May 2023
- 2023Retrieval-Augmented Classification with Decoupled Representation23 Mar 2023
- 2023kNN-BOX: A Unified Framework for Nearest Neighbor Generation27 Feb 2023
- 2023Federated Nearest Neighbor Machine Translation23 Feb 2023
- 2023Simple and Scalable Nearest Neighbor Machine Translation23 Feb 2023
- 2023kNN-Adapter: Efficient Domain Adaptation for Black-Box Language Models21 Feb 2023
- 2023N-Gram Nearest Neighbor Machine Translation30 Jan 2023
- 2023Prompting Neural Machine Translation with Translation Memories13 Jan 2023
- 2022Better Datastore, Better Translation: Generating Datastores from Pre-Trained Models for Nearest Neural Machine Translation17 Dec 2022
- 2022Improving Few-Shot Performance of Language Models via Nearest Neighbor Calibration5 Dec 2022
- 2022What Knowledge Is Needed? Towards Explainable Memory for kNN-MT Domain Adaptation8 Nov 2022
- 2022You can't pick your neighbors, or can you? When and how to rely on retrieval in the kNN-LM28 Oct 2022
- 2022Towards Robust k-Nearest-Neighbor Machine Translation17 Oct 2022
- 2022Integrating Translation Memories into Non-Autoregressive Machine Translation12 Oct 2022
- 2022Improving Robustness of Retrieval Augmented Translation via Shuffling of Suggestions11 Oct 2022
- 2022Improving Retrieval Augmented Neural Machine Translation by Controlling Source and Fuzzy-Match Interactions10 Oct 2022
- 2022Blur the Linguistic Boundary: Interpreting Chinese Buddhist Sutra in English via Neural Machine Translation30 Sep 2022
- 2022Learning Decoupled Retrieval Representation for Nearest Neighbour Neural Machine Translation19 Sep 2022
- 2022Nearest Neighbor Non-autoregressive Text Generation26 Aug 2022
- 2022Training Language Models with Memory Augmentation25 May 2022
- 2022Chunk-based Nearest Neighbor Machine Translation24 May 2022
50 newest of 58 All 58 (JSON)
- 2022A Survey on Retrieval-Augmented Text Generationcited by 157
- 2024Retrieval-Augmented Generation for Natural Language Processing: A Surveycited by 70
- 2024Measuring and Enhancing Trustworthiness of LLMs in RAG through Grounded Attributions and Learning to Refusecited by 33
- 2022Improving Retrieval Augmented Neural Machine Translation by Controlling Source and Fuzzy-Match Interactionscited by 7
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarizationcited by 6
- 2022Improving Robustness of Retrieval Augmented Translation via Shuffling of Suggestionscited by 2
- 2023Towards Example-Based NMT with Multi-Levenshtein Transformerscited by 2
- 2024A Large Language Model-based Framework for Semi-Structured Tender Document Retrieval-Augmented Generationcited by 1
- 2025Long-Tail Crisis in Nearest Neighbor Language Modelscited by 1
- 2023Retrieval-Augmented Classification with Decoupled Representationcited by 0
- 2025Long-Tail Crisis in Nearest Neighbor Language Models28 Mar 2025
- 2024A Large Language Model-based Framework for Semi-Structured Tender Document Retrieval-Augmented Generation4 Oct 2024
- 2024Measuring and Enhancing Trustworthiness of LLMs in RAG through Grounded Attributions and Learning to Refuse17 Sep 2024
- 2024Retrieval-Augmented Generation for Natural Language Processing: A Survey18 Jul 2024
- 2023Towards Example-Based NMT with Multi-Levenshtein Transformers13 Oct 2023
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarization18 May 2023
- 2023Retrieval-Augmented Classification with Decoupled Representation23 Mar 2023
- 2022Improving Robustness of Retrieval Augmented Translation via Shuffling of Suggestions11 Oct 2022
- 2022Improving Retrieval Augmented Neural Machine Translation by Controlling Source and Fuzzy-Match Interactions10 Oct 2022
- 2022A Survey on Retrieval-Augmented Text Generation2 Feb 2022
- 2022Training Language Models with Memory Augmentationcited by 112
- 2022Efficient Cluster-Based k-Nearest-Neighbor Machine Translationcited by 24
- 2022Improving Few-Shot Performance of Language Models via Nearest Neighbor Calibrationcited by 24
- 2022Chunk-based Nearest Neighbor Machine Translationcited by 21
- 2024Non-Exchangeable Conformal Language Generation with Nearest Neighborscited by 21
- 2021Non-Parametric Unsupervised Domain Adaptation for Neural Machine Translationcited by 20
- 2021Layer-wise Model Pruning based on Mutual Informationcited by 19
- 2022You can't pick your neighbors, or can you? When and how to rely on retrieval in the kNN-LMcited by 18
- 2022Towards Robust k-Nearest-Neighbor Machine Translationcited by 15
- 2023Retrosynthesis Prediction with Local Template Retrievalcited by 15
- 2023kNN-Adapter: Efficient Domain Adaptation for Black-Box Language Modelscited by 13
- 2022Non-Parametric Domain Adaptation for End-to-End Speech Translationcited by 12
12 most cited of 47 All 47 (JSON)
- 2026Warranted Attention: Learning What to Pass from Attention to Prediction29 Jun 2026
- 2025Angular Dispersion Accelerates k-Nearest Neighbors Machine Translation20 Sep 2025
- 2025Label Distribution Learning-Enhanced Dual-KNN for Text Classification6 Mar 2025
- 2024A Debiased Nearest Neighbors Framework for Multi-Label Text Classification6 Aug 2024
- 2024Simply Trainable Nearest Neighbour Machine Translation with GPU Inference29 Jul 2024
- 2024Exploiting Pre-trained Models for Drug Target Affinity Prediction with Nearest Neighbors21 Jul 2024
- 2024Efficient k-Nearest-Neighbor Machine Translation with Dynamic Retrieval10 Jun 2024
- 2024Mind Your Neighbours: Leveraging Analogous Instances for Rhetorical Role Labeling for Legal Documents31 Mar 2024
- 2024Cross-lingual Contextualized Phrase Retrieval25 Mar 2024
- 2024Generating Diverse Translation with Perturbed kNN-MT14 Feb 2024
- 2024Non-Exchangeable Conformal Language Generation with Nearest Neighbors1 Feb 2024
- 2024NNOSE: Nearest Neighbor Occupational Skill Extraction30 Jan 2024
12 newest of 47 All 47 (JSON)