[Paper Review] Feedforward and Recurrent Neural Networks Backward Propagation and Hessian in Matrix Form
This paper presents a matrix-formulation of backpropagation and Hessian computation for feedforward and recurrent neural networks, deriving that the weight gradient is a rank-$ t $ matrix over $ t $ time steps and the Hessian is a sum of $ t^2 $ Kronecker products of rank-1 and $ W^TAW $ matrices. It further shows that mini-batch updates are rank-$ rt $, and provides eigenvalue bounds for the Hessian using Weyl's and singular value inequalities.
In this paper we focus on the linear algebra theory behind feedforward (FNN) and recurrent (RNN) neural networks. We review backward propagation, including backward propagation through time (BPTT). Also, we obtain a new exact expression for Hessian, which represents second order effects. We show that for $t$ time steps the weight gradient can be expressed as a rank-$t$ matrix, while the weight Hessian is as a sum of $t^{2}$ Kronecker products of rank-$1$ and $W^{T}AW$ matrices, for some matrix $A$ and weight matrix $W$. Also, we show that for a mini-batch of size $r$, the weight update can be expressed as a rank-$rt$ matrix. Finally, we briefly comment on the eigenvalues of the Hessian matrix.
Motivation & Objective
- To derive exact matrix expressions for the Hessian in feedforward and recurrent neural networks using linear algebra.
- To express the weight gradient and update rules in compact matrix forms for both FNNs and RNNs.
- To analyze the structure of the Hessian matrix in terms of Kronecker products and rank-1 components.
- To derive eigenvalue bounds for the Hessian using Weyl's theorem and singular value properties.
- To enable future development of novel optimization algorithms based on Hessian and gradient structure.
Proposed method
- Derives backward propagation and Backward Propagation Through Time (BPTT) in matrix form for FNNs and RNNs.
- Expresses the weight gradient as a rank-$ t $ matrix for RNNs over $ t $ time steps, and as rank-1 for FNNs.
- Represents the Hessian as a sum of $ t^2 $ Kronecker products of rank-1 matrices and $ W^TAW $-type terms.
- Uses Weyl's theorem and singular value inequalities to bound the eigenvalues of the Hessian matrix.
- Introduces auxiliary symmetric matrices $ B^{(k,t,s, heta)} $ to decompose the Hessian and analyze its spectral properties.
- Applies Frobenius norm-based loss and derives compact expressions for mini-batch updates as rank-$ rt $ matrices.
Experimental results
Research questions
- RQ1How can the Hessian of a feedforward or recurrent neural network be expressed in exact matrix form?
- RQ2What is the rank structure of the weight gradient and Hessian in RNNs over $ t $ time steps?
- RQ3How do the eigenvalues of the Hessian matrix relate to the network's activation patterns and weight matrices?
- RQ4Can the Hessian be decomposed into a sum of structured components such as Kronecker products?
- RQ5What are the tightest possible bounds on the Hessian’s eigenvalues using matrix inequalities?
Key findings
- The weight gradient for an RNN over $ t $ time steps is a rank-$ t $ matrix, while for a FNN it is rank-1.
- The Hessian matrix for an RNN over $ t $ time steps is expressed as a sum of $ t^2 $ Kronecker products of rank-1 and $ W^TAW $ matrices.
- For a mini-batch of size $ r $, the weight update is a rank-$ rt $ matrix, enabling efficient low-rank approximation.
- Eigenvalue bounds for the Hessian are derived using Weyl’s theorem and singular value inequalities, with bounds depending on activation norms and smaller matrix eigenvalues.
- The Hessian’s eigenvalues satisfy $ ho_{q}(H_w^{(k,t)}) riangleq ho_q(B^{(k,t)}) + ext{correction terms} $, where correction terms are bounded via $ ilde{C}^{(k,t,s, heta)} $ and activation norms.
- When $ s = heta = t $, the Hessian term $ B^{(k,t)} $ has eigenvalues $ ext{span}ig(0, || extbf{z}^{(k-1,t)}||_2^2 imes ext{eigenvalues of } ilde{C}^{(k,t,s,s)} ig) $, with multiplicity $ (n-1)m $ for zero eigenvalues.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.