Lesson 7.5 · 8 min read · about 50 min to master at a very slow pace
Multiple Paths and Deeper Networks
When a hidden unit feeds several outputs, its gradient is a sum over paths. A two-hidden-layer, two-output example, the general backward recursion, and how it explains vanishing gradients.
A network with fan-out
Two hidden layers (outputs , then ) and two outputs . A bar marks a pre-activation, so and . The cost for one example is
Last layer: one path each
Second layer: sum over both outputs
feeds both and , so a weight into affects the cost along two paths, and the contributions add:
The first layer follows the same way and reuses the bracketed terms already computed. That reuse is what backpropagation is.
Common error
Following only one path when a node fans out to several outputs. The derivative with respect to a shared node is the sum over every downstream path. Draw the network and trace each path.
The general recursion
For any depth, with :
The matrix product does the summing over paths automatically. Unrolled, it shows one activation-derivative factor per layer, which is exactly why deep sigmoid networks suffer vanishing gradients (Section 4).
Stuck? Common doubts
Questions real learners asked while studying this lesson. They stay closed so they don't spoil your own thinking: open only the ones you need.
First passWhere does the sum appear in the matrix formula?
In : row of times is , the sum over every unit that unit feeds into, each weighted by its connecting weight. So the matrix form and the "sum over paths" rule are the same thing.
Cheatsheet
Fan-out
Backward recursion
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.