Skip to main content
QUICK REVIEW

[论文解读] Is it Time to Swish? Comparing Deep Learning Activation Functions Across NLP tasks

Steffen Eger, Paul Youssef|arXiv (Cornell University)|Jan 9, 2019
Adversarial Robustness in Machine Learning被引用 5
一句话总结

该论文首次在八种NLP任务上对21种激活函数进行了大规模实证比较,使用MLP、CNN和RNN架构。结果表明,惩罚tanh函数在稳定性和泛化能力方面优于其他函数,在一项具有挑战性的序列标注任务中,当用其替换LSTM单元中的标准sigmoid/tanh门时,性能相比标准激活函数提升了2个百分点。

ABSTRACT

Activation functions play a crucial role in neural networks because they are the nonlinearities which have been attributed to the success story of deep learning. One of the currently most popular activation functions is ReLU, but several competitors have recently been proposed or 'discovered', including LReLU functions and swish. While most works compare newly proposed activation functions on few tasks (usually from image classification) and against few competitors (usually ReLU), we perform the first large-scale comparison of 21 activation functions across eight different NLP tasks. We find that a largely unknown activation function performs most stably across all tasks, the so-called penalized tanh function. We also show that it can successfully replace the sigmoid and tanh gates in LSTM cells, leading to a 2 percentage point (pp) improvement over the standard choices on a challenging NLP task.

研究动机与目标

  • 为解决在多样化NLP任务和架构中缺乏对激活函数的大规模实证评估的问题。
  • 探究近期提出的激活函数(如swish)是否能从图像分类任务泛化到NLP任务。
  • 识别在多个NLP任务和超参数设置下表现稳定的激活函数。
  • 评估饱和函数(如惩罚tanh)是否能成功替代LSTM门控机制中的sigmoid和tanh函数。
  • 评估深度和dropout等超参数对激活函数性能的影响。

提出的方法

  • 在涵盖句子分类、文档分类和序列标注的八种NLP任务上评估了21种激活函数。
  • 使用三种标准NLP架构:多层感知机(MLPs)、卷积神经网络(CNNs)和循环神经网络(RNNs)。
  • 通过比较最高准确率和不同超参数设置下的平均性能,评估性能的稳定性。
  • 进行回归分析,以建模超参数(如层数、dropout率)对激活函数性能的影响。
  • 将LSTM单元中的标准sigmoid和tanh门替换为惩罚tanh,并在一项具有挑战性的序列标注基准上进行评估。
  • 采用Ramachandran等人(2017)提出的基于自动搜索的激活函数,包括swish,并与标准及新型替代函数进行比较。

实验结果

研究问题

  • RQ1哪种激活函数在多样化NLP任务和架构中表现最稳定?
  • RQ2通过图像分类中自动搜索发现的激活函数(如swish)是否能良好泛化到NLP任务?
  • RQ3像惩罚tanh这样的饱和激活函数能否成功替代LSTM门控机制中的sigmoid和tanh函数?
  • RQ4网络深度和dropout等超参数如何影响不同激活函数的相对性能?
  • RQ5在NLP模型中,不同超参数设置下,是否存在性能峰值与稳定性之间的权衡?

主要发现

  • 惩罚tanh函数在全部八个NLP任务中表现最为稳定,其一致性优于其他函数。
  • 在一项具有挑战性的序列标注任务中,当用惩罚tanh替换标准sigmoid和tanh门时,LSTM性能提升了2个百分点。
  • 尽管swish在多个任务中表现良好,但其稳定性不如惩罚tanh,且未始终位列顶尖表现者之中。
  • 除swish外,Ramachandran等人(2017)中通过自动搜索发现的大多数激活函数在NLP任务中未能泛化成功。
  • 具有有限取值范围的饱和函数(如惩罚tanh)在不同超参数设置下表现出更优的稳定性,而非饱和函数虽常取得更高峰值性能,但一致性较差。
  • 激活函数的性能无法预先准确预测,且不同函数对超参数的敏感性差异显著,其中惩罚tanh和swish对深度和dropout表现出更强的鲁棒性。

更好的研究,从现在开始

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

无需绑定信用卡

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