Memformer: A Memory-Augmented Transformer for Sequence Modeling
By Qingyang Wu, Zhenzhong Lan, Kun Qian, Jing Gu, Alborz Geramifard, Zhou Yu. 2020
79 citations recorded by the source corpus.
Transformers have reached remarkable success in sequence modeling. However, these models have efficiency issues as they need to store all the history token-level representations as memory. We present Memformer, an efficient neural network for sequence modeling, that utilizes an external dynamic memory to encode and retrieve past information. Our model achieves linear time complexity and constant memory space complexity when processing long sequences. We also propose a new optimization scheme, memory replay back-propagation (MRBP), which promotes long-range back-propagation through time with a significantly reduced memory requirement. Experimental results show that Memformer has achieved comparable performance compared to the baselines by using 8.1x less memory space and 3.2x faster on inference. Analysis of the attention pattern shows that our external memory slots can encode and retain important information through timesteps.
Subfields: Artificial Intelligence, Model Architectures
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
- Yuandong Tian
- Shouyuan Chen
- Sherman Wong
- Liangjian Chen
- Boris Ginsburg
- Martin Jaggi
- Samuel Kriman
- Amirkeivan Mohtashami
In Model Architectures
- Yuandong Tian
- Shouyuan Chen
- Sherman Wong
- Liangjian Chen
- Boris Ginsburg
- Samuel Kriman
- Amirkeivan Mohtashami
- Fei Jia
Citations in the corpus
- Landmark Attention: Random-Access Infinite Context Length for Transformers (2023, methodology): “Various methods have been proposed to introduce memorization capabilities to Transformers through recurrence [5, 38].”
- Extending Context Window of Large Language Models via Positional Interpolation (2023, background): “Several works add memory capabilities to Transformers through recurrence, which increase the models’ capability of handling very long sequences (Bulatov et al., 2022; Wu et al., 2020; Dai et al., 2019; Wu et al., 2022; Martins et al., 2021; Mu et al., 2023).”
- RULER: What's the Real Context Size of Your Long-Context Language Models? (2024, methodology): “This can be achieved by caching previous context using recurrence mechanism (Zhang et al., 2024a; Bulatov et al., 2023; Martins et al., 2022; Wu et al., 2022), retrieving relevant information from context (Xu et al., 2024a; Mohtashami & Jaggi, 2023; Wang et al., 2024; Tworkowski et al., 2024; Xiao…”