I knew backprop conceptually but writing out the actual partial derivatives layer by layer under pressure is a different thing.
Start by defining the network architecture and notation, then systematically derive the forward pass, loss, backward pass using the chain rule, and parameter updates. Use matrix calculus to keep the derivation concise and general for any layer.
Pro tip: Emphasize the modularity of backpropagation: the same gradient computation applies to any layer, and vectorizing across layers and batches is key for efficiency. Mention that this derivation is the foundation for frameworks like PyTorch and TensorFlow.
Specify an L-layer feed-forward network with layer sizes, activation functions, and notation for weights, biases, pre-activations, and activations.
Write the linear transformation and activation for each layer: z^(l) = W^(l) a^(l-1) + b^(l), a^(l) = f^(l)(z^(l)).
Choose a loss function (e.g., cross-entropy for classification or MSE for regression) and express it in terms of the final layer output.
Apply the chain rule to derive the error term δ^(l) for each layer, then compute gradients w.r.t. weights and biases: ∂L/∂W^(l) = δ^(l) (a^(l-1))^T, ∂L/∂b^(l) = δ^(l).
State the gradient descent update: W^(l) ← W^(l) - η ∂L/∂W^(l), b^(l) ← b^(l) - η ∂L/∂b^(l), and mention extensions like SGD with momentum or Adam.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.