hardDeep Learning & Neural NetworksReviewed Jul 24, 2026

What are vanishing and exploding gradients, and how do you address them?

In deep networks, backpropagation multiplies many gradient terms together. If those terms are consistently below 1, the product shrinks toward zero (vanishing gradients), so early layers barely update and training stalls. If terms exceed 1, the product blows up (exploding gradients), causing unstable, NaN-prone updates. Saturating activations like sigmoid and tanh worsen vanishing because their derivatives are small. Fixes include: using ReLU or its variants that don't saturate for positive inputs; careful weight initialization (He for ReLU, Xavier/Glorot for tanh) to keep signal variance stable; batch or layer normalization; and residual/skip connections that give gradients a direct path backward. Exploding gradients are commonly tamed with gradient clipping. These problems are especially acute in RNNs, which motivated LSTM and GRU gating.

gradientstrainingrnninitialization

More Deep Learning & Neural Networks questions

See all Deep Learning & Neural Networks questions →