Online and Linear-Time Attention by Enforcing Monotonic Alignments

Colin Raffel, Minh-Thang Luong, Peter J. Liu, Ron J. Weiss, Douglas Eck
4/3/2017
cs.LGcs.CL

Official code: craffel/mad (93 stars, Apache-2.0, last commit 2018-05-02).

Abstract

Recurrent neural network models with an attention mechanism have proven to be extremely effective on a wide variety of sequence-to-sequence problems. However, the fact that soft attention mechanisms perform a pass over the entire input sequence when producing each element in the output sequence precludes their use in online settings and results in a quadratic time complexity. Based on the insight that the alignment between input and output sequence elements is monotonic in many problems of interest, we propose an end-to-end differentiable method for learning monotonic alignments which, at test time, enables computing attention online and in linear time. We validate our approach on sentence summarization, machine translation, and online speech recognition problems and achieve results competitive with existing sequence-to-sequence models.

View on arXivView PDF

Code Implementations(1)

craffel/madOfficial100%
Apache-2.0

Code for "Online and Linear Time Attention by Enforcing Monotonic Alignments"

9314C++, PythonMar 9, 20178 years agoApache-2.0

Similar Papers

Cite this paper

@article{raffel2017online,
  title  = {Online and Linear-Time Attention by Enforcing Monotonic Alignments},
  author = {Colin Raffel and Minh-Thang Luong and Peter J. Liu and Ron J. Weiss and Douglas Eck},
  year   = {2017},
  eprint = {1704.00784},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1704.00784}
}

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

Discussion