HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

Incorporating BERT into Neural Machine Translation

Jinhua Zhu Yingce Xia Lijun Wu Di He Tao Qin Wengang Zhou Houqiang Li Tie-Yan Liu

Incorporating BERT into Neural Machine Translation

Abstract

The recently proposed BERT has shown great power on a variety of natural language understanding tasks, such as text classification, reading comprehension, etc. However, how to effectively apply BERT to neural machine translation (NMT) lacks enough exploration. While BERT is more commonly used as fine-tuning instead of contextual embedding for downstream language understanding tasks, in NMT, our preliminary exploration of using BERT as contextual embedding is better than using for fine-tuning. This motivates us to think how to better leverage BERT for NMT along this direction. We propose a new algorithm named BERT-fused model, in which we first use BERT to extract representations for an input sequence, and then the representations are fused with each layer of the encoder and decoder of the NMT model through attention mechanisms. We conduct experiments on supervised (including sentence-level and document-level translations), semi-supervised and unsupervised machine translation, and achieve state-of-the-art results on seven benchmark datasets. Our code is available at \url{https://github.com/bert-nmt/bert-nmt}.

Code Repositories

bert-nmt/bert-nmt
Official
pytorch
StuartCHAN/KARL
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
machine-translation-on-wmt2014-english-frenchBERT-fused NMT
BLEU score: 43.78
machine-translation-on-wmt2014-english-germanBERT-fused NMT
BLEU score: 30.75
unsupervised-machine-translation-on-wmt2014-2BERT-fused NMT
BLEU: 38.27
unsupervised-machine-translation-on-wmt2016-5BERT-fused NMT
BLEU: 36.02

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp