Softplus and its derivative
symbolic▲△△Softplus is . Show that , that everywhere, and that as . Then say why softplus is nevertheless rarely used.
Hint
For the last part, evaluate naively at in fp32.
Solution
The derivative. By the chain rule,
dividing through by at the last step. Softplus is the antiderivative of the sigmoid — a fact worth carrying, because it means the smooth gate and the smooth rectifier are the same object seen at two orders of differentiation.
It dominates ReLU. For , . For , write , since the log term is positive. So everywhere.
The gap vanishes. From the two forms above, the gap is for and for — in both cases , which tends to . At the gap is already .
Why it is rarely used. Three reasons, in decreasing order of importance.
It overflows if written naively. At , — fine in fp32, but at it is and . The correct implementation is (Log-sum-exp 0.NU.02), which never overflows. Every framework does this; the point is that the naive form is a real trap.
It costs more. Roughly FLOPs per element against ReLU’s — though I.3.B07 showed that difference is under of the layer, so this reason is weaker than it is usually stated.
It has no exact zeros. always, so no unit is ever silent and no activation is ever sparse. Sparsity was the original argument for ReLU, and whether it matters is still debated — but softplus definitively does not have it.
What it is used for. Where a strictly positive output is required and smoothness matters: a predicted variance, a rate parameter, a scale in a distribution. Chapter I.13 uses it exactly there.