Skip to main content
QUICK REVIEW

[论文解读] SERF: Towards better training of deep neural networks using log-Softplus ERror activation Function

Sayan Nag, Mayukh Bhattacharyya|arXiv (Cornell University)|Aug 21, 2021
Machine Learning in Materials Science被引用 5
一句话总结

本文提出 Serf,一种源自 Swish 家族的新型非单调、自正则化激活函数,旨在缓解 ReLU 网络的神经元死亡问题并提升优化性能。Serf 在图像分类、目标检测、机器翻译和多模态蕴含等多种深度学习任务中均优于 ReLU、Swish 和 Mish,尤其在更深的网络架构中表现更优。

ABSTRACT

Activation functions play a pivotal role in determining the training dynamics and neural network performance. The widely adopted activation function ReLU despite being simple and effective has few disadvantages including the Dying ReLU problem. In order to tackle such problems, we propose a novel activation function called Serf which is self-regularized and nonmonotonic in nature. Like Mish, Serf also belongs to the Swish family of functions. Based on several experiments on computer vision (image classification and object detection) and natural language processing (machine translation, sentiment classification and multimodal entailment) tasks with different state-of-the-art architectures, it is observed that Serf vastly outperforms ReLU (baseline) and other activation functions including both Swish and Mish, with a markedly bigger margin on deeper architectures. Ablation studies further demonstrate that Serf based architectures perform better than those of Swish and Mish in varying scenarios, validating the effectiveness and compatibility of Serf with varying depth, complexity, optimizers, learning rates, batch sizes, initializers and dropout rates. Finally, we investigate the mathematical relation between Swish and Serf, thereby showing the impact of preconditioner function ingrained in the first derivative of Serf which provides a regularization effect making gradients smoother and optimization faster.

研究动机与目标

  • 解决负激活区域中零梯度饱和导致的 ReLU 神经元死亡问题。
  • 通过平滑且具备预条件特性的激活函数,提升深层网络的优化稳定性和梯度流动。
  • 基于 Swish 和 Mish 的自门控机制,设计一种自正则化的激活函数。
  • 在多种架构与任务中实现卓越性能,尤其在更深的模型中表现更优。
  • 探究预条件器在 Serf 的导数中所起的数学作用,揭示其作为正则化来源的机制。

提出的方法

  • 提出 Serf 作为 $ f(x) = x \cdot \operatorname{erf}(\ln(1 + e^x)) $,结合自门控与基于误差函数的非线性特性。
  • 利用 Serf 的一阶导数嵌入预条件器函数,以平滑梯度并增强优化性能。
  • 将 Serf 集成至最先进的模型中,包括 ResNet、EfficientNet、YOLOv4、Transformer 编码器以及基于 BERT 的架构。
  • 在 MNIST 和 CIFAR-10 上开展消融实验,评估不同超参数(如初始学习率、批量大小、Dropout 率、权重初始化方式)下的性能表现。
  • 在多个基准测试中,使用标准指标(准确率、BLEU、F1 分数)对比 Serf 与 ReLU、GELU、Swish 和 Mish 的表现。
  • 分析 Swish 与 Serf 之间的数学关系,突出 Serf 的导数中预条件器带来的正则化效应。
Figure 1: Activation functions (Left), first derivatives (Middle) and second derivatives (Right) for Swish, Mish and Serf.
Figure 1: Activation functions (Left), first derivatives (Middle) and second derivatives (Right) for Swish, Mish and Serf.

实验结果

研究问题

  • RQ1在深层网络中,Serf 是否比 ReLU、Swish 和 Mish 更有效地缓解神经元死亡问题?
  • RQ2Serf 的导数中预条件器如何促进梯度更加平滑并实现更快的优化?
  • RQ3Serf 在多种架构与任务中,尤其是在更深的模型中,性能提升的幅度如何?
  • RQ4在不同训练超参数(如学习率、批量大小、Dropout 率)下,Serf 的表现如何?
  • RQ5Serf 是否能在视觉与自然语言处理任务中实现良好泛化,包括图像分类、目标检测、机器翻译与多模态蕴含任务?

主要发现

  • 在 Multi30k 德语-英语翻译任务中,Serf 的 BLEU 得分为 36.06,优于 ReLU(35.55)、GELU(35.62)和 Mish(35.36)。
  • 在 IMDb 电影评论情感分类数据集上,Serf 在 4 层 Transformer 模型中达到 89.03% 的 top-1 准确率,超过 ReLU(88.82%)和 Mish(88.99%)。
  • 在 PolEmo 2.0 情感分析数据集中,Serf 的 F1 分数为 0.8342,略高于 Mish 的 0.8346,且精确率与召回率相近。
  • 在多模态蕴含任务中,Serf 的平均准确率为 85.42%,在五次运行中略高于 GELU 的 85.28%。
  • 在 CIFAR-10 和 MNIST 上的消融实验表明,Serf 在不同学习率、批量大小、Dropout 率及权重初始化方式下均表现出强鲁棒性。
  • Serf 在所有评估任务与架构中均持续优于 Swish 和 Mish,且在更深的模型中性能差距更为显著。
Figure 2: Output landscapes of a randomly initialized 6-layered neural network with ReLU (Left) and Serf (Right) activations.
Figure 2: Output landscapes of a randomly initialized 6-layered neural network with ReLU (Left) and Serf (Right) activations.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。