Explain the vanishing gradient problem and how to solve it.
Short Answer
In deep networks, gradients become exponentially small as they backpropagate through layers (especially with sigmoid/tanh), making early layers learn very slowly or not at all.
Solutions
- ReLU activation (gradients don't shrink for positive values)
- Residual connections (skip connections in ResNet)
- Batch Normalization (keeps activations in good range)
- Proper weight initialization (He, Xavier/Glorot)
- LSTM/GRU for recurrent networks (gating mechanism)
💡 Memory Trick: "Vanishing = signal fading over distance. Fix: shortcuts (ResNet), better activations (ReLU), normalization"