Carrying the Cat Through the Clause

Recurrent NetworksMedium+20 XP+20

Carrying the Cat Through the Clause

One number inside an LSTM's cell state has learned to track a single fact: the subject of this sentence is singular. The model is reading

The cat that we adopted last spring was sleeping on the stairs.

and we follow that one number through four consecutive steps — cat, that, we, adopted.

At each step the cell is edited, and then part of what it holds is revealed as that step's visible output:

cell  ←  forget×cell  +  input×candidate\text{cell} \;\leftarrow\; \text{forget} \times \text{cell} \;+\; \text{input} \times \text{candidate}cell←forget×cell+input×candidate

revealed  =  output×cell\text{revealed} \;=\; \text{output} \times \text{cell}revealed=output×cell

Just before step 1 the number is 000 — nothing has been stored yet. The candidate the cell computes and the three gate values it produces at each step are:

steptokenforgetcandidateinputoutput
1cat0.51.00.80.4
2that1.00.90.00.1
3we1.00.40.250.3
4adopted0.90.20.50.5

What value does this number reveal at step 4?

what could be written
0.20
0.90
-0.40
0.50
↓ × input
new cell state
0.90
-0.05
0.40
0.55
input0.50

The input gate controls how much of the candidate actually gets written in. At 0, this step is simply ignored.

Hints

Solve it to unlock the solution

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

Select all that apply.