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łeft(N^2\right)$ to $Ołeft(N\right)$,
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.
Beschreibung
Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
%0 Generic
%1 katharopoulos2020transformers
%A Katharopoulos, Angelos
%A Vyas, Apoorv
%A Pappas, Nikolaos
%A Fleuret, François
%D 2020
%K rnn transformers
%T Transformers are RNNs: Fast Autoregressive Transformers with Linear
Attention
%U http://arxiv.org/abs/2006.16236
%X 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łeft(N^2\right)$ to $Ołeft(N\right)$,
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.
@misc{katharopoulos2020transformers,
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 $\mathcal{O}\left(N^2\right)$ to $\mathcal{O}\left(N\right)$,
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.},
added-at = {2023-07-07T20:21:08.000+0200},
author = {Katharopoulos, Angelos and Vyas, Apoorv and Pappas, Nikolaos and Fleuret, François},
biburl = {https://www.bibsonomy.org/bibtex/28bb0554f8a373062165d5e9287b260c8/wanderinglogic},
description = {Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention},
interhash = {60915034de79e9152675aaed9a814118},
intrahash = {8bb0554f8a373062165d5e9287b260c8},
keywords = {rnn transformers},
note = {cite arxiv:2006.16236Comment: ICML 2020, project at https://linear-transformers.com/},
timestamp = {2023-07-07T20:21:08.000+0200},
title = {Transformers are RNNs: Fast Autoregressive Transformers with Linear
Attention},
url = {http://arxiv.org/abs/2006.16236},
year = 2020
}