arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.09939cs.CVcs.AI
收藏

从动力系统视角理解自注意力机制

Understanding Self-attention Mechanism via Dynamical System Perspective

Sun Yat-sen University(中山大学);Guangdong University of Technology(广东工业大学);Northwestern University(西北大学)

Zhongzhan Huang, Mingfu Liang, Jinghui Qin, Shanshan Zhong, Liang Lin

AI总结:

该研究从动力系统视角揭示自注意力机制是感知刚性的步长适配器,解释其性能提升原理,提出StepNet方法并在视觉任务中取得显著效果。

摘要:

自注意力机制(SAM)被广泛应用于人工智能的各个领域,并成功提升了不同模型的性能。然而,目前对该机制的解释主要基于直觉和经验,仍缺乏针对SAM如何助力性能提升的直接建模。为解决这一问题,本文基于残差神经网络的动力系统视角,首先指出常微分方程(ODEs)高精度求解中存在的固有刚性现象(SP),在高性能神经网络(NN)中也广泛存在。因此,神经网络在特征层面衡量SP的能力是获得高性能的必要条件,也是导致神经网络训练困难的重要因素。与求解刚性ODE时有效的自适应步长方法类似,我们证明SAM同样是一种感知刚性的步长适配器,它能够通过细化刚性信息的估计并生成自适应注意力值,增强模型衡量固有SP的表征能力,这为SAM为何以及如何提升模型性能提供了新的理解视角。这一新颖视角还可以解释SAM中的彩票假设,设计新的表征能力量化指标,并启发一种受理论驱动的新方法StepNet。在多个流行基准上的大量实验表明,StepNet能够提取细粒度的刚性信息并准确衡量SP,在各类视觉任务中带来显著提升。

英文摘要:

The self-attention mechanism (SAM) is widely used in various fields of artificial intelligence and has successfully boosted the performance of different models. However, current explanations of this mechanism are mainly based on intuitions and experiences, while there still lacks direct modeling for how the SAM helps performance. To mitigate this issue, in this paper, based on the dynamical system perspective of the residual neural network, we first show that the intrinsic stiffness phenomenon (SP) in the high-precision solution of ordinary differential equations (ODEs) also widely exists in high-performance neural networks (NN). Thus the ability of NN to measure SP at the feature level is necessary to obtain high performance and is an important factor in the difficulty of training NN. Similar to the adaptive step-size method which is effective in solving stiff ODEs, we show that the SAM is also a stiffness-aware step size adaptor that can enhance the model's representational ability to measure intrinsic SP by refining the estimation of stiffness information and generating adaptive attention values, which provides a new understanding about why and how the SAM can benefit the model performance. This novel perspective can also explain the lottery ticket hypothesis in SAM, design new quantitative metrics of representational ability, and inspire a new theoretic-inspired approach, StepNet. Extensive experiments on several popular benchmarks demonstrate that StepNet can extract fine-grained stiffness information and measure SP accurately, leading to significant improvements in various visual tasks.

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

↑