arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.11685cs.CLcs.LG
收藏

为何Softmax注意力优于线性注意力

Why Softmax Attention Outperforms Linear Attention

The University of Washington(华盛顿大学);Adobe Research(Adobe研究);University of Bologna(博洛尼亚大学);University of Southern California(南加州大学)

Yichuan Deng, Zhao Song, Kaijun Yuan, Tianyi Zhou

AI总结:

本文通过对比分析Softmax与线性注意力机制,揭示了Softmax在多数场景下性能更优的原因,探讨了两者在计算效率与性能间的权衡。

摘要:

大型Transformer模型在许多自然语言处理任务中取得了最先进的成果。在Transformer架构中,注意力机制通过使用softmax函数捕捉序列中的令牌交互至关重要。相反,线性注意力通过用线性复杂度近似softmax操作提供了更计算高效的替代方案。然而,它在传统softmax注意力机制下表现出显著的性能下降。在本文中,我们填补了对softmax和线性注意力之间实际性能差距理论理解的空白。通过全面比较这两种注意力机制,我们揭示了为何在大多数情况下softmax注意力优于线性注意力的原因。

英文摘要:

Large transformer models have achieved state-of-the-art results in numerous natural language processing tasks. Among the pivotal components of the transformer architecture, the attention mechanism plays a crucial role in capturing token interactions within sequences through the utilization of softmax function. Conversely, linear attention presents a more computationally efficient alternative by approximating the softmax operation with linear complexity. However, it exhibits substantial performance degradation when compared to the traditional softmax attention mechanism. In this paper, we bridge the gap in our theoretical understanding of the reasons behind the practical performance gap between softmax and linear attention. By conducting a comprehensive comparative analysis of these two attention mechanisms, we shed light on the underlying reasons for why softmax attention outperforms linear attention in most scenarios.

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

↑