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

ASR:类注意力的结构重参数化

ASR: Attention-alike Structural Re-parameterization

Sun Yat-sen University(中山大学);Guangdong University of Technology(广东工业大学);Peng Cheng Laboratory(鹏城实验室)

Shanshan Zhong, Zhongzhan Huang, Wushao Wen, Jinghui Qin, Liang Lin

AI总结:

本文提出类注意力结构重参数化方法ASR,通过发现注意力值在训练中趋于常数的条纹观察现象,在不增加推理成本的前提下将注意力机制融入结构重参数化,广泛提升现有骨干网络、注意力模块和SRP方法的性能。

摘要:

结构重参数化(SRP)技术是一种新颖的深度学习技术,通过等效参数变换实现不同网络架构之间的相互转换。该技术能够在推理阶段通过这些变换来缓解训练期间为提升性能而产生的额外成本,例如参数规模和推理时间,因此 SRP 在工业与实际应用中具有巨大潜力。现有的 SRP 方法已成功考虑了许多常用架构,例如归一化、池化方法和多分支卷积。然而,广泛使用且会显著降低推理速度的注意力模块无法直接通过 SRP 实现,因为这些模块通常以乘法方式作用于骨干网络,并且其输出在推理期间依赖于输入,这限制了 SRP 的应用场景。在本文中,我们从统计角度进行了大量实验,发现了一个有趣的现象——条纹观察(Stripe Observation),该现象揭示了通道注意力值在训练过程中会迅速逼近某些常数向量。这一观察启发我们提出了一种简单而有效的类注意力结构重参数化(ASR)方法,使我们能够在享受注意力机制有效性的同时,为给定网络实现 SRP。在若干标准基准上开展的大量实验表明,ASR 能够普遍提升现有骨干网络、注意力模块和 SRP 方法的性能,且无需任何精细的模型设计。我们还分析了其局限性,并为所提出的 ASR 的强鲁棒性提供了实验和理论证据。

英文摘要:

The structural re-parameterization (SRP) technique is a novel deep learning technique that achieves interconversion between different network architectures through equivalent parameter transformations. This technique enables the mitigation of the extra costs for performance improvement during training, such as parameter size and inference time, through these transformations during inference, and therefore SRP has great potential for industrial and practical applications. The existing SRP methods have successfully considered many commonly used architectures, such as normalizations, pooling methods, and multi-branch convolution. However, the widely used attention modules which drastically slow inference speed cannot be directly implemented by SRP due to these modules usually act on the backbone network in a multiplicative manner and the modules' output is input-dependent during inference, which limits the application scenarios of SRP. In this paper, we conduct extensive experiments from a statistical perspective and discover an interesting phenomenon Stripe Observation, which reveals that channel attention values quickly approach some constant vectors during training. This observation inspires us to propose a simple-yet-effective attention-alike structural re-parameterization (ASR) that allows us to achieve SRP for a given network while enjoying the effectiveness of the attention mechanism. Extensive experiments conducted on several standard benchmarks demonstrate the effectiveness of ASR in generally improving the performance of existing backbone networks, attention modules, and SRP methods without any elaborated model crafting. We also analyze the limitations and provide experimental and theoretical evidence for the strong robustness of the proposed ASR.

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

↑