Jointly Learning to Align and Translate with Transformer Models

Sarthak Garg, Stephan Peitz, Udhyakumar Nallasamy, Matthias Paulik
9/4/2019
cs.CL
transformer-attention

Official code: facebookresearch/fairseq (32,206 stars, Python, MIT, PyTorch, last commit 2025-09-30).

Abstract

The state of the art in machine translation (MT) is governed by neural approaches, which typically provide superior translation accuracy over statistical approaches. However, on the closely related task of word alignment, traditional statistical word alignment models often remain the go-to solution.

Show full abstract

In this paper, we present an approach to train a Transformer model to produce both accurate translations and alignments. We extract discrete alignments from the attention probabilities learnt during regular neural machine translation model training and leverage them in a multi-task framework to optimize towards translation and alignment objectives. We demonstrate that our approach produces competitive results compared to GIZA++ trained IBM alignment models without sacrificing translation accuracy and outperforms previous attempts on Transformer model based word alignment. Finally, by incorporating IBM model alignments into our multi-task training, we report significantly better alignment accuracies compared to GIZA++ on three publicly available data sets.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Facebook AI Research Sequence-to-Sequence Toolkit written in Python.

32,2066,661Python, CudaAug 29, 20171 years agoMIT
artificial-intelligencepythonpytorch

Similar Papers

Cite this paper

@article{garg2019jointly,
  title  = {Jointly Learning to Align and Translate with Transformer Models},
  author = {Sarthak Garg and Stephan Peitz and Udhyakumar Nallasamy and Matthias Paulik},
  year   = {2019},
  eprint = {1909.02074},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1909.02074}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1909.02074.svg)](https://codeofpaper.com/paper/1909.02074)

Discussion