Recurrent Memory Transformer
Aydar Bulatov, Yuri Kuratov, Mikhail S. Burtsev

TL;DR
The Recurrent Memory Transformer enhances sequence modeling by integrating memory mechanisms, enabling better handling of long-term dependencies and longer sequences without increasing computational complexity.
Contribution
This work introduces a memory-augmented recurrent Transformer with memory tokens, improving long-sequence processing and passing information across segments without altering the core Transformer architecture.
Findings
Performs comparably to Transformer-XL on language modeling with smaller memory.
Outperforms Transformer-XL on tasks requiring longer sequences.
Adding memory tokens improves Transformer-XL's performance.
Abstract
Transformer-based models show their effectiveness across multiple domains and tasks. The self-attention allows to combine information from all sequence elements into context-aware representations. However, global and local information has to be stored mostly in the same element-wise representations. Moreover, the length of an input sequence is limited by quadratic computational complexity of self-attention. In this work, we propose and study a memory-augmented segment-level recurrent Transformer (RMT). Memory allows to store and process local and global information as well as to pass information between segments of the long sequence with the help of recurrence. We implement a memory mechanism with no changes to Transformer model by adding special memory tokens to the input or output sequence. Then the model is trained to control both memory operations and sequence representations…
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
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Multimodal Machine Learning Applications
MethodsMulti-Head Attention · Attention Is All You Need · *Communicated@Fast*How Do I Communicate to Expedia? · Linear Layer · Softmax · Absolute Position Encodings · Byte Pair Encoding · Position-Wise Feed-Forward Layer · Variational Dropout · Adam
