Deep Fusing Pre-trained Models into Neural Machine Translation

Rongxiang Weng, Heng Yu, Weihua Luo, Min Zhang

Abstract

While pre-trained models (PTMs) have revolutionized Natural Language Processing, their impact on high-resource Neural Machine Translation (NMT) has been limited by the "objective gap" and inefficient "shallow fusion" strategies. This paper introduces a deep fusion framework that replaces the standard NMT encoder with a PTM. By employing a novel layer-wise coordination structure and a partitioned multi-task training strategy—incorporating masked language modeling and contrastive learning—the proposed method effectively transfers PTM knowledge to the translation task. Experimental results on WMT benchmarks show that the model achieves state-of-the-art performance (e.g., 31.59 BLEU on WMT14 En-De) with significantly fewer parameters than previous fusion methods.

Introduction

The integration of pre-trained models like BERT into NMT faces two primary hurdles. First, the Objective Gap: PTMs are trained on monolingual tasks, while NMT is a bilingual generation task. Simple fine-tuning often leads to "catastrophic forgetting," where the model loses general linguistic knowledge. Second, Shallow Fusion: Previous attempts often treated PTMs as static features or extra modules, increasing model complexity without fully exploiting internal representations. This paper addresses these issues by proposing a deep fusion architecture that treats the PTM as the primary encoding engine.

Deep Fusion Architecture

The core of the proposed approach is the replacement of the traditional NMT encoder with a PTM (such as mBERT). To facilitate information flow, a Coordinator module is introduced between the PTM and the NMT decoder.

The Deep Fusion architecture featuring the PTM encoder, Coordinator with layer-wise attention, and the NMT Decoder.

Layer-wise Coordination

Instead of feeding only the final PTM layer to the decoder, the Coordinator aggregates multiple PTM layers into "parts." A Layer-wise Attention mechanism allows each decoder layer to dynamically select relevant information from these parts. This multi-to-multi connection ensures that the decoder can access both low-level lexical features and high-level semantic information stored across different PTM layers.

Partitioned Multi-task Training

To bridge the gap between monolingual pre-training and bilingual translation, the authors utilize three auxiliary tasks alongside the standard NMT loss:

  • Masked Language Model (MLM): Preserves the PTM's original linguistic features to prevent forgetting.
  • Target Word Prediction (TWP): Encourages the PTM to learn lexical-level bilingual alignment.
  • Target Sentence Prediction (TSP): Uses contrastive learning to align source and target sentence representations in the vector space.

Experimental Evaluation

The model was evaluated on standard WMT benchmarks, including English-to-German (En→De), English-to-French (En→Fr), and Romanian-to-English (Ro→En).

Comparison of the proposed model against various NMT baselines on WMT14 En-De and En-Fr benchmarks.

Key Results

  • State-of-the-Art Performance: On WMT14 En→De, the model achieved 31.59 BLEU, significantly outperforming the Transformer-Big baseline (28.4) and previous PTM-fusion methods like BERT-fused NMT (30.75).
  • Parameter Efficiency: Despite its superior performance, the model is highly efficient. It utilizes only 171M parameters, compared to the ~500M parameters required by the BERT-fused approach.
  • Fast Convergence: The model benefits from high-quality PTM initialization, reaching competitive BLEU scores much earlier in the training process than standard Transformers.

Discussion and Conclusion

The success of this method highlights that PTMs are most effective when integrated as the primary encoder rather than as auxiliary features. The inclusion of bilingual signals through TWP and TSP tasks is crucial for adapting monolingual knowledge to cross-lingual generation.

While the results for encoders are promising, the authors noted that initializing NMT decoders with PTMs (like GPT) remains a challenge due to representation mismatches. Future work may explore "prompt learning" as a potential way to better utilize pre-trained decoders. Overall, this deep fusion framework provides a robust and efficient path for utilizing large-scale pre-training in high-resource machine translation.

Summary updated

BibTeX
@inproceedings{weng2022deep,
  author = {Rongxiang Weng and Heng Yu and Weihua Luo and Min Zhang},
  title = {{Deep Fusing Pre-trained Models into Neural Machine Translation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i10.21399},
}
Figure