Monotonic Multihead Attention

Xutai Ma, Juan Pino, James Cross, Liezl Puzon, Jiatao Gu
9/26/2019
cs.CL

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

Abstract

Simultaneous machine translation models start generating a target sequence before they have encoded or read the source sequence. Recent approaches for this task either apply a fixed policy on a state-of-the art Transformer model, or a learnable monotonic attention on a weaker recurrent neural network-based structure. In this paper, we propose a new attention mechanism, Monotonic Multihead Attention (MMA), which extends the monotonic attention mechanism to multihead attention. We also introduce two novel and interpretable approaches for latency control that are specifically designed for multiple attentions heads. We apply MMA to the simultaneous machine translation task and demonstrate better latency-quality tradeoffs compared to MILk, the previous state-of-the-art approach. We also analyze how the latency controls affect the attention span and we motivate the introduction of our model by analyzing the effect of the number of decoder layers and heads on quality and latency.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

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

32,2136,667C++, LuaAug 29, 20171 years agoMIT
artificial-intelligencepythonpytorch

Similar Papers

Cite this paper

@article{ma2019monotonic,
  title  = {Monotonic Multihead Attention},
  author = {Xutai Ma and Juan Pino and James Cross and Liezl Puzon and Jiatao Gu},
  year   = {2019},
  eprint = {1909.12406},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1909.12406}
}

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.12406.svg)](https://codeofpaper.com/paper/1909.12406)

Discussion