Chunk-based Nearest Neighbor Machine Translation
Pedro Henrique Martins, Zita Marinho, André F. T. Martins
Abstract
Semi-parametric models, which augment generation with retrieval, have led to impressive results in language modeling and machine translation, due to their ability to retrieve fine-grained information from a datastore of examples. One of the most prominent approaches, kNN-MT, exhibits strong domain adaptation capabilities by retrieving tokens from domain-specific datastores (Khandelwal et al., 2021) . However, kNN-MT requires an expensive retrieval operation for every single generated token, leading to a very low decoding speed (around 8 times slower than a parametric model). In this paper, we introduce a chunk-based kNN-MT model which retrieves chunks of tokens from the datastore, instead of a single token. We propose several strategies for incorporating the retrieved chunks into the generation process, and for selecting the steps at which the model needs to search for neighbors in the datastore. Experiments on machine translation in two settings, static and "on-the-fly" domain adaptation, show that the chunk-based kNN-MT model leads to significant speed-ups (up to 4 times) with only a small drop in translation quality. 1
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
10 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Improving Language Models by Retrieving from Trillions of Tokens cites Generalization through Memorization: Nearest Neighbor Language Models
- Improving Language Models by Retrieving from Trillions of Tokens cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Prompting Neural Machine Translation with Translation Memories cites Unsupervised Domain Clusters in Pretrained Language Models
- Prompting Neural Machine Translation with Translation Memories cites Nearest Neighbor Machine Translation
- RECOMP: Improving Retrieval-Augmented LMs with Context Compression and Selective Augmentation cites Improving Language Models by Retrieving from Trillions of Tokens
- RECOMP: Improving Retrieval-Augmented LMs with Context Compression and Selective Augmentation cites Generalization through Memorization: Nearest Neighbor Language Models
- RECOMP: Improving Retrieval-Augmented LMs with Context Compression and Selective Augmentation cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Simple and Scalable Nearest Neighbor Machine Translation cites Generalization through Memorization: Nearest Neighbor Language Models
- Simple and Scalable Nearest Neighbor Machine Translation cites Nearest Neighbor Machine Translation
- Simple and Scalable Nearest Neighbor Machine Translation cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Subset Retrieval Nearest Neighbor Machine Translation cites Improving Language Models by Retrieving from Trillions of Tokens
- Subset Retrieval Nearest Neighbor Machine Translation cites Unsupervised Domain Clusters in Pretrained Language Models
- Subset Retrieval Nearest Neighbor Machine Translation cites Generalization through Memorization: Nearest Neighbor Language Models
- Subset Retrieval Nearest Neighbor Machine Translation cites Simple and Scalable Nearest Neighbor Machine Translation
- Subset Retrieval Nearest Neighbor Machine Translation cites Nearest Neighbor Machine Translation
- Nearest Neighbor Machine Translation cites Unsupervised Domain Clusters in Pretrained Language Models
- Nearest Neighbor Machine Translation cites Generalization through Memorization: Nearest Neighbor Language Models
- Nearest Neighbor Machine Translation cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks cites Generalization through Memorization: Nearest Neighbor Language Models
- Nearest Neighbor Speculative Decoding for LLM Generation and Attribution cites Improving Language Models by Retrieving from Trillions of Tokens
- Nearest Neighbor Speculative Decoding for LLM Generation and Attribution cites Generalization through Memorization: Nearest Neighbor Language Models
- Nearest Neighbor Speculative Decoding for LLM Generation and Attribution cites Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks
Cited by top-tier papers10
- RECOMP: Improving Retrieval-Augmented LMs with Context Compression and Selective AugmentationFangyuan Xu, Weijia Shi, Eunsol ChoiICLR 2024 · 260 citations
- Nearest Neighbor Speculative Decoding for LLM Generation and AttributionMinghan Li, Xilun Chen, Ari Holtzman, Beidi Chen et al.NeurIPS 2024 · 29 citations
- Prompting Neural Machine Translation with Translation MemoriesAbudurexiti Reheman, Tao Zhou, Yingfeng Luo, Di Yang et al.AAAI 2023 · 11 citations
- Simple and Scalable Nearest Neighbor Machine TranslationYuhan Dai, Zhirui Zhang, Qiuzhi Liu, Qu Cui et al.ICLR 2023 · 9 citations
- Subset Retrieval Nearest Neighbor Machine TranslationHiroyuki Deguchi, Taro Watanabe, Yusuke Matsui, Masao Utiyama et al.ACL 2023 · 7 citations
Builds on9
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- Improving Language Models by Retrieving from Trillions of TokensSebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai et al.ICML 2022 · 1,629 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
- Unsupervised Domain Clusters in Pretrained Language ModelsRoee Aharoni, Yoav GoldbergACL 2020 · 13 citations
Related papers
- Fast Nearest Neighbor Machine TranslationYuxian Meng, Xiaoya Li, Xiayu Zheng, Fei Wu et al.ACL Findings 2022 · 32 citations
- Efficient Cluster-Based k-Nearest-Neighbor Machine TranslationDexin Wang, Kai Fan, Boxing Chen, Deyi XiongACL 2022 · 35 citations
- Efficient k-Nearest-Neighbor Machine Translation with Dynamic RetrievalYan Gao, Zhiwei Cao, Zhongjian Miao, Baosong Yang et al.ACL Findings 2024 · 1 citation
- 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
- Nearest Neighbor Machine Translation is Meta-Optimizer on Output Projection LayerRuize Gao, Zhirui Zhang, Yichao Du, Lemao Liu et al.EMNLP 2023 · 3 citations
