One Layer's Share of the Blame

BackpropagationEasy+10 XP+10

One Layer's Share of the Blame

A hidden layer takes 4 inputs and has 3 ReLU neurons, so it holds 4×3=124 \times 3 = 124×3=12 weights and 333 biases: 15 parameters in all. Neuron iii computes the weighted sum

zi=wi1a1+wi2a2+wi3a3+wi4a4+biz_i = w_{i1}a_1 + w_{i2}a_2 + w_{i3}a_3 + w_{i4}a_4 + b_izi​=wi1​a1​+wi2​a2​+wi3​a3​+wi4​a4​+bi​

and sends ReLU(zi)\text{ReLU}(z_i)ReLU(zi​) on to the next layer. So wijw_{ij}wij​ is the weight that carries input aja_jaj​ into neuron iii.

During the forward pass on one training example, the layer cached its inputs and its weighted sums. Here are the inputs:

inputa1a_1a1​a2a_2a2​a3a_3a3​a4a_4a4​
value0.80.80.80001.51.51.5000

The two zeros come from neurons in the layer below that fell silent.

The backward pass has already worked its way from the output down to this layer. The last column below is the blame it delivered to each neuron's output, ∂L∂ ReLU(zi)\dfrac{\partial L}{\partial\, \text{ReLU}(z_i)}∂ReLU(zi​)∂L​: how much the loss changes per unit nudge of what that neuron sent onward.

neuron iiicached weighted sum ziz_izi​blame arriving at its output
11.21.21.2−0.5-0.5−0.5
2−0.4-0.4−0.42.02.02.0
30.30.30.3−0.7-0.7−0.7

The backward pass now computes a gradient for every one of the layer's 15 parameters.

How many of the 15 parameters get a gradient of exactly zero on this example?

The answer is a whole number.

Hints

Solve it to unlock the solution

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