# Is it Time to Swish? Comparing Deep Learning Activation Functions Across NLP tasks

Source: [Is it Time to Swish? Comparing Deep Learning Activation Functions Across NLP tasks](<https://www.sota2.com/research/paper/68fa65371e209131cea090d4>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-27T05:56:48.640Z

Authors: Steffen Eger, Paul Youssef, Iryna Gurevych

Published: 2019-01-09T10:45:20.000Z

## 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.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/1901.02671>)

[PDF](<https://arxiv.org/pdf/1901.02671.pdf>)
