How does backpropagation apply the chain rule?hard

Type
conceptual
Topic
neural-networks
Frequency
very common
Tags
neural, networks
Answer

Backpropagation computes gradients layer by layer from the output back to the input, multiplying local derivatives at each layer using the chain rule - efficiently propagating the loss gradient to every weight.

Explanation

Forward pass: compute activations at each layer, storing intermediate values. Backward pass: start from the loss ∂L/∂ŷ, then apply chain rule: ∂L/∂wₗ = (∂L/∂aₗ₊₁) × (∂aₗ₊₁/∂wₗ). Each layer multiplies the incoming gradient by its local Jacobian. Vanishing gradients occur when layer derivatives are small (sigmoid activations < 0.25) - gradients shrink toward zero in early layers, slowing learning. ReLU mitigates this because its derivative is either 0 or 1.

Follow-upWhat causes vanishing gradients and how is it addressed?