解神经网络中递归和自注意力之间的权衡
Untangling tradeoffs between recurrence and self-attention in neural networks
摘要:
注意力和自注意力机制现在是最先进的顺序任务深度学习的核心。然而,最近的进展取决于启发式方法,对注意力在模型优化和计算中的作用了解有限,并且依赖于相当大的内存和计算资源,可扩展性差。在这项工作中,我们提出了一个正式的分析,自注意力如何影响梯度传播的递归网络,并证明它减轻了消失的梯度时,试图捕捉长期依赖性的问题,建立具体的界限梯度规范。基于这些结果,我们提出了一个相关性筛选机制,灵感来自记忆巩固的认知过程,允许可扩展的使用稀疏自注意力与复发。在保证避免梯度消失的同时,我们使用简单的数值实验来证明通过有效地平衡注意力和递归来权衡性能和计算资源。基于我们的研究结果,我们提出了一个具体的研究方向,以提高专注网络的可扩展性。
英文摘要:
Attention and self-attention mechanisms, are now central to state-of-the-art deep learning on sequential tasks. However, most recent progress hinges on heuristic approaches with limited understanding of attention's role in model optimization and computation, and rely on considerable memory and computational resources that scale poorly. In this work, we present a formal analysis of how self-attention affects gradient propagation in recurrent networks, and prove that it mitigates the problem of vanishing gradients when trying to capture long-term dependencies by establishing concrete bounds for gradient norms. Building on these results, we propose a relevancy screening mechanism, inspired by the cognitive process of memory consolidation, that allows for a scalable use of sparse self-attention with recurrence. While providing guarantees to avoid vanishing gradients, we use simple numerical experiments to demonstrate the tradeoffs in performance and computational resources by efficiently balancing attention and recurrence. Based on our results, we propose a concrete direction of research to improve scalability of attentive networks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。