is called the softplus function. Since gives , the logarithm is always positive, so the domain is all real numbers and the range is . The inside increases monotonically and is increasing, so the whole function increases monotonically.
The behavior on the left and on the right could hardly be more different.
| Side | Approximation | Asymptote |
|---|---|---|
| , the -axis | ||
Flat toward on the left and tending to the line of slope on the right, it is a smoothly bent shape.
The derivative is exactly the logistic, or sigmoid, function.
Its value lies between and , tending to as and to as . The second derivative is positive, so the graph is convex throughout.
| Gap from | ||
|---|---|---|
For large the output is almost equal to . The gap is exactly , and the values appear in swapped order down the two columns because equals the value at .
The ReLU , common in machine learning, has a corner at the origin where it is not differentiable; softplus is a smooth approximation that rounds that corner off, staying rounded near the origin while nearly coinciding with ReLU far away. It is used as an activation function in neural networks, and to parametrize quantities that must stay positive, such as a variance or a population count. That its derivative is the sigmoid, equivalently that softplus is the antiderivative of the sigmoid, also simplifies gradient computations.
Computing directly overflows when is large, because does. Implementations commonly rewrite it in the following form for numerical stability.
The exponent is never positive, so nothing overflows.