Efficient Attention using a Fixed-Size Memory Representation

07/01/2017
by   Denny Britz, et al.
0

The standard content-based attention mechanism typically used in sequence-to-sequence models is computationally expensive as it requires the comparison of large encoder and decoder states at each time step. In this work, we propose an alternative attention mechanism based on a fixed size memory representation that is more efficient. Our technique predicts a compact set of K attention contexts during encoding and lets the decoder compute an efficient lookup that does not need to consult the memory. We show that our approach performs on-par with the standard attention mechanism while yielding inference speedups of 20 sequences. By visualizing attention scores we demonstrate that our models learn distinct, meaningful alignments.

READ FULL TEXT
research
08/11/2018

Pervasive Attention: 2D Convolutional Neural Networks for Sequence-to-Sequence Prediction

Current state-of-the-art machine translation systems are based on encode...
research
09/19/2016

A Cheap Linear Attention Mechanism with Fast Lookups and Fixed-Size Representations

The softmax content-based attention mechanism has proven to be very bene...
research
05/23/2017

Local Monotonic Attention Mechanism for End-to-End Speech and Language Processing

Recently, encoder-decoder neural networks have shown impressive performa...
research
06/07/2019

Assessing incrementality in sequence-to-sequence models

Since their inception, encoder-decoder models have successfully been app...
research
06/28/2023

Sequential Attention Source Identification Based on Feature Representation

Snapshot observation based source localization has been widely studied d...
research
04/03/2017

Neural Lattice-to-Sequence Models for Uncertain Inputs

The input to a neural sequence-to-sequence model is often determined by ...
research
10/31/2018

You May Not Need Attention

In NMT, how far can we get without attention and without separate encodi...

Please sign up or login with your details

Forgot password? Click here to reset