Loading slide

Why Shallow Networks Failed

  1. 01Why Shallow Networks Failed
  2. 02Memory card
  3. 03What "deep" actually means
  4. 04The vanishing gradient
  5. 05A small step inside each neuron
  6. 06Why bother bending the number?
  7. 07The bend they chose
  8. 08How the flat ends starve the signal
  9. 09The absurdly simple fix
  10. 10Take a breath
  11. 11Other fixes
  12. 12Depth vs. width
  13. 13Memory card
  14. 14The research gap
  15. 15Reinforce your understanding
  16. 16Question: The vanishing gradient
  17. 17Question: Why does a simple fix work?
  18. 18Question: Why does depth matter?
  19. 19Quiz: answer
  20. 20The one idea to keep
  21. 21The gradient problem was solved. What was still missing was scale.
  22. 22Want to go deeper?
4 / 21
BackNext

The vanishing gradient

You just recalled how a network learns. sends an error signal backwards through the network, from the output all the way to the first layer, and each layer uses that signal to adjust its weights. That is how the front of the network gets told what to do.

Here is the problem. At each layer the signal travels back through, it gets a little weaker. Not because anything malfunctions, but because of the arithmetic involved. By the time it reaches the early layers, after passing back through ten, twenty, thirty of them, it has shrunk to almost nothing.

So the early layers barely move. Remember what "learning" means here: adjusting the weights, the dials inside each neuron, in response to the error signal. A strong signal means a big, confident adjustment. A signal shrunk to almost nothing means almost no adjustment at all. The weights in the front of the network sit there, barely changing, guess after guess. The network can see it is getting things wrong, but the message telling the front how to fix itself never arrives with any strength.

Add more layers, and it gets worse. The further a layer sits from the output, the fainter the signal that reaches it.

This was the vanishing gradient problem, and it was the obstacle the whole chapter is named for. The design worked on paper. In practice, the deeper you built, the harder it became to train the front of the network. And the front was exactly where the most basic work happens.

Remember from the last module: in a network that looks at images, the first layer is the one that learns to spot edges, the tiny differences in brightness between neighboring pixels. Later layers combine those edges into shapes, shapes into parts, parts into whole concepts like "face." Every later layer is built on top of what the front detects. So if the front never learns to see edges properly, everything stacked above it is building on sand. The vanishing gradient was starving the network exactly where its foundation was supposed to form.

Deep networks were, in theory, more powerful than shallow ones. Training them reliably was another matter entirely.

Did you know?

The word "gradient" is just the math name for that backwards signal: it measures which direction to nudge each weight, and by how much. "Vanishing" is literal. Picture a whisper passed down a long line of people. Each person repeats it a touch more quietly, and by the far end there is nothing left to hear. The signal does not get corrupted. It simply fades to silence.
Citations(2)↓
  1. 1. deeplearningbook.org
  2. 2. ibm.com
Citations(2)↓
  1. 1. deeplearningbook.org
  2. 2. ibm.com