PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
June 29, 2020310 citationsOpen Access

Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention

AKAngelos KatharopoulosAVApoorv VyasNPNikolaos Pappas

Key Points

Key points are not available for this paper at this time.

Abstract

Transformers achieve remarkable performance in several tasks but due to their quadratic complexity, with respect to the input's length, they are prohibitively slow for very long sequences. To address this limitation, we express the self-attention as a linear dot-product of kernel feature maps and make use of the associativity property of matrix products to reduce the complexity from O (N²) to O (N), where N is the sequence length. We show that this formulation permits an iterative implementation that dramatically accelerates autoregressive transformers and reveals their relationship to recurrent neural networks. Our linear transformers achieve similar performance to vanilla transformers and they are up to 4000x faster on autoregressive prediction of very long sequences.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Katharopoulos et al. (2020) studied this question.

synapsesocial.com/papers/6a0ecbf89df4132b62f9b7f6https://doi.org/10.48550/arxiv.2006.16236
Ask AI
Helpful
Bookmark
Share
View Full Paper