Why deep networks can stop learning: vanishing gradients
During training, the error signal (the gradient) travels backwards from the output to the first layer. At every layer it gets multiplied by that layer's slope. With the old sigmoid activation, the slope is at most 0.25, so after many layers the signal shrinks to almost nothing and the early layers stop learning. This is the vanishing gradient problem. Modern networks use ReLU (slope 1 for active neurons) and other tricks, so the signal survives.
Everyday analogy
A game of Chinese whispers in a long line: if each person passes on only a quarter of what they heard, the message is lost long before it reaches the start of the line.
Example
Train a 10-layer network both ways: with sigmoid, the first layers barely change and the network learns slowly; with ReLU, every layer keeps learning.
How much of the learning signal reaches each layer (simplified)
| Layer | With sigmoid (× 0.25 each layer) | With ReLU (× 1 for active neurons) |
|---|---|---|
| Layer 10 (next to the output) | 100% | 100% |
| Layer 9 | 25% | 100% |
| Layer 8 | 6% | 100% |
| Layer 6 | 0.4% | 100% |
| Layer 1 (the first layer) | about 0.0004%: almost nothing | still strong |
Real networks are more complex, but this is why the switch to ReLU, along with techniques like residual connections and normalisation, made very deep networks (and today's LLMs) possible.
Try it yourself
About 5 minWatch a signal fade
- Start with the number 1.
- Multiply it by 0.5 ten times (a calculator helps) and write each result.
- Now multiply 1 by 1.0 ten times and compare.
What you should see: With 0.5 the signal almost disappears after 10 layers. That is the vanishing gradient problem.
Use any free AI chatbot (ChatGPT, Claude, Gemini or Copilot). Never paste private or confidential information.