Activation function

Source: Wikipedia, the free encyclopedia.
Logistic activation function

The activation function of a node in an

ReLU used in the 2012 AlexNet computer vision model and in the 2015 ResNet
model.

Comparison of activation functions

Aside from their empirical performance, activation functions also have different mathematical properties:

Nonlinear
When the activation function is non-linear, then a two-layer neural network can be proven to be a universal function approximator.[4] This is known as the Universal Approximation Theorem. The identity activation function does not satisfy this property. When multiple layers use the identity activation function, the entire network is equivalent to a single-layer model.
Range
When the range of the activation function is finite, gradient-based training methods tend to be more stable, because pattern presentations significantly affect only limited weights. When the range is infinite, training is generally more efficient because pattern presentations significantly affect most of the weights. In the latter case, smaller learning rates are typically necessary.[citation needed]
Continuously differentiable
This property is desirable (ReLU is not continuously differentiable and has some issues with gradient-based optimization, but it is still possible) for enabling gradient-based optimization methods. The binary step activation function is not differentiable at 0, and it differentiates to 0 for all other values, so gradient-based methods can make no progress with it.[5]

These properties do not decisively influence performance, nor are they the only mathematical properties that may be useful. For instance, the strictly positive range of the softplus makes it suitable for predicting variances in variational autoencoders.

Mathematical details

The most common activation functions can be divided into three categories:

fold functions
.

An activation function is saturating if . It is nonsaturating if it is not saturating. Non-saturating activation functions, such as

ReLU, may be better than saturating activation functions, as networks using are less likely to suffer from the vanishing gradient problem.[6]

Ridge activation functions

Ridge functions are multivariate functions acting on a linear combination of the input variables. Often used examples include:[clarification needed]

  • Linear
    activation: ,
  • ReLU
    activation: ,
  • Heaviside
    activation: ,
  • Logistic activation: .

In

biologically inspired neural networks, the activation function is usually an abstraction representing the rate of action potential firing in the cell.[7] In its simplest form, this function is binary—that is, either the neuron is firing or not. Neurons also cannot fire faster than a certain rate, motivating sigmoid
activation functions whose range is a finite interval.

The function looks like , where is the Heaviside step function.

If a line has a positive slope, on the other hand, it may reflect the increase in firing rate that occurs as input current increases. Such a function would be of the form .

Rectified linear unit and Gaussian error linear unit activation functions

Radial activation functions

A special class of activation functions known as radial basis functions (RBFs) are used in RBF networks, which are extremely efficient as universal function approximators. These activation functions can take many forms, but they are usually found as one of the following functions:

  • Gaussian:
  • Multiquadratics:
  • Inverse multiquadratics:
  • Polyharmonic splines

where is the vector representing the function center and and are parameters affecting the spread of the radius.

Folding activation functions

Folding activation functions are extensively used in the

maximum. In multiclass classification the softmax
activation is often used.

Table of activation functions

The following table compares the properties of several activation functions that are functions of one fold x from the previous layer or layers:

Name Plot Function, Derivative of , Range Order of continuity
Identity
Binary step
Logistic, sigmoid, or soft step
Hyperbolic tangent (
tanh
)
Soboleva modified hyperbolic tangent (smht)
Rectified linear unit (ReLU)[8]
Gaussian Error Linear Unit (GELU)[2] Visualization of the Gaussian Error Linear Unit (GELU)
Softplus[9]
Exponential linear unit (ELU)[10]
with parameter
Scaled exponential linear unit (SELU)[11]
with parameters and
Leaky rectified linear unit (Leaky ReLU)[12]
Parametric rectified linear unit (PReLU)[13]
with parameter
Sigmoid linear unit (SiLU,[2] Sigmoid shrinkage,[14] SiL,[15] or Swish-‍1[16]) Swish Activation Function
Gaussian

The following table lists activation functions that are not functions of a single fold x from the previous layer or layers:

Name Equation, Derivatives, Range Order of continuity
Softmax    for i = 1, …, J [1][2]
Maxout[17]
^ Here, is the Kronecker delta.
^ For instance, could be iterating through the number of kernels of the previous neural network layer while iterates through the number of kernels of the current layer.

Quantum activation functions

In

quantum computers, based on quantum perceptrons instead of variational quantum circuits, the non-linearity of the activation function can be implemented with no need of measuring the output of each perceptron at each layer. The quantum properties loaded within the circuit such as superposition can be preserved by creating the Taylor series of the argument computed by the perceptron itself, with suitable quantum circuits computing the powers up to a wanted approximation degree. Because of the flexibility of such quantum circuits, they can be designed in order to approximate any arbitrary classical activation function.[18]


See also

References

  1. ^ Hinkelmann, Knut. "Neural Networks, p. 7" (PDF). University of Applied Sciences Northwestern Switzerland. Archived from the original (PDF) on 2018-10-06. Retrieved 2018-10-06.
  2. ^ ].
  3. .
  4. .
  5. .
  6. .
  7. .
  8. ^ Glorot, Xavier; Bordes, Antoine; Bengio, Yoshua (2011). "Deep sparse rectifier neural networks" (PDF). International Conference on Artificial Intelligence and Statistics.
  9. ].
  10. .
  11. .
  12. ].
  13. ^ Atto, Abdourrahmane M.; Pastor, Dominique; Mercier, Grégoire (2008), "Smooth sigmoid wavelet shrinkage for non-parametric estimation" (PDF),
    S2CID 9959057
  14. .
  15. ].
  16. .
  17. .