Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

On the difficulty of training Recurrent Neural Networks

Gradient clipping and a soft penalty fix exploding and vanishing gradients in recurrent networks

  • Problem Recurrent networks trained with backpropagation through time see gradients explode or vanish over long sequences. Both failures come from the same product, so training struggles to link distant events.
  • Method The authors rescale gradients above a fixed norm threshold. For vanishing gradients they add a penalty that keeps error norms steady across steps.
  • Results SGD-CR reached a 100% success rate on temporal order sequences up to 200 steps, where SGD and SGD-C failed on longer sequences.

Why gradients break over long sequences

A recurrent network carries a hidden state from one step to the next, so earlier inputs can shape later predictions. Training it with Backpropagation Through Time means unrolling the model into a deep network with one copy per time step. The total gradient is a sum of temporal contributions, and each one contains a product of Jacobian matrices that spans the gap between two steps.

When that product grows, the exploding gradients problem appears; when it shrinks, the vanishing gradients problem appears.

A sudden norm spike can ruin a single update, while vanishing long-term terms leave the model unable to link events that are far apart. Both failures come from the same product, which is why the paper treats them together.

Clipping and a soft norm penalty

For exploding gradients, the key idea is to rescale any gradient whose norm passes a fixed threshold back down to that threshold before the update. For vanishing gradients the authors don't clip anything; they add a penalty to the training objective instead, because increasing the norm of the Jacobian products can't always follow a descent direction of the error.

The penalty compares the norm of the error signal after one Jacobian step with the norm before it, and it is minimized when that ratio is one. The authors use only the immediate partial derivative with respect to the recurrent weights, treating the error and the state as constants, which keeps the computation cheap. Because it is a preference rather than a hard rule, it does not guarantee that the error norm stays fixed.

Clipping keeps the direction of the step and only caps its length, which is simple to implement and cheap to compute. It adds one hyper-parameter, the threshold, and the authors suggest setting it from statistics of the average norm over many updates.

Why the linear analysis predicts blow-up

For a linear version of the model, the analysis uses the power iteration method on the product of Jacobian matrices. In that case the largest eigenvalue λ1 of the recurrent weight matrix decides the outcome: a value below 1 makes long-term components vanish, and a value above 1 is needed for gradients to explode.

For nonlinear σ whose derivative is bounded by γ, the authors prove that a λ1 below 1/γ is sufficient for the vanishing gradient problem. The bound is γ = 1 for tanh and γ = 1/4 for sigmoid, so the sigmoid case allows a larger recurrent eigenvalue before the explosion condition is reached.

The authors also view the model as a dynamical system, where bifurcations and crossings of basin boundaries could make the state jump. They hypothesize that when gradients explode along a direction, the curvature also grows along that direction, which creates a steep wall in the error surface.

Temporal order results

The temporal order task places two symbols at separated points in a long sequence of distractor symbols and asks for their order. The authors compare SGD, SGD-C and SGD-CR by success rate as the sequence length grows on a log scale.

Neither SGD nor SGD-C solves sequences longer than 20, and the authors attribute this to vanishing gradients. As long as vanishing isn't the main obstacle, adding the exploding-gradient fix raises the success rate, which the authors read as evidence that exploding gradients are tied to tasks needing long memory.

SGD-CR reached a 100% success rate for sequences up to 200 steps, the maximum used by Martens and Sutskever. A single model trained on lengths from 50 to 200 also generalized to sequences twice as long as those seen in training.

Other pathological tasks

SGD-CR also reached 100% on most of the other pathological tasks from Hochreiter and Schmidhuber, including addition, multiplication and noiseless memorization. For the first four of those problems a single model covered lengths up to 200, while noiseless memorization used a separate model for each length. The random permutation problem was the exception, and only one of eight trials succeeded.

The authors report higher success rates than Martens and Sutskever and longer sequences than Hochreiter and Schmidhuber.

Music and language results

On Piano-midi.de, test negative log likelihood per time step fell from 7.56 under SGD to 7.46 with SGD-CR. On Nottingham it fell from 3.80 to 3.46, while on MuseData the authors report matching the state of the art, which uses a different architecture.

On Penn Treebank next character prediction, test entropy went from 1.50 bits per character with SGD to 1.42 with clipping and 1.41 with SGD-CR. Because the training error also improves, the authors conclude that clipping fixes an optimization issue rather than acting as a regularizer.

Limitations

The regularizer only prefers solutions that preserve the error norm, so it gives no guarantee. The authors note that preventing vanishing gradients can push the model toward basin boundaries, making explosions more likely, so clipping stays necessary. Teacher forcing needs a target defined at every time step. Echo State Networks avoid the gradient problem by not learning their recurrent weights, but they struggle with long-term dependencies.

In the authors' experiments, training was not very sensitive to the clipping threshold for a given task and model size.

Paper info

Authors
Razvan Pascanu, Tomas Mikolov, Yoshua Bengio
Venue
arXiv · Preprint
First published
2012-11-21
Added
2026-11-12
Updated
2013-2-16
Version
v2
arXiv
1211.5063
Category
cs.LG
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Razvan Pascanu, Tomas Mikolov, Yoshua Bengio (2012). On the difficulty of training Recurrent Neural Networks. arXiv:1211.5063v2. https://arxiv.org/abs/1211.5063v2

BibTeX
@misc{pascanu2012difficulty,
  title = {{On the difficulty of training Recurrent Neural Networks}},
  author = {Razvan Pascanu and Tomas Mikolov and Yoshua Bengio},
  year = {2012},
  eprint = {1211.5063},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1211.5063v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up