HackerPapers

arXiv:1710.05941cs.NE

Searching for Activation Functions

Prajit Ramachandran, Barret Zoph, Quoc V. Le

Abstract

The choice of activation functions in deep networks has a significant effect on the training dynamics and task performance. Currently, the most successful and widely-used activation function is the Rectified Linear Unit (ReLU). Although various hand-designed alternatives to ReLU have been proposed, none have managed to replace it due to inconsistent gains. In this work, we propose to leverage automatic search techniques to discover new activation functions. Using a combination of exhaustive and reinforcement learning-based search, we discover multiple novel activation functions. We verify the effectiveness of the searches by conducting an empirical evaluation with the best discovered activation function. Our experiments show that the best discovered activation function, $f(x) = x \cdot \text{sigmoid}(βx)$, which we name Swish, tends to work better than ReLU on deeper models across a number of challenging datasets. For example, simply replacing ReLUs with Swish units improves top-1 classification accuracy on ImageNet by 0.9\% for Mobile NASNet-A and 0.6\% for Inception-ResNet-v2. The simplicity of Swish and its similarity to ReLU make it easy for practitioners to replace ReLUs with Swish units in any neural network.

arXiv comments
Updated version of "Swish: a Self-Gated Activation Function"
Journal reference
DOI
Subjects
cs.NENeural and Evolutionary Computing cs.CVComputer Vision and Pattern Recognition cs.LGMachine Learning

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Nov 2019 to Feb 2023. Found in 4 HN submissions from Oct 2017 to Nov 2017. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

    • Learnable activation functions are a thing famously Swish[0] is is a trainable SiLU which was found through symbolic search/optimization [1], but as it turns out that doesn't magically make make neural networks orders better. [0]: https://en.m.wikipedia.org/wiki/Swish_function…

      f_devdView on HNParent context

    • A more in-depth paper about this found the Swish activation often outperformed other functions: https://arxiv.org/abs/1710.05941

      HawkenfallView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.