DEEP LEARNING ยท INTERVIEW QUESTION
Explain the key innovations in ResNet. Why do residual connections work?
๐ก intermediate ยท CNNs
Hint: Identity shortcuts allow gradient flow and make deeper networks trainable.
Answer
ResNet (2015) introduced residual connections: y = F(x) + x, where F is the residual function (conv layers). The network learns the residual F(x) = H(x) - x instead of the full mapping H(x).
Interview reasoning
Why it works:
- Identity shortcuts provide a direct derivative path and often improve gradient flow; cancellation or amplification in I + J_F can still occur
- Easier to learn residual (small corrections) than full mapping
- Enables training very deep networks (152+ layers)
- Acts like an ensemble of shallow networks.
Key innovations: skip connections, bottleneck blocks (1ร1 โ 3ร3 โ 1ร1 convolutions for efficiency).
Impact: enabled training deeper networks than ever, became the default architecture backbone. Extensions: DenseNet (connect all layers), ResNeXt (grouped convolutions), EfficientNet (neural architecture search for scaling).
A residual block outputs x+F(x), producing a local derivative I+J_F and letting the branch learn a correction. Dimension changes require a projection. This optimization path helps deeper networks learn useful mappings but does not guarantee all Jacobian products remain stable or that more depth improves held-out quality.
Worked example. If an equal-shape branch initially outputs near zero, the block approximates identity; a channel-doubling block needs a compatible shortcut projection.
Validation
Check shapes, gradient norms and equal-depth plain-network baselines; distinguish training optimization from validation generalization.
Common pitfalls
Broadcasting can conceal a wrong shortcut. Residual branches can still amplify gradients or overfit, especially under poorly chosen initialization and learning rates.