Efficient Attention using a Fixed-Size Memory Representation
By Denny Britz, Melody Y. Guan, Minh-Thang Luong. 2017
32 citations recorded by the source corpus.
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% for real-world translation tasks and more for tasks with longer sequences. By visualizing attention scores we demonstrate that our models learn distinct, meaningful alignments.
Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Model Architectures, Efficiency & Compression
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Quoc V. Le
- Irwan Bello
- Yoshua Bengio
- Ruslan Salakhutdinov
- Luke S. Zettlemoyer
- Mohit Bansal
- Alec Radford
- Percy Liang
In Computer Vision and Pattern Recognition
- Luc Van Gool
- Xiaogang Wang
- Trevor Darrell
- Dacheng Tao
- Ming-Hsuan Yang
- Jitendra Malik
- Alan L. Yuille
- Andrea Vedaldi
In Model Architectures
- Irwan Bello
- Alec Radford
- Ilya Sutskever
- Rewon Child
- Franccois Fleuret
- Apoorv Vyas
- Angelos Katharopoulos
- Scott Gray
In Efficiency & Compression
- Irwan Bello
- Ilya Sutskever
- Alec Radford
- Scott Gray
- Franccois Fleuret
- Apoorv Vyas
- Angelos Katharopoulos
- Rewon Child
Citations in the corpus
- Generating Long Sequences with Sparse Transformers (2019, methodology): “Outside of generative modeling, there are several works relevant to improving the efficiency of attention based off chunking (Chiu & Raffel, 2017) or using fixed length representations (Britz et al., 2017).”
- LambdaNetworks: Modeling Long-Range Interactions Without Attention (2021, background): “Linear attention mechanisms date back to de Brébisson & Vincent (2016); Britz et al. (2017) and were later introduced in the visual domain by Chen et al. (2018); Shen et al. (2018).”
- Fast Transformers with Clustered Attention (2020, background): “[4] that propose to aggregate the information of the input sequence into fewer vectors and perform attention with these fewer vectors, thus speeding up the attention computation and reducing the memory requirements.”