One Full Turn of the Loop

BackpropagationHard+30 XP+30

One Full Turn of the Loop

A toy regression network, small enough to train by hand, takes two inputs, has two ReLU hidden neurons, and has one output neuron with no activation:

h1=ReLU(w11x1+w12x2+b1),h2=ReLU(w21x1+w22x2+b2)h_1 = \text{ReLU}(w_{11}x_1 + w_{12}x_2 + b_1), \qquad h_2 = \text{ReLU}(w_{21}x_1 + w_{22}x_2 + b_2)h1​=ReLU(w11​x1​+w12​x2​+b1​),h2​=ReLU(w21​x1​+w22​x2​+b2​)

y^=v1h1+v2h2+c\hat y = v_1 h_1 + v_2 h_2 + cy^​=v1​h1​+v2​h2​+c

Its nine parameters currently are:

neuronfirst incoming weightsecond incoming weightbias
hidden 1 (fed by x1,x2x_1, x_2x1​,x2​)w11=0.5w_{11} = 0.5w11​=0.5w12=0.25w_{12} = 0.25w12​=0.25b1=0b_1 = 0b1​=0
hidden 2 (fed by x1,x2x_1, x_2x1​,x2​)w21=−0.5w_{21} = -0.5w21​=−0.5w22=0.75w_{22} = 0.75w22​=0.75b2=0.5b_2 = 0.5b2​=0.5
output (fed by h1,h2h_1, h_2h1​,h2​)v1=1v_1 = 1v1​=1v2=−0.5v_2 = -0.5v2​=−0.5c=0.25c = 0.25c=0.25

The training example is x1=1x_1 = 1x1​=1, x2=2x_2 = 2x2​=2 with target y=2y = 2y=2. The loss is the squared error on this one example, L=(y^−y)2L = (\hat y - y)^2L=(y^​−y)2.

Run one complete training step on this example: forward, loss, backward, update. The update is plain gradient descent on every weight and bias,

p←p−η ∂L∂p,η=0.02p \leftarrow p - \eta\, \frac{\partial L}{\partial p}, \qquad \eta = 0.02p←p−η∂p∂L​,η=0.02

Then run the forward pass again on the same example, using the updated parameters.

What is the loss now?

Round to 3 decimal places.

Hints

Solve it to unlock the solution

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