AdvancedAbout 22 min

    Vanishing & Exploding Gradients

    Read the full article on Substack

    6 min read.

    Deep networks were mostly abandoned in the early 2000s because of this. A real forward and backward pass through real weight matrices, measuring what the gradient actually does on the way down — sigmoid loses eight orders of magnitude across twelve layers, ReLU with He initialization loses none.

    1e-91e-71e-51e-31e-11e1Layer 1: 2.32e-81Layer 2: 1.11e-72Layer 3: 4.53e-73Layer 4: 2.00e-64Layer 5: 8.66e-65Layer 6: 3.55e-56Layer 7: 1.41e-47Layer 8: 6.31e-48Layer 9: 2.72e-39Layer 10: 1.22e-210Layer 11: 5.36e-211Layer 12: 2.34e-112
    Vanishing: gradient 2.3e-1 at layer 12, 2.3e-8 at layer 1. The lower layers get almost no signal, so they barely learn.

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Vanishing or exploding?

    Sort

    Sort each symptom and each fix.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    Vanishing

    Drop items here

    Exploding

    Drop items here
    6 pieces left to place

    Quiz

    20 questions
    Question 1 of 20
    Score: 0

    The vanishing gradients problem means that during backpropagation:

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going