Explain Vanishing Gradients and Why Residual Connections Fix Them

Last updated: November 29, 2026

Quick Overview

Explain why very deep plain networks are hard to train, what vanishing and exploding gradients are, and how residual connections (as in ResNet, from Microsoft Research) make networks with a hundred or more layers trainable.

Microsoft
Machine Learning
Software Engineer
Microsoft
November 29, 2026
Software Engineer
Phone Screen
Machine Learning
Easy

0

0

0 solved


Explain why very deep plain networks are hard to train, what vanishing and exploding gradients are, and how residual connections (as in ResNet, from Microsoft Research) make networks with a hundred or more layers trainable.

ResNet came from Microsoft Research Asia and residual connections are in every transformer behind Copilot, so this is a natural deep learning fundamentals question for ML-leaning software engineers. The interviewer wants a clean chain-rule explanation and the identity-path insight.

What the Interviewer Expects
  • Explain backprop as a product of per-layer Jacobians
  • Show why products of small or large factors vanish or explode
  • Mention sigmoid saturation and initialization
  • Write the residual form y = x + F(x) and its gradient
  • Note the degradation problem (deeper plain nets train worse, not just overfit)
Key Topics to Cover
vanishing gradients
residual connections
backpropagation
initialization
deep networks
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • How do ReLU and careful initialization help on their own?
  • Where does layer normalization go in a pre-norm transformer and why?
  • Why does gradient clipping help with explosions but not vanishing?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

I will explain the problem with the chain rule and then show why the residual form changes it....

Approach

For a stack hl+1=fl(hl)h_{l+1} = f_l(h_l), the gradient of the loss with respect to an early layer is


Submit Your Answer
Markdown supported