Md. Asif Uddin
    I.12.X02

    The encoder waits for the decoder

    gradient▲△△

    For the four points of I.12.B01, S=[2.921.441.442.08]\mat S=\begin{bmatrix}2.92&1.44\\1.44&2.08\end{bmatrix}. At E=(1, 0)\mat E=(1,\,0) and D=(1, 0)T\mat D=(1,\,0)^{\mathsf T}, evaluate both gradients of (I.12.2). Take one step of gradient descent with step size 0.10.1 and find the new loss. Then evaluate both gradients at E=0\mat E=\mat 0, D=0\mat D=\mat 0.

    Hint

    Form (I−DE)S(\mat I-\mat D\mat E)\mat S once and use it in both gradients.

    Solution

    Here I−DE=[0001]\mat I-\mat D\mat E=\begin{bmatrix}0&0\\0&1\end{bmatrix}, so

    (I−DE)S=[001.442.08].(\mat I-\mat D\mat E)\mat S=\begin{bmatrix}0&0\\1.44&2.08\end{bmatrix}.

    Multiplying on the right by ET=(1,0)T\mat E^{\mathsf T}=(1,0)^{\mathsf T} and on the left by DT=(1, 0)\mat D^{\mathsf T}=(1,\,0):

    ∇DL=−2[01.44]=[0−2.88],∇EL=−2 (0,  0)=(0,  0).\begin{aligned} \nabla_{\mat D}\mathcal L&=-2\begin{bmatrix}0\\1.44\end{bmatrix} =\begin{bmatrix}0\\-2.88\end{bmatrix},\\ \nabla_{\mat E}\mathcal L&=-2\,(0,\;0)=(0,\;0). \end{aligned}

    The decoder is told to raise its second weight: the residual, which lives in the second coordinate, is correlated with the code. The encoder is told nothing. Its gradient passes through DT\mat D^{\mathsf T}, and the decoder does not yet write to the coordinate where the error is.

    After the step, D=(1, 0.288)T\mat D=(1,\,0.288)^{\mathsf T} and E\mat E is unchanged. The residual map is [00−0.2881]\begin{bmatrix}0&0\\-0.288&1\end{bmatrix} and the loss is

    0.2882⋅2.92−2⋅0.288⋅1.44+2.08    =1.492756,\begin{aligned} &0.288^2\cdot2.92-2\cdot0.288\cdot1.44+2.08\\ &\;\;=1.492756, \end{aligned}

    down from 2.082.08. On the next step the encoder’s gradient is no longer zero.

    At E=0\mat E=\mat 0 and D=0\mat D=\mat 0, each gradient has a zero matrix as a factor, so both vanish. The loss is tr⁡S=5\operatorname{tr}\mat S=5 and gradient descent never leaves. An autoencoder needs a nonzero initialisation in both halves.

    Draws on