Skip to content
nonconvexcard

The RNN gradient is a repeated matrix product

ProofIntermediate⏱ 30 minDeep Learningrnnvanishing gradientbpttspectral radius

Problem

Derive the backpropagation-through-time gradient for a vanilla RNN and show that its norm is controlled by (∥ρ′∥∞∥W∥)T(\|\rho'\|_\infty\|W\|)^{T}. Explain why the repeated use of the same WW makes the situation worse than for a feedforward network of the same depth.

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
Receptive field growth with depth and dilationDeep LearningNumericalBeginner15 min
Convolution diagonalises in the Fourier basisDeep LearningProofIntermediate30 min
Gradient magnitude through a deep chainDeep LearningProofIntermediate30 min
Translation-equivariant linear maps are convolutionsDeep LearningProofIntermediate30 min
Normalisation makes weights scale-invariantDeep LearningProofAdvanced30 min