Five activations at five points
numeric▲△△All values rounded to 4 d.p.
STATEMENT
Evaluate sigmoid, tanh, ReLU, LeakyReLU with slope , and GELU at . Then read four structural facts off the table that no single value shows.
GIVEN
with the standard normal CDF.
FIND
A table of values, and four properties visible only across it.
STRATEGY
Compute the two exponential families first, since tanh follows from sigmoid; the two rectifiers need no arithmetic at all; GELU needs .
SOLUTION
Step 1 — sigmoid. . By the symmetry , without further work. exactly. , so .
Step 2 — tanh from sigmoid. Using : , and . Odd symmetry gives the negatives.
Step 3 — the rectifiers. No arithmetic. ReLU zeroes the negatives and copies the positives; LeakyReLU scales the negatives by .
Step 4 — GELU. , so . so . , giving .
The table.
| ReLU | LeakyReLU | GELU | |||
|---|---|---|---|---|---|
Four structural facts.
Only sigmoid fails to pass zero to zero. . Every other column has . A layer of sigmoids therefore emits a nonzero mean even from centred input, and that offset compounds with depth — the historical reason tanh replaced sigmoid in hidden layers.
Sigmoid and tanh are bounded; the rectifiers are not. At the bounded pair are already at and , close to their ceilings, while ReLU returns and would return at . Boundedness is what causes saturation and also what prevents blow-up.
GELU is not monotonic. From to the output falls from to . No other column does this. GELU is a soft gate, not a soft switch, and this dip is where its behaviour genuinely differs from a smoothed ReLU.
GELU is close to ReLU where it matters and different where it does not. At the two differ by ; at they differ by . The whole difference lives in a band around the origin, which is exactly where gradients are decided.
Answer
The table above. The four properties: sigmoid alone has ; the bounded pair saturate while the rectifiers do not; GELU is non-monotonic on roughly; and GELU and ReLU agree away from the origin and differ only near it.
Check — numeric · i-3-b01-activation-values.py
def sigmoid(z): return 1.0 / (1.0 + exp(-z))
def gelu(z): return 0.5 * z * (1.0 + erf(z / sqrt(2.0)))Prints the table above, to 4 d.p.
Executed in CI. The digits above are the digits it printed.
Check — sanity
The symmetries hold. exactly, as requires. And to every printed digit.
The identity checks out. At : , against . The last digit differs by rounding of the intermediate, not by error.
GELU is between and for . and . Since and , that must hold — and it is the fastest way to catch a sign or scale slip.
Where this breaks
Every value here assumes the activation is applied to a scalar independently. That is what “elementwise” means, and it is why one table of five numbers characterises the function completely. Softmax is not elementwise — its output at one coordinate depends on all of them — so no such table exists for it, and it belongs to Chapter I.4 with the losses rather than here with the activations.
Variation
Add SiLU (also called Swish), , as a sixth column. Compare it with GELU at all five points and say where the two differ most.