# Neural network activation functions

January 13, 2017 — May 6, 2024

There is a whole cottage industry in showing neural networks are reasonably universal function approximators with various nonlinearities as activations, under various conditions. Usually, we take it as a given that the particular activation function is not too important.

Sometimes, we might like to play with the precise form of the nonlinearities, even making the nonlinearities themselves directly learnable, because some function shapes might have better approximation properties with respect to various assumptions on the learning problems, in a sense which I will not attempt to make rigorous now, vague hand-waving arguments being the whole point of deep learning.

I think a part of this field has been subsumed into the stability-of-dynamical-systems setting? Or we do not care because something-something BatchNorm?

## 1 ReLU

The current default activation function is ReLU, i.e. \(x\mapsto \max\{0,x\}\), which has many nice properties. However, it does lead to piecewise linear spline approximators. One could regard that as a plus (Unser 2019) but OTOH that makes it hard to solve differential equations.

## 2 Differentiable activations

Sometimes, then, we want something different. Other classic activations such as \(x\mapsto\tanh x\) have fallen from favour, supplanted by ReLU. However, differentiable activations are useful, especially if higher-order gradients of the solution will be important. Many virtues of differentiable activation functions are documented Implicit Neural Representations with Periodic Activation Functions. Sitzmann et al. (2020) argues for \(x\mapsto\sin x\) on the basis of various handy properties. Ramachandran, Zoph, and Le (2017) advocate Swish, \(x\mapsto \frac{x}{1+\exp -x}.\)

Other fun things, SELU, the “self-normalising” SELU (scaled exponential linear unit) Klambauer et al. (2017).

## 3 Learnable activations

Learnable activations are a thing, e.g. Ramachandran, Zoph, and Le (2017), Agostinelli et al. (2015), Lederer (2021), Liu, Ma, et al. (2024).

## 4 Kolmogorov-Arnold networks

A cute related case of a learnable activation function is the Kolmogorov-Arnold network (Liu, Ma, et al. 2024), where the ever edge learns an activation function and there are no other weights. This has various nice properties such as being easy to compress. See Kolmogorov-Arnold Networks.

## 5 References

*Proceedings of International Conference on Learning Representations (ICLR) 2015*.

*Proceedings of the 33rd International Conference on International Conference on Machine Learning - Volume 48*. ICML’16.

*PMLR*.

*Proceedings of the 22nd International Conference on Neural Information Processing Systems*. NIPS’09.

*Proceedings of ICLR*.

*Aistats*.

*Aistats*.

*2019 IEEE International Conference on Systems, Man and Cybernetics (SMC)*.

*ICML (3)*.

*Proceedings of the 36th International Conference on Machine Learning*.

*arXiv:1502.01852 [Cs]*.

*arXiv:1603.05027 [Cs]*.

*International Journal of Uncertainty Fuzziness and Knowledge Based Systems*.

*A Field Guide to Dynamical Recurrent Neural Networks*.

*Proceedings of the 31st International Conference on Neural Information Processing Systems*.

*arXiv:2101.09957 [Cs, Stat]*.

*ICLR*.

*Proceedings of ICML*.

*arXiv:1211.5063 [Cs]*.

*arXiv:1806.08734 [Cs, Stat]*.

*arXiv:1710.05941 [Cs]*.

*arXiv:2006.09661 [Cs, Eess]*.

*arXiv:1505.00387 [Cs]*.

*Journal of Machine Learning Research*.

*Advances in Neural Information Processing Systems*.

*arXiv:1907.10599 [Cs, Stat]*.