Loading slide

The Problem with Sequences

  1. 01The Problem with Sequences
  2. 02Memory card
  3. 03Reading through a keyhole
  4. 04The running summary
  5. 05The bottleneck
  6. 06Take a breath
  7. 07The distance problem
  8. 08Memory card
  9. 09The same problem, wearing a new coat
  10. 10What a solution would have to do
  11. 11Reinforce your understanding
  12. 12Question: The hidden state
  13. 13Question: Long-range dependencies
  14. 14Question: The same problem twice
  15. 15Quiz: answer
  16. 16What to carry out of this chapter
  17. 17Want to go deeper?
9 / 16
BackNext

The same problem, wearing a new coat

The fading you just recalled is not merely like the distance problem. It is the same problem.

In the going-deeper module, the vanishing gradient was about depth: the training signal travelled backwards through many stacked layers, fading a little at each one, until the front of the network barely heard it. A whisper down a line of people, dying before it reached the end.

Here, the line is not stacked layers. It is the words of the sentence themselves, laid out end to end. The RNN reads them one after another, and information has to ride forward from word to word, fading a little at each handoff. "Animal" trying to reach "it" is a whisper travelling down a line nine people long.

Same shape, two settings. A long chain, a message that weakens at every link, and the two ends unable to truly hear each other. In a deep network the chain was the layers. In an RNN the chain is the sentence. The deeper insight is that the chain itself is the enemy. Any design where far-apart things must communicate by passing a message through everything in between will fade over distance. It is baked into the shape.

Which tells you exactly what a real fix would have to do. Not patch the chain. Not make the whisper a touch louder. Get rid of the chain entirely, so that any two words can reach each other directly, no matter how far apart they sit, with nothing in between to fade through. That is the bar. The last slide of this chapter is what clearing it would look like.

Citations(2)↓
  1. 1. colah.github.io
  2. 2. karpathy.github.io