Skip to content
nonconvexcard

Derive the backpropagation recursion

ProofIntermediate⏱ 30 minDeep Learningbackpropagationchain ruleadjoint

Problem

For a feedforward network z(ℓ)=W(ℓ)a(ℓ−1)+b(ℓ)z^{(\ell)} = W^{(\ell)}a^{(\ell-1)}+b^{(\ell)}, a(ℓ)=ρ(z(ℓ))a^{(\ell)} = \rho(z^{(\ell)}), derive

δ(ℓ)=((W(ℓ+1))⊤δ(ℓ+1))⊙ρ′(z(ℓ)),∂J∂W(ℓ)=δ(ℓ)(a(ℓ−1))⊤,\delta^{(\ell)} = \big((W^{(\ell+1)})^\top\delta^{(\ell+1)}\big)\odot\rho'(z^{(\ell)}), \qquad \frac{\partial\mathcal J}{\partial W^{(\ell)}} = \delta^{(\ell)}\big(a^{(\ell-1)}\big)^\top ,

and state the time and memory cost.

Write a complete argument. Every inequality you use should be one you could state precisely.

Solution

Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.

Related problems

All problems
SolvedProblemFieldTypeDifficultyTime
XOR is not linearly separableDeep LearningProofFoundation15 min
Gradient magnitude through a deep chainDeep LearningProofIntermediate30 min
Implement backpropagation from scratch runDeep LearningCodingIntermediate3 hours
Width needed to represent a piecewise linear functionDeep LearningProofAdvanced1 hour