[Paper Review] Search Engine Guided Non-Parametric Neural Machine Translation
This paper proposes Search Engine Guided Neural Machine Translation (SEG-NMT), a non-parametric extension of attention-based NMT that retrieves relevant training sentence pairs via a black-box search engine and fuses them with the source sentence during decoding. The method significantly improves translation quality—especially with high-quality retrievals—achieving up to 5.21 BLEU points improvement over strong baselines on En-Fr and En-De.
In this paper, we extend an attention-based neural machine translation (NMT) model by allowing it to access an entire training set of parallel sentence pairs even after training. The proposed approach consists of two stages. In the first stage--retrieval stage--, an off-the-shelf, black-box search engine is used to retrieve a small subset of sentence pairs from a training set given a source sentence. These pairs are further filtered based on a fuzzy matching score based on edit distance. In the second stage--translation stage--, a novel translation model, called translation memory enhanced NMT (TM-NMT), seamlessly uses both the source sentence and a set of retrieved sentence pairs to perform the translation. Empirical evaluation on three language pairs (En-Fr, En-De, and En-Es) shows that the proposed approach significantly outperforms the baseline approach and the improvement is more significant when more relevant sentence pairs were retrieved.
Motivation & Objective
- To extend neural machine translation by enabling access to the full training set of parallel sentence pairs even after training, improving translation quality through retrieval-based knowledge infusion.
- To address the scalability challenge of large-scale parallel corpora by integrating an off-the-shelf search engine for efficient retrieval of relevant training examples.
- To design a neural translation model that seamlessly fuses information from both the input source sentence and a set of retrieved source-target pairs to improve translation consistency and accuracy.
- To evaluate the effectiveness of retrieval-augmented NMT in a domain-specific setting using the JRC-Acquis legal corpus across multiple language pairs.
- To investigate the impact of retrieval quality and number of retrieved pairs on translation performance, particularly in low-resource or domain-specific scenarios.
Proposed method
- Utilizes an off-the-shelf, black-box search engine to retrieve a small subset of relevant training sentence pairs from a large parallel corpus based on the input source sentence.
- Applies a fuzzy matching score based on edit distance to filter and refine the retrieved sentence pairs, ensuring relevance to the input source.
- Employs a novel translation model, SEG-NMT, that performs shallow fusion by combining the source sentence and retrieved pairs through a gating mechanism (Eq. 6) to attend to both streams simultaneously.
- Uses a dual-attention mechanism: one for the standard encoder-decoder attention over the source sentence, and another for attending to the retrieved target-side tokens via a key-value memory structure.
- Implements a greedy selection algorithm (Algorithm 1) to adaptively choose the most relevant retrieved pairs during inference, optimizing for retrieval quality.
- Employs a fixed-size memory buffer for retrieved pairs, with preprocessing to pre-populate the memory for all training pairs, minimizing runtime overhead.
Experimental results
Research questions
- RQ1Can a neural machine translation system effectively leverage a full training corpus during inference by retrieving relevant sentence pairs, rather than relying solely on the trained model?
- RQ2How does the quality of retrieved training pairs (measured by fuzzy matching scores) affect the translation performance of the proposed model?
- RQ3What is the optimal number of retrieved translation pairs for maximizing translation quality, and does performance degrade with excessive or irrelevant retrieval?
- RQ4How does the proposed shallow fusion mechanism compare to deep fusion in terms of translation quality and robustness?
- RQ5To what extent does the retrieval-augmented model improve translation consistency and lexical choice compared to standard attention-based NMT?
Key findings
- The proposed SEG-NMT model achieves a BLEU score improvement of 5.21 over the baseline on the En-Fr direction and 4.95 on En-De, demonstrating significant gains from retrieval-augmented translation.
- Translation quality increases with the number of retrieved pairs up to approximately four, after which performance degrades due to inclusion of less relevant pairs.
- The best performance is achieved when using the proposed greedy selection algorithm (Algorithm 1), which retrieves an average of 4.814 relevant pairs per inference, maximizing utility.
- Shallow fusion (Eq. 6) outperforms deep fusion by a large margin, with improvements of 5.21 and 4.95 BLEU points, indicating that the gating mechanism effectively balances source and retrieved information.
- The model exhibits improved lexical consistency, often adopting vocabulary and phrasing from retrieved pairs—e.g., translating "précis" as "exact" when that term appears in a retrieved pair—leading to more coherent and corpus-consistent translations.
- The retrieval stage incurs negligible computational overhead (several milliseconds per query), and the translation stage maintains constant complexity with a bounded number of retrieved pairs, making the system efficient and practical for real-world deployment.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.