Skip to main content
QUICK REVIEW

[Paper Review] Efficient Cluster-Based k-Nearest-Neighbor Machine Translation

Dexin Wang, Kai Fan|ArXiv.org|Apr 13, 2022
Natural Language Processing TechniquesComputer Science5 citations
TL;DR

This paper proposes a cluster-based Compact Network and a cluster-based pruning strategy to accelerate k-nearest-neighbor machine translation (kNN-MT), reducing feature dimension by up to 93.75% and datastore size by 10%–40% while maintaining or improving translation quality. The method achieves up to 57% lower inference latency than state-of-the-art non-parametric MT models on multiple benchmarks.

ABSTRACT

k-Nearest-Neighbor Machine Translation (kNN-MT) has been recently proposed as a non-parametric solution for domain adaptation in neural machine translation (NMT). It aims to alleviate the performance degradation of advanced MT systems in translating out-of-domain sentences by coordinating with an additional token-level feature-based retrieval module constructed from in-domain data. Previous studies have already demonstrated that non-parametric NMT is even superior to models fine-tuned on out-of-domain data. In spite of this success, kNN retrieval is at the expense of high latency, in particular for large datastores. To make it practical, in this paper, we explore a more efficient kNN-MT and propose to use clustering to improve the retrieval efficiency. Concretely, we first propose a cluster-based Compact Network for feature reduction in a contrastive learning manner to compress context features into 90+% lower dimensional vectors. We then suggest a cluster-based pruning solution to filter out 10%-40% redundant nodes in large datastores while retaining translation quality. Our proposed methods achieve better or comparable performance while reducing up to 57% inference latency against the advanced non-parametric MT model on several machine translation benchmarks. Experimental results indicate that the proposed methods maintain the most useful information of the original datastore and the Compact Network shows good generalization on unseen domains.

Motivation & Objective

  • To address high inference latency in kNN-MT caused by large datastores and inefficient retrieval.
  • To improve retrieval effectiveness by learning more separable, compact semantic clusters in the feature space.
  • To reduce datastore redundancy through a principled pruning strategy that preserves translation quality.
  • To enable efficient, scalable non-parametric domain adaptation in neural machine translation without performance degradation.
  • To demonstrate that contrastive learning-based feature compression and cluster-aware pruning can jointly enhance speed and accuracy.

Proposed method

  • A cluster-based Compact Network is trained via contrastive learning to compress high-dimensional context features into lower-dimensional vectors, reducing dimensionality by up to 93.75%.
  • The Compact Network maximizes inter-cluster margin and minimizes intra-cluster distance to improve semantic separability for kNN retrieval.
  • A cluster-based pruning strategy identifies and removes redundant keys in the datastore by analyzing cluster density and semantic relevance.
  • Pruning is guided by cluster structure to retain high-quality, diverse representations while discarding low-utility or overlapping entries.
  • The method integrates with adaptive kNN-MT, allowing dynamic k selection and retrieval from the pruned, compressed datastore at inference.
  • The approach is evaluated on multiple NMT benchmarks, including IT and Subtitles domains, with ablation on pruning rates and feature compression.

Experimental results

Research questions

  • RQ1Can contrastive learning-based feature compression significantly reduce kNN-MT inference latency while preserving translation quality?
  • RQ2Does cluster-aware pruning of the datastore reduce redundancy and improve retrieval efficiency without BLEU degradation?
  • RQ3How does the combination of feature compression and pruning affect performance across diverse out-of-domain test sets?
  • RQ4Can the proposed method maintain generalization to unseen domains despite aggressive dimensionality reduction and pruning?
  • RQ5What is the trade-off between pruning rate, latency reduction, and translation performance in large-scale kNN-MT systems?

Key findings

  • The proposed Compact Network reduces feature dimension by up to 93.75% while maintaining or improving translation quality on multiple benchmarks.
  • The cluster-based pruning strategy removes 10%–40% of datastore keys with no significant BLEU degradation, reducing inference latency by up to 57%.
  • PCKMT* with 30% pruning achieves 0.36 BLEU improvement and 1.56x faster speed than the adaptive kNN-MT baseline on the Subtitles domain.
  • The method outperforms random pruning, with PCKMT*+Ours maintaining performance at pruning rates up to 70%, while random pruning degrades sharply beyond 50%.
  • t-SNE visualization confirms that the Compact Network produces more separable, compact clusters, reducing semantic overlap in the feature space.
  • On the IT domain, the method reduces datastore storage from 295.2GB to 12.2GB (via quantization) and further to 6.5GB with 70% pruning, with minimal BLEU loss.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.