---
title: Sigmoid function
slug: sigmoid-function
qid: 
snapshot: enwiki-001377832918
content_hash: 
license: CC BY-SA 4.0
source: https://en.wikipedia.org/w/index.php?oldid=1377832918
tags: [10639794, 114632825, 22905584, 22921969, 23000002, 23118434, 23603337, 28269686, 81199107]
---

# Sigmoid function

> [!note] Provenance
> Snapshot `enwiki-001377832918` · content root `…`
> Derived from <https://en.wikipedia.org/w/index.php?oldid=1377832918> · Licensed CC BY-SA 4.0

A sigmoid function is any mathematical function whose graph has a characteristic S-shaped or sigmoid curve. A common example of a sigmoid function is the logistic function. Other sigmoid functions are given in the Examples section. In some fields, most notably in the context of artificial neural networks, the term "sigmoid function" is used as a synonym for "logistic function". Special cases of sigmoid functions include the Gompertz curve (used in modeling systems that saturate at large values of x) and the ogee curve (used in the spillway of some dams). Sigmoid functions have domain of all real numbers, with return (response) value commonly monotonically increasing but could be decreasing. Sigmoid functions most often show a return value (y axis) in the range 0 to 1. Another commonly used range is from −1 to 1. There is also the Heaviside step function, which instantaneously transitions between 0 and 1. A wide variety of sigmoid functions including the logistic and hyperbolic tangent functions have been used as the activation function of artificial neurons. Sigmoid curves are also common in statistics as cumulative distribution functions (which go from 0 to 1), such as the integrals of the logistic density, the normal density, and Student's t probability density functions. The logistic sigmoid function is invertible, and its inverse is the logit function.

A sigmoid function is any mathematical function whose graph has a characteristic S-shaped or sigmoid curve. A common example of a sigmoid function is the logistic function. Other sigmoid functions are given in the Examples section. In some fields, most notably in the context of artificial neural networks, the term "sigmoid function" is used as a synonym for "logistic function". Special cases of sigmoid functions include the Gompertz curve (used in modeling systems that saturate at large values of x) and the ogee curve (used in the spillway of some dams). Sigmoid functions have domain of all real numbers, with return (response) value commonly monotonically increasing but could be decreasing. Sigmoid functions most often show a return value (y axis) in the range 0 to 1. Another commonly used range is from −1 to 1. There is also the Heaviside step function, which instantaneously transitions between 0 and 1. A wide variety of sigmoid functions including the logistic and hyperbolic tangent functions have been used as the activation function of artificial neurons. Sigmoid curves are also common in statistics as cumulative distribution functions (which go from 0 to 1), such as the integrals of the logistic density, the normal density, and Student's t probability density functions. The logistic sigmoid function is invertible, and its inverse is the logit function. y = A \, S(f(x)) + B, where S is an increasing sigmoid function, f(x) is a transformation of the independent variable, and A and B are constants controlling scaling and translation. | \frac{2}{\pi}\arcsin\!\left(\frac{1}{1 + e^{-a(x-c)}}\right),\ e^c = \sqrt{2}-1 | \frac{2}{\pi}\arcsin\!\left(\frac{x^a}{1 + x^a}\right) | \frac{2}{\pi}\arcsin\!\left(\frac{1}{1 + e^{a\cot(\pi x)}}\right) |- | 9 || special | \frac{1}{2} + \frac{1}{2}\,\operatorname{erf}\!\left(\frac{a}{\sqrt{2}}\,x\right) (Normal ) | \frac{1}{2} + \frac{1}{2}\,\operatorname{erf}\!\left(\frac{a}{\sqrt{2}}\ln (x)\right) (Log-normal ) | \frac{1}{2} + \frac{1}{2}\,\operatorname{erf}\!\left(\frac{a(2x^b-1)}{x^b(1-x^b)}\right) |- | 10 || stochastic | — | e^{\left(a - \frac{b^2}{2}\right)x + b\,w_i} \cdot \left(y_0^{-1} + a\int_0^x e^{\left(a - \frac{b^2}{2}\right)s + b\,w_s} ds\right)^{-1} | — |- | 11 || chaotic | \frac{dx}{dt} = -x + yz,\quad \frac{dy}{dt} = -ay + az,\quad \frac{dz}{dt} = -z + by - (b-1)xy (Grebenc ) | — | — |} Table 2. Taxonomy matrix with examples of sigmoid functions of the 2 nd kind on the unbounded interval Table 3. Taxonomy matrix with examples of sigmoid functions of the 3 rd kind Logistic function f(x) = \frac{1}{1 + e^{-x}} Hyperbolic tangent (shifted and scaled version of the logistic function, above) f(x) = \tanh x = \frac{e^x-e^{-x}}{e^x+e^{-x}} Arctangent function f(x) = \arctan x Gudermannian function f(x) = \operatorname{gd}(x) = \int_0^x \frac{dt}{\cosh t} = 2\arctan\left(\tanh\left(\frac{x}{2}\right)\right) Error function f(x) = \operatorname{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x e^{-t^2} \, dt Generalised logistic function f(x) = \left(1 + e^{-x} \right)^{-\alpha}, \quad \alpha > 0 Smoothstep function f(x) = \begin{cases} {\displaystyle \left( \int_0^1 \left(1 - u^2\right)^N du \right)^{-1} \int_0^x \left( 1 - u^2 \right)^N \ du}, & |x| \le 1 \\ \\ \sgn(x) & |x| \ge 1 \\ \end{cases} \quad N \in \mathbb{Z} \ge 1 Some algebraic functions, for example f(x) = \frac{x}{\sqrt{1+x^2}} and in a more general form f(x) = \frac{x}{\left(1 + |x|^{k}\right)^{1/k}} Up to shifts and scaling, many sigmoids are special cases of f(x) = \varphi(\varphi(x, \beta), \alpha) , where \varphi(x, \lambda) = \begin{cases} (1 - \lambda x)^{1/\lambda} & \lambda \ne 0 \\e^{-x} & \lambda = 0 \\ \end{cases} is the inverse of the negative Box–Cox transformation, and \alpha and \beta are shape parameters. Smooth transition function normalized to (−1,1): \begin{align}f(x) &= \begin{cases} {\displaystyle \frac{2}{1+e^{-2m\frac{x}{1-x^2}}} - 1}, & |x| using the hyperbolic tangent mentioned above. Here, m is a free parameter encoding the slope at x=0 , which must be greater than or equal to \sqrt{3} because any smaller value will result in a function with multiple inflection points, which is therefore not a true sigmoid. This function is unusual because it actually attains the limiting values of −1 and 1 within a finite range, meaning that its value is constant at −1 for all x \leq -1 and at 1 for all x \geq 1 . Nonetheless, it is smooth (infinitely differentiable, C^\infty ) everywhere, including at x = \pm 1 .
