[论文解读] AReLU: Attention-based Rectified Linear Unit
本文提出 AReLU,一种可学习的激活函数,通过将逐元素的、基于符号的注意力机制与 ReLU 结合,利用每层两个可学习参数,自适应地增强正向特征并抑制负向特征。ARelu 提升了训练稳定性,加速了小学习率下的收敛速度,并在多种架构的迁移学习和元学习基准测试中显著提升了性能。
Element-wise activation functions play a critical role in deep neural networks via affecting the expressivity power and the learning dynamics. Learning-based activation functions have recently gained increasing attention and success. We propose a new perspective of learnable activation function through formulating them with element-wise attention mechanism. In each network layer, we devise an attention module which learns an element-wise, sign-based attention map for the pre-activation feature map. The attention map scales an element based on its sign. Adding the attention module with a rectified linear unit (ReLU) results in an amplification of positive elements and a suppression of negative ones, both with learned, data-adaptive parameters. We coin the resulting activation function Attention-based Rectified Linear Unit (AReLU). The attention module essentially learns an element-wise residue of the activated part of the input, as ReLU can be viewed as an identity transformation. This makes the network training more resistant to gradient vanishing. The learned attentive activation leads to well-focused activation of relevant regions of a feature map. Through extensive evaluations, we show that AReLU significantly boosts the performance of most mainstream network architectures with only two extra learnable parameters per layer introduced. Notably, AReLU facilitates fast network training under small learning rates, which makes it especially suited in the case of transfer learning and meta learning. Our source code has been released (see https://github.com/densechen/AReLU).
研究动机与目标
- 为解决固定激活函数在深度网络中的局限性,特别是梯度消失和特征聚焦不充分的问题。
- 通过引入数据自适应的可学习激活机制,改善训练动态和模型表达能力。
- 在小学习率下实现更快收敛,尤其有利于迁移学习和元学习。
- 通过基于注意力的公式,提供一种更具可解释性和有效性的现有可学习激活函数替代方案。
提出的方法
- 引入一种逐元素的、基于符号的注意力模块,学习根据每个特征图元素的符号来缩放其值。
- 将学习到的注意力图与 ReLU 结合,形成 AReLU,作为可微分的、数据自适应的激活函数。
- 注意力模块学习相对于 ReLU 恒等变换的逐元素残差,从而改善梯度流动。
- 每层仅增加两个可学习参数,最大限度降低计算开销。
- 在标准 CNN 的多个层中应用 AReLU,并在图像分类、迁移学习和元学习任务上评估性能。
- 采用标准训练协议,使用 SGD 和学习率调度,将 AReLU 与非可学习及其它可学习激活函数进行对比。
实验结果
研究问题
- RQ1基于注意力的机制是否能提升 ReLU 在深度网络中的表达能力和训练动态?
- RQ2可学习的、基于符号的注意力机制是否能实现更快收敛,尤其是在小学习率下?
- RQ3在迁移学习和元学习场景中,ARelu 与现有可学习激活函数相比表现如何?
- RQ4ARelu 是否能在极低参数开销下实现更优性能并改善梯度流动?
主要发现
- 在 20 个周期的微调后,ARelu 在 SVHN 上达到 78.48% 的测试准确率,在迁移学习设置中优于所有其他激活函数。
- 在 5-ways-1-shot 元学习任务中,ARelu 达到 92.50% 的准确率,显著超过 PReLU(88.13%)和 PAU(43.13%),展现出更优的适应速度。
- 在 5-ways-5-shots 元学习设置中,ARelu 达到 94.30% 的准确率,超越所有基线模型,包括 SELU(93.50%)和 GELU(69.37%)。
- ARelu 在小学习率(1e-5)下实现快速收敛,使其在微调和元学习中极为高效。
- 特征可视化结果表明,ARelu 产生聚焦良好、任务导向的激活,突出显示特征图中的相关区域。
- 每层仅增加两个可学习参数,即可在多种架构和基准测试中实现一致且显著的性能提升。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。