arXiv(opens in a new tab)cs.LGNov 2012Cited by 21 papers on PaperVantageClassic Paper

Manuscript Offprint

arXiv:1211.5063

On the difficulty of training Recurrent Neural Networks

Razvan Pascanu, Tomas Mikolov, Yoshua Bengio

Abstract

There are two widely known issues with properly training Recurrent Neural Networks, the vanishing and the exploding gradient problems detailed in Bengio et al. (1994). In this paper we attempt to improve the understanding of the underlying issues by exploring these problems from an analytical, a geometric and a dynamical systems perspective. Our analysis is used to justify a simple yet effective solution. We propose a gradient norm clipping strategy to deal with exploding gradients and a soft constraint for the vanishing gradients problem. We validate empirically our hypothesis and proposed solutions in the experimental section.

Keywords:

recurrent neural networks, vanishing gradients, exploding gradients

References (34)

  • Theano: new features and speed improvements
  • The problem of learning long-term dependencies in recurrent networks
  • Learning long-term dependencies with gradient descent is difficult
  • Advances in optimizing recurrent networks (opens arXiv in a new tab)
  • Theano: a CPU and GPU math expression compiler
  • Modeling temporal dependencies in high-dimensional sequences: Application to polyphonic music generation and transcription
  • Bifurcations of recurrent neural networks in gradient descent learning
  • and Yoshizawa, S
  • C., Hazan, E., and Singer, Y
  • Finding structure in time
  • A Novel Connectionist System for Unconstrained Handwriting Recognition
  • and Schmidhuber, J
  • Long short-term memory in echo state networks: Details of a simulation study
  • Optimization and applications of echo state networks with leaky- integrator neurons
  • and Jaeger, H
  • and Sutskever, I
  • Statistical Language Models based on Neural Networks
  • Empirical evaluation and combination of advanced language modeling techniques
  • Subword language modeling with neural networks
  • and Fiesler, E
  • Nonlinear Dynamics And Chaos: With Applications To Physics, Biology, Chemistry, And Engineering (Studies in Nonlinearity)
  • Generating text with recurrent neural networks
  • The model needs to predict the sum of the two random numbers after the entire sequence was seen
  • The learning rate is set to .01 and the factor $\alpha$ in front of the regularization term is 0.5
  • We manage to get a success rate of 100% at solving this task, which outperforms the results presented in Martens and Sutskever (2011) (using Hessian Free), where we see a decline in success rate as the length of the sequence gets closer to 200 steps
  • We used the same hyper-parameters as for the previous case, and obtained very similar results
  • The sequence entries are uniformly sampled from the distractor symbols everywhere except at two random positions, the first position sampled from $[\frac{T}{10},\frac{2T}{10}]$, while the second from $[\frac{4T}{10},\frac{5T}{10}]$
  • The cut-off threshold for clipping the norm of the gradient is left to 6
  • As before we outperform the state of the art while training a single model that is able to generalize to new sequence lengths
  • The cutoff threshold is left to 6
  • After these $T$ steps the model needs to generate the pattern seen initially
  • The cut-off coefficient threshold is the same in all cases, namely 8 (note that one has to take the mean over the sequence length when computing the gradients)
  • For the regularized model we used a initial value for regularization coefficient $\alpha$ of 0.5, where $\alpha$ follows a $1/t$ schedule, i.e
  • The model is trained over sequences of 200 steps, where the hidden state is carried over from one step to the next one