To learn that the word at step 47 depends on the word at step 1, a recurrent network must send a blame signal 47 steps backward, and every step multiplies it by a factor. In a plain RNN you do not control that factor. In an LSTM the forget gate sets it. Move the sliders and watch what survives. The numbers come from rnn.py and gated.py, so they match the chapters.
Log scale. The line at 1 is a gradient that arrives at full strength. The dashed vertical line is the 47-step example of the chapter.
At the start of training the weights are small, so f is roughly σ(b_f). The default b_f = 0 is the most commonly skipped line in an LSTM implementation, and skipping it looks exactly like the model being incapable.
If the gradient is longer than a threshold, rescale it to the threshold and keep its direction. Move the sliders to feed in a gradient of any size.
The grey arrow is the gradient and the green one is what the optimiser uses. Clipping changes how far the step goes and never which way it points. It does nothing for the vanishing case, where the gradient is already too small.
This is Recurrent Networks, where the product of Jacobians appears, and Gated Recurrence, where the LSTM's forget gate puts the factor under the network's control. Run rnn.py and gated.py to print the same tables as text.