One Step on the Input, Not the Weights

Linear Algebra for Deep LearningHard+30 XP+30

One Step on the Input, Not the Weights

A two-layer network with a ReLU hidden layer computes

z=W1x+b1,h=ReLU(z),y^=W2h+b2,L=12∥y^−t∥2\mathbf{z} = W_1\mathbf{x} + \mathbf{b}_1, \qquad \mathbf{h} = \mathrm{ReLU}(\mathbf{z}), \qquad \hat{\mathbf{y}} = W_2\mathbf{h} + \mathbf{b}_2, \qquad L = \tfrac{1}{2}\left\lVert \hat{\mathbf{y}} - \mathbf{t} \right\rVert^2z=W1​x+b1​,h=ReLU(z),y^​=W2​h+b2​,L=21​∥y^​−t∥2

with

W1=[12−211−1],b1=[021],W2=[1−322−11],b2=[01]W_1 = \begin{bmatrix} 1 & 2 \\ -2 & 1 \\ 1 & -1 \end{bmatrix}, \quad \mathbf{b}_1 = \begin{bmatrix} 0 \\ 2 \\ 1 \end{bmatrix}, \qquad W_2 = \begin{bmatrix} 1 & -3 & 2 \\ 2 & -1 & 1 \end{bmatrix}, \quad \mathbf{b}_2 = \begin{bmatrix} 0 \\ 1 \end{bmatrix}W1​=​1−21​21−1​​,b1​=​021​​,W2​=[12​−3−1​21​],b2​=[01​]

The input and target are

x=[21],t=[57]\mathbf{x} = \begin{bmatrix} 2 \\ 1 \end{bmatrix}, \qquad \mathbf{t} = \begin{bmatrix} 5 \\ 7 \end{bmatrix}x=[21​],t=[57​]

ReLU\mathrm{ReLU}ReLU acts entrywise, ReLU(u)=max⁡(0, u)\mathrm{ReLU}(u) = \max(0,\ u)ReLU(u)=max(0, u), with derivative 111 where u>0u > 0u>0 and 000 where u<0u < 0u<0. No pre-activation in this problem is ever exactly zero.

The weights are frozen. Instead of training the network, one gradient-descent step is taken on the input itself:

x′=x−η ∂L∂x,η=0.02\mathbf{x}' = \mathbf{x} - \eta\,\frac{\partial L}{\partial \mathbf{x}}, \qquad \eta = 0.02x′=x−η∂x∂L​,η=0.02

The updated input x′\mathbf{x}'x′ is then fed through the same unchanged network.

What is the new loss L(x′)L(\mathbf{x}')L(x′)? Round your answer to 3 decimal places.

Hints

Solve it to unlock the solution

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