|Part of a series on|
and data mining
In artificial neural networks, the activation function of a node defines the output of that node given an input or set of inputs. A standard integrated circuit can be seen as a digital network of activation functions that can be "ON" (1) or "OFF" (0), depending on input. This is similar to the linear perceptron in neural networks. However, only nonlinear activation functions allow such networks to compute nontrivial problems using only a small number of nodes, and such activation functions are called nonlinearities.
The most common activation functions can be divided in three categories: ridge functions, radial functions and 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 they don't suffer from vanishing gradient.
Main article: Ridge function
Ridge functions are multivariate functions acting on a linear combination of the input variables. Often used examples include:
In biologically inspired neural networks, the activation function is usually an abstraction representing the rate of action potential firing in the cell. In its simplest form, this function is binary—that is, either the neuron is firing or not. The function looks like , where is the Heaviside step function.
A line of positive slope may be used to reflect the increase in firing rate that occurs as input current increases. Such a function would be of the form .
Neurons also cannot fire faster than a certain rate, motivating sigmoid activation functions whose range is a finite interval.
Main article: Radial function
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:
where is the vector representing the function center and and are parameters affecting the spread of the radius.
Main article: Fold function
Folding activation functions are extensively used in the pooling layers in convolutional neural networks, and in output layers of multiclass classification networks. These activations perform aggregation over the inputs, such as taking the mean, minimum or maximum. In multiclass classification the softmax activation is often used.
There are numerous activation functions. Hinton et al.'s seminal 2012 paper on automatic speech recognition uses a logistic sigmoid activation function. The seminal 2012 AlexNet computer vision architecture uses the ReLU activation function, as did the seminal 2015 computer vision architecture ResNet. The seminal 2018 language processing model BERT uses a smooth version of the ReLU, the GELU.
Aside from their empirical performance, activation functions also have different mathematical properties:
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.
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|
|Logistic, sigmoid, or soft step|
|Hyperbolic tangent (tanh)|
|Rectified linear unit (ReLU)|
|Gaussian Error Linear Unit (GELU)|
|Exponential linear unit (ELU)||
|Scaled exponential linear unit (SELU)||
|Leaky rectified linear unit (Leaky ReLU)|
|Parametric rectified linear unit (PReLU)||
|Sigmoid linear unit (SiLU, Sigmoid shrinkage, SiL, or Swish-1)|
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|||