Reproduce “Online and Linear-Time Attention by Enforcing Monotonic Alignments” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Colin Raffel, Minh-Thang Luong, Peter J. Liu, Ron J. Weiss, Douglas Eck

Researchers at Google Brain developed an attention mechanism for sequence-to-sequence models that enforces hard monotonic alignments, enabling online and linear-time decoding. This approach achieved competitive performance with conventional soft attention across speech recognition, summarization, and machine translation tasks, while demonstrating up to a 40x speedup in inference time.

Key insights

  • Soft attention can be reinterpreted as an expectation of a stochastic process, allowing for the design of alternative processes that enforce specific constraints like monotonicity.
  • Hard monotonic alignment decisions, crucial for online and linear-time processing, can be effectively learned in expectation through a differentiable recurrence, bridging the gap between efficient inference and standard gradient-based training.
  • For numerous sequence-to-sequence tasks, strict or near-strict monotonic alignments are sufficient for strong performance, yielding substantial computational savings without a prohibitive accuracy cost.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.