Reformer: The Efficient Transformer
Nikita Kitaev, {\L}ukasz Kaiser, Anselm Levskaya

TL;DR
The Reformer introduces locality-sensitive hashing attention and reversible residual layers to significantly improve the efficiency and memory usage of Transformer models, especially on long sequences, without sacrificing performance.
Contribution
It presents a novel combination of hashing-based attention and reversible layers to enhance Transformer efficiency and scalability.
Findings
Achieves comparable performance to standard Transformers.
Reduces memory usage during training.
Speeds up processing of long sequences.
Abstract
Large Transformer models routinely achieve state-of-the-art results on a number of tasks but training these models can be prohibitively costly, especially on long sequences. We introduce two techniques to improve the efficiency of Transformers. For one, we replace dot-product attention by one that uses locality-sensitive hashing, changing its complexity from O() to O(), where is the length of the sequence. Furthermore, we use reversible residual layers instead of the standard residuals, which allows storing activations only once in the training process instead of times, where is the number of layers. The resulting model, the Reformer, performs on par with Transformer models while being much more memory-efficient and much faster on long sequences.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Reformer: The Efficient Transformer· youtube
Taxonomy
TopicsAdvanced Image and Video Retrieval Techniques · Multimodal Machine Learning Applications · Advanced Neural Network Applications
MethodsLinear Layer · Absolute Position Encodings · Position-Wise Feed-Forward Layer · Adafactor · Reversible Residual Block · Residual Connection · SentencePiece · Refunds@Expedia|||How do I get a full refund from Expedia? · Locality Sensitive Hashing Attention · Reformer
