Linearizing Transformer with Key-Value Memory
Yizhe Zhang, Deng Cai
摘要
Efficient transformer variants with linear time complexity have been developed to mitigate the quadratic computational overhead of the vanilla transformer. Among them are low-rank projection methods such as Linformer and kernel-based Transformers. Despite their unique merits, they usually suffer from a performance drop comparing with the vanilla transformer on many sequence generation tasks, and often fail to obtain computation gain when the generation is short. We propose Memsizer, an approach towards closing the performance gap while improving the efficiency even with short generation. It projects the source sequences into lower dimension representations like Linformer, while enjoying efficient recurrent-style incremental computation similar to kernel-based transformers. This yields linear computation time and constant memory complexity at inference time. Memsizer also employs a lightweight multi-head mechanism which renders the computation as light as a single-head model. We demonstrate that Memsizer provides an improved balance between efficiency and accuracy over the vanilla transformer and other efficient transformer variants in three typical sequence generation tasks, including machine translation, abstractive text summarization, and language modeling.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Big Bird: Transformers for Longer Sequences 引用了 Reformer: The Efficient Transformer
- Attention with Routed-Memory for Learnable Sparse Control 引用了 Big Bird: Transformers for Longer Sequences
- Attention with Routed-Memory for Learnable Sparse Control 引用了 Reformer: The Efficient Transformer
- Attention with Routed-Memory for Learnable Sparse Control 引用了 Gated Slot Attention for Efficient Linear-Time Sequence Modeling
- Attention with Routed-Memory for Learnable Sparse Control 引用了 Gated Linear Attention Transformers with Hardware-Efficient Training
- Gated Slot Attention for Efficient Linear-Time Sequence Modeling 引用了 Gated Linear Attention Transformers with Hardware-Efficient Training
- Gated Linear Attention Transformers with Hardware-Efficient Training 引用了 Big Bird: Transformers for Longer Sequences
- Gated Linear Attention Transformers with Hardware-Efficient Training 引用了 Reformer: The Efficient Transformer
引用它的顶会 Paper3
- Gated Linear Attention Transformers with Hardware-Efficient TrainingSonglin Yang, Bailin Wang, Yikang Shen, Rameswar Panda 等ICML 2024 · 390 次引用
- Gated Slot Attention for Efficient Linear-Time Sequence ModelingYu Zhang, Songlin Yang, Rui-Jie Zhu, Yue Zhang 等NeurIPS 2024 · 93 次引用
- Attention with Routed-Memory for Learnable Sparse ControlQIUHAO Zeng, Jerry Huang, Peng Lu, Ruiyi Fang 等ICML 2026
它引用的 Paper22
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel 等ICLR 2020 · 7,418 次引用
- MLP-Mixer: An all-MLP Architecture for VisionIlya O. Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer 等NeurIPS 2021 · 3,862 次引用
- Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie 等NeurIPS 2020 · 3,159 次引用
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用
相关 Paper
- MemoryFormer : Minimize Transformer Computation by Removing Fully-Connected LayersNing Ding, Yehui Tang, Haochen Qin, Zhenli Zhou 等NeurIPS 2024 · 8 次引用
- Efficient Long-Range Transformers: You Need to Attend More, but Not Necessarily at Every LayerQingru Zhang, Dhananjay Ram, Cole Hawkins, Sheng Zha 等EMNLP Findings 2023 · 18 次引用
- LightFormer: Light-weight Transformer Using SVD-based Weight Transfer and Parameter SharingXiuqing Lv, Peng Zhang, Sunzhu Li, Guobing Gan 等ACL Findings 2023 · 9 次引用
- Informer: Beyond Efficient Transformer for Long Sequence Time-Series ForecastingHaoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang 等AAAI 2021 · 7,289 次引用
- SEA: Sparse Linear Attention with Estimated Attention MaskHeejun Lee, Jina Kim, Jeffrey Willette, Sung Ju HwangICLR 2024 · 12 次引用
