Gradients vanish when repeated multiplication of small derivatives during backpropagation shrinks the signal toward zero before it reaches early layers, so those layers stop learning. Saturating activations like sigmoid and tanh are the classic cause. Modern fixes are ReLU family activations, residual connections that give gradients a direct path, scaled initialization such as He or Xavier, and normalization layers.
Why interviewers ask this
This tests whether you understand why architectures look the way they do rather than just knowing their names. The interviewer wants the chain rule explanation, not the buzzword. Mentioning that residual connections provide an identity path for the gradient, and that normalization keeps activations in a well conditioned range, shows you could actually debug a deep model that refuses to train.
How to structure your answer
- Explain the chain rule multiplication that shrinks the signal.
- Name the saturating activations that cause it.
- Explain residual connections as an identity path for gradients.
- Add initialization and normalization as the other half of the fix.
Example answer
Backprop multiplies derivatives layer by layer. If each layer's local derivative is less than one, and you have fifty of them, the product heads to zero exponentially and the early layers get essentially no gradient, so they never move off their initialization. Sigmoid is the classic culprit because its derivative maxes out at 0.25, so you lose at least three quarters of the signal per layer even in the best case. The fixes stack. ReLU has a derivative of exactly one on the positive side, so it does not shrink anything. Residual connections are the big one: because the output is x plus f of x, the gradient gets an identity path straight back, so even if a block contributes nothing useful, the signal still reaches the layers below it. That is why we can train very deep stacks at all. Then initialization scaled to fan in, He for ReLU, keeps activation variance stable at the start, and layer norm keeps it stable during training. When I see a deep model where loss barely moves, the first thing I plot is gradient norm per layer, because that tells you immediately whether the bottom of the network is receiving anything.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- What does the exploding gradient case look like, and how do you handle it?
- Why does gradient clipping help, and where do you apply it?
- How do residual connections change the effective depth of a network?
Related machine learning engineer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions