arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2010.06891cs.CL
收藏

Memformer:一种用于序列建模的记忆增强型Transformer

Memformer: A Memory-Augmented Transformer for Sequence Modeling

University of California, Davis(加州大学戴维斯分校);Westlake University(西湖大学);Facebook AI(脸书人工智能研究院)

Qingyang Wu, Zhenzhong Lan, Kun Qian, Jing Gu, Alborz Geramifard, Zhou Yu

摘要:

Transformers在层序建模中取得了显著的成功。然而,这些模型存在效率问题,因为它们需要将所有历史标记级表示存储为内存。我们提出Memformer,一个有效的神经网络序列建模,利用外部动态记忆编码和检索过去的信息。我们的模型在处理长序列时达到了线性时间复杂度和恒定内存空间复杂度。我们还提出了一个新的优化方案,内存重放反向传播(MRBP),促进远程反向传播通过时间与显着降低内存需求。实验结果表明,Memformer与基线相比,通过使用少8.1倍的内存空间和快3.2倍的推理速度,实现了相当的性能。对注意模式的分析表明,我们的外部记忆槽可以通过时间步长编码和保留重要信息。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑