Improving Neural Machine Translation by Multi-Knowledge Integration with Prompting

Ke Wang, Jun Xie, Yuqi Zhang, Yu Zhao

Abstract: Improving neural machine translation (NMT) systems with prompting has achieved significant progress in recent years. In this work, we focus on how to integrate multi-knowledge, multiple types of knowledge, into NMT models to enhance the performance with prompting. We propose a unified framework, which can integrate effectively multiple types of knowledge including sentences, terminologies/phrases and translation templates into NMT models. We utilize multiple types of knowledge as prefix-prompts of input for the encoder and decoder of NMT models to guide the translation process. The approach requires no changes to the model architecture and effectively adapts to domain-specific translation without retraining. The experiments on English-Chinese and English-German translation demonstrate that our approach significantly outperform strong baselines, achieving high translation quality and terminology match accuracy.

Introduction

In professional translation workflows, human experts rarely work in isolation. They rely on external resources such as dictionaries, glossaries, and translation memories (databases of previously translated segments) to ensure accuracy and consistency. While Neural Machine Translation (NMT) has seen rapid advancement, effectively integrating these diverse external resources into a single, flexible system remains a significant challenge.

Existing research typically focuses on a single type of knowledge—such as terminology or similar sentences—and often requires complex architectural modifications, specialized decoding algorithms, or expensive domain-specific fine-tuning. This paper introduces a unified framework that treats external knowledge as a "prompt," allowing for the seamless integration of multiple knowledge types without altering the underlying model architecture.

Methodology

The core innovation of this work is the use of multi-knowledge prompting. Inspired by the success of prompting in Large Language Models (LLMs), the authors concatenate different types of external knowledge as prefixes to the input sequences of both the encoder and the decoder.

The Prompt Structure

As illustrated in Figure 1, the framework prepends knowledge to the source and target sequences:

  • Source Side (Encoder): Similar source sentences, source-side terminology, and source templates are prepended, separated by special tags like [Sentence], [Term], and [Template]. An [Input] tag marks the start of the actual sentence to be translated.
  • Target Side (Decoder): Corresponding target-side knowledge (e.g., translated terms and similar target sentences) is prepended, followed by an [Output] tag.
Overview of the multi-knowledge prompting framework for NMT.

Knowledge Types

  1. Sentence Knowledge: Retrieved from a translation memory using edit distance to find the most similar previously translated pairs.
  2. Terminology Knowledge: Extracted from bilingual dictionaries using a "soft match" strategy. This provides the model with multiple potential matches, allowing it to select the most contextually appropriate term.
  3. Translation Templates: Syntactic structures predicted by a separate model (based on mBART) to provide a structural "skeleton" for the translation.

Experimental Setup

The framework was evaluated on two major language pairs across multiple domains:

  • English-German (En-De): Trained on WMT16 (4.5M pairs) and tested on IT, Medical, Koran, and Law domains.
  • English-Chinese (En-Zh): Trained on CCMT2022 (8.2M pairs) and tested on Subtitles, News, and Education domains.

The training process follows a two-stage approach: first training a standard NMT model, then training on data augmented with these knowledge prompts. Crucially, the loss function is designed to only penalize errors on the actual target sentence, not the prompt itself.

Results and Discussion

The proposed method demonstrated substantial improvements across all tested domains and metrics. As shown in Figure 4, the multi-knowledge approach consistently outperformed vanilla NMT and several strong retrieval-based baselines.

Comparison of translation quality (BLEU) and terminology accuracy (Exact Match) across different domains.

Key Findings

  • Translation Quality: On English-German, the method improved BLEU scores by an average of 10.74 points over the vanilla NMT baseline. In several instances, it even outperformed domain-specific fine-tuning.
  • Terminology Accuracy: The "Exact Match" accuracy for terminology saw a dramatic increase, jumping from approximately 34.6% (vanilla) to 84.5% for English-German.
  • Complementary Knowledge: Ablation studies confirmed that terminology, similar sentences, and templates are complementary; using all three together yields better results than any single source in isolation.
  • Efficiency: Despite the increased sequence length from prompts, inference speed remains manageable, typically 1.6x to 1.9x slower than vanilla NMT. This is significantly more efficient than methods like kNN-MT, which can be orders of magnitude slower due to complex retrieval during decoding.

Conclusion

This work presents a robust, architecture-agnostic framework for integrating multi-source knowledge into NMT via prompting. By enabling zero-shot domain adaptation, the model can instantly adjust to new technical fields (like moving from legal to medical text) simply by updating the knowledge provided in the prompt. While the system's performance is inherently tied to the quality of the retrieved knowledge, it offers a highly portable and efficient solution for high-quality, domain-specific translation. Future work may explore incorporating monolingual data and extending this prompting logic to other multi-modal or complex reasoning tasks.

Summary updated

BibTeX
@inproceedings{wang2023improving,
  author = {Ke Wang and Jun Xie and Yuqi Zhang and Yu Zhao},
  title = {{Improving Neural Machine Translation by Multi-Knowledge Integration with Prompting}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=i7ifZu49kW},
}
Figure