Counting the Paths Backprop Skips

The Multivariate Chain RuleMedium+20 XP+20

Counting the Paths Backprop Skips

A network is laid out as a computational graph:

  • one input node xxx;
  • 10 hidden layers, each containing exactly 2 nodes;
  • both nodes of layer 111 take xxx as input, and every node in layer kkk takes both nodes of layer k−1k-1k−1 as inputs;
  • one output node LLL, which takes both nodes of layer 101010.

One way to get ∂L∂x\dfrac{\partial L}{\partial x}∂x∂L​ is to apply "multiply along each path, then add across paths" literally: list every distinct path from xxx to LLL, multiply the local derivatives along it, and sum the results. Backpropagation avoids this by visiting each edge just once.

How many distinct paths from xxx to LLL would the path-by-path method have to sum over?

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.

Select all that apply.