Language Models are Good Translators

Shuo Wang, Zhaopeng Tu, Zhixing Tan, Wenxuan Wang, Maosong Sun, Yang LiuarXiv 2021

Introduction

Neural Machine Translation (NMT) has long been dominated by the encoder-decoder Transformer architecture. While large-scale language models (LMs) like GPT-3 have demonstrated translation capabilities, they typically require massive parameter counts and in-context examples to match specialized NMT models. Researchers from Tsinghua University and Tencent AI Lab propose LM4MT, a decoder-only language model that achieves state-of-the-art translation performance at standard model scales by treating translation as a sequence-completion task.

The LM4MT Architecture

Unlike traditional models that separate source encoding and target decoding, LM4MT utilizes a single, deep decoder-only Transformer. The source sentence ($x$) and target sentence ($y$) are concatenated into a unified sequence, separated by special language-specific tags (e.g., <X> source <Y> target </s>).

Comparison of traditional encoder-decoder NMT (a) and the proposed LM4MT architecture during training (b) and inference (c).

By using a shared self-attention mechanism for both languages, LM4MT closes the "representation gap" inherent in dual-component architectures. This unified representation space facilitates more efficient knowledge transfer between languages compared to an encoder-decoder setup where components may develop disparate internal representations.

Decaying Auto-Encoding Loss

A key challenge in training a decoder-only model for translation is balancing source reconstruction with target prediction. Simply adding a source-reconstruction loss ($L^{AE}$) can sometimes degrade final translation quality. To address this, the authors introduce a Decaying Auto-Encoding Loss schedule ($\lambda_d$).

Early in training, the model focuses heavily on understanding and reconstructing the source language. As training progresses, the weight of this task ($\lambda_d$) drops, allowing the model to focus entirely on the translation task ($L^{MT}$).

Training perplexity comparison showing that the decaying auto-encoding loss ($\lambda_d L^{AE} + L^{MT}$) achieves the lowest perplexity compared to standard MT loss or a fixed combined loss.

As shown in the perplexity curves, this decaying schedule leads to better convergence than either the standard MT loss or a fixed combination of tasks.

Experimental Results

LM4MT was evaluated across low, medium, and high-resource benchmarks, including WMT16 English-Romanian, WMT14 English-German, and WMT14 English-French.

  • Performance Parity: On WMT14 English-German, LM4MT-Big achieved 29.3 BLEU, matching the performance of the standard Transformer-Big while utilizing a simpler architecture.
  • Zero-Shot Superiority: LM4MT significantly outperformed traditional models in zero-shot scenarios (e.g., translating between language pairs not seen directly during training). For German-to-French translation, it reached 29.5 BLEU compared to the baseline's 23.8 BLEU.
  • Language Consistency: In zero-shot tasks, LM4MT translated into the correct target language over 97% of the time, whereas the baseline Transformer often fell below 80%.
  • Robustness: The model proved highly resilient to noisy inputs. When 50% of source words were deleted, LM4MT maintained a BLEU score of 14.2, whereas the standard Transformer dropped to 11.8.

Conclusion

LM4MT demonstrates that the specialized encoder-decoder architecture is not strictly necessary for high-quality machine translation. By leveraging a unified decoder-only Transformer and a strategic decaying loss schedule, LM4MT matches traditional NMT performance while offering superior zero-shot generalization and robustness. Future work may explore the integration of massive monolingual datasets, which LMs are uniquely suited to exploit, to further widen the performance gap.

Summary updated

BibTeX
@misc{wang2021language,
  author = {Shuo Wang and Zhaopeng Tu and Zhixing Tan and Wenxuan Wang and Maosong Sun and Yang Liu},
  title = {{Language Models are Good Translators}},
  year = {2021},
  eprint = {2106.13627},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.13627},
}
Figure