Skip to content
Oakfield Operator Calculus Function Reference Site

Softplus Function

The softplus function is a smooth approximation of the hinge max(0,x)\max(0,x):

softplus(x)=log(1+ex)\operatorname{softplus}(x) = \log(1 + e^x)

It can also be written as a two-term log-sum-exp:

softplus(x)=LSE(0,x)\operatorname{softplus}(x) = \operatorname{LSE}(0,x)

Softplus is defined for all real inputs and returns positive real values: softplus:R(0,)\operatorname{softplus}:\mathbb{R}\to(0,\infty).


ddxsoftplus(x)=11+ex\frac{d}{dx}\operatorname{softplus}(x) = \frac{1}{1 + e^{-x}}
limxsoftplus(x)=0,limx(softplus(x)x)=0\lim_{x\to-\infty}\operatorname{softplus}(x) = 0, \qquad \lim_{x\to\infty}\big(\operatorname{softplus}(x) - x\big) = 0

A sharper transition can be obtained by introducing an inverse-temperature β>0\beta>0:

softplusβ(x)=1βlog ⁣(1+eβx)\operatorname{softplus}_\beta(x) = \frac{1}{\beta}\log\!\left(1+e^{\beta x}\right)

xxsoftplus(x)\operatorname{softplus}(x)
00log2\log 2

As β\beta \to \infty, softplusβ(x)\operatorname{softplus}_\beta(x) converges pointwise to max(0,x)\max(0,x).


Softplus is a log-sum-exp primitive and is tightly related to exponential/logarithmic stabilization. Hyperbolic tangent and soft clamping provide alternative smooth transitions with saturation.


Oakfield uses softplus-style expressions primarily for smooth clamping in operator logic:

  • Thermostat smooth clamps use a softplus-like function (log1p(exp(kx))/k) to apply smooth min/max limiting without hard kinks (see thermostat operator).
  • Softplus is also a convenient conceptual model for “soft” thresholds in UIs and parameter mappings, but it is not currently exposed as a standalone field operator.

Softplus is a modern smooth surrogate for the hinge/rectifier, closely connected to log-sum-exp and softmax constructions that became standard in numerical optimization and statistical modeling.

It is widely used as a differentiable “soft” hinge, with a tunable sharpness parameter via temperature scaling.


  • Boyd & Vandenberghe, Convex Optimization
  • Cover & Thomas, Elements of Information Theory