[Paper Review] Recurrent neural networks: vanishing and exploding gradients are not the end of the story
The paper shows that as RNN memory grows, parameter changes cause output sensitivity to increase, revealing a curse of memory beyond vanishing/exploding gradients, and highlights diagonal architectures and normalization/reparametrization as mitigating strategies.
Recurrent neural networks (RNNs) notoriously struggle to learn long-term memories, primarily due to vanishing and exploding gradients. The recent success of state-space models (SSMs), a subclass of RNNs, to overcome such difficulties challenges our theoretical understanding. In this paper, we delve into the optimization challenges of RNNs and discover that, as the memory of a network increases, changes in its parameters result in increasingly large output variations, making gradient-based learning highly sensitive, even without exploding gradients. Our analysis further reveals the importance of the element-wise recurrence design pattern combined with careful parametrizations in mitigating this effect. This feature is present in SSMs, as well as in other architectures, such as LSTMs. Overall, our insights provide a new explanation for some of the difficulties in gradient-based learning of RNNs and why some architectures perform better than others.
Motivation & Objective
- Investigate why longer memory in RNNs leads to increased sensitivity to parameter changes even when dynamics are stable.
- Analyze signal propagation in linear diagonal RNNs to quantify forward and backward explosion as memory grows.
- Show how state-space models and gated architectures mitigate the curse of memory.
- Demonstrate through a teacher-student task the impact of diagonality and adaptive optimization on learning long-range dependencies.
Proposed method
- Formulate the recurrent update and backpropagation equations to separate partial and total derivatives in RNNs.
- Derive forward hidden-state variance as a function of memory parameter and input autocorrelation to show forward amplification.
- Derive backward-gradient variance and the Hessian structure to illustrate backward sensitivity and optimization difficulty.
- Extend the analysis to non-diagonal linear RNNs via eigen-decomposition to compare parameter sensitivity.
- Propose normalization and reparametrization strategies to stabilize both forward and backward passes across memory scales.
- Compare diagonal complex-valued RNNs, LRUs, and fully-connected RNNs in teacher-student setups to assess optimization landscapes.
Experimental results
Research questions
- RQ1How does increasing memory in RNNs affect the sensitivity of hidden states to parameter changes despite stable dynamics?
- RQ2Can normalization and reparametrization mitigate memory-induced gradient sensitivity, and how do diagonally structured models compare to fully connected ones?
- RQ3Why do architectures like SSMs and LSTMs help with signal propagation and optimization when memory length grows?
- RQ4What is the role of adaptive learning rates in handling the Hessian-induced curvature associated with memory?
Key findings
- Hidden-state variance and gradient sensitivity explode as memory grows even when spectral radius is near or below one.
- Forward and backward signal propagation deteriorates with longer memory, especially with correlated inputs, due to the curse of memory.
- Diagonal/complex-valued and gated architectures, along with input normalization and eigenvalue reparametrization, substantially mitigate memory-induced instability.
- LRUs and SSMs outperform fully connected linear RNNs on long-memory teacher-student tasks, with fewer parameters.
- Adaptive optimizers benefit from the structured Hessian when eigenvalues are aligned with canonical directions, enabling larger effective learning rates.
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.