The evolution of activation functions is the main thread of nonlinearity in deep learning. Sigmoid squashes to
(0,1):
σ(x)=1+e−x1 with derivative
σ′(x)=σ(x)(1−σ(x))=σ(1−σ), peaking at only
0.25 and saturating at both ends — under deep chain multiplication the gradient inevitably vanishes; Tanh is zero-centered with peak derivative 1 but still saturates. ReLU:
ReLU(x)=max(0,x) has a constant gradient of 1 on the positive side, fixing vanishing gradients, but zero gradient on the negative side causes Dead ReLU; LeakyReLU patches it with a
0.01x slope. GELU weights by the standard normal CDF
Φ(x):
Φ(x)x+(1−Φ(x))0.5x (often approximated as
xσ(1.702x)), smooth with no hard cutoff — the default for BERT/GPT. SwiGLU brings gating into the FFN:
xσ(xWg)⊗(xWu), used by LLaMA/Mistral and other modern LLMs to replace ReLU.