SDE & MLE Prep

Activation Functions & Vanishing Gradients

Q: Why ReLU? What are vanishing/exploding gradients?

ActivationFormulaNotes
Sigmoid1/(1+e^{−x})saturates → gradients ≤ 0.25 vanish; outputs not zero-centred; use for binary outputs/gates
Tanh(eˣ−e^{−x})/(eˣ+e^{−x})zero-centred, still saturates
ReLUmax(0, x)cheap, no saturation for x>0; "dead ReLU" units
Leaky ReLU / ELUsmall slope for x<0avoids dead units
GELU / SiLU (Swish)x·Φ(x), x·σ(x)smooth; standard in transformers

Deep chains multiply many Jacobians: norms below 1 → vanishing, above 1 → exploding. Fixes: ReLU-family activations, careful initialization (Xavier/Glorot for tanh, He/Kaiming for ReLU), normalization layers, residual connections (gradient highway), gradient clipping (exploding, esp. RNNs), LSTM/GRU gating.