DEEP LEARNING · INTERVIEW QUESTION
What is the main purpose of residual connections in very deep networks?
⚫ expert · Architecture · Residuals
Hint: Focus on the decision rule, assumptions, and failure mode behind architecture · residuals.
Answer
Residual paths create shorter gradient routes and allow layers to refine representations rather than relearn full transformations.
Interview reasoning
For a residual y=x+F(x), the gradient includes an identity path as well as the branch Jacobian. This helps optimization across depth.
For y=x+F(x), the local input derivative includes I+J_F. The identity route helps optimization by propagating a direct gradient and letting a block learn a correction. A dimension-changing shortcut needs a compatible projection; residuals do not guarantee every deep-network gradient stays bounded.
Worked example. When F initially outputs near zero, an equal-shape block approximates identity, preserving earlier features instead of requiring a full new mapping.
Validation
Compare layer-wise gradients and matched architectures with and without skips.
Check skip shapes, gradient norms and trainability against an equal-depth plain network with comparable parameters.
Common pitfalls
Residual scaling and normalization can still make a deep network unstable.
Broadcasting can hide shape bugs. Repeated residual branches can still amplify gradients, and improved training fit is not automatic improved generalization.
Likely follow-up: Compare layer-wise gradients and matched architectures with and without skips.