SEQUENCE MODELLING / STUDENT PRACTICE
01 · Order is information
The three 3×3 image frames have centre rows [1,0,0], [0,1,0], [0,0,1]. All other pixels are 0. Time runs in the stated frame order.
1.1 / CALCULATEAverage the centre rows [1,0,0], [0,1,0], [0,0,1]. What is the first cell of the mean row? A fraction is fine.
Answer: __________________________
My reasoning:
1.2 / REASONWhich representation necessarily loses the distinction between our two directions?
□ All frames, in order · □ The time-averaged image
My reasoning:
1.3 / CHALLENGE THE CLAIM“Only RNNs can learn order.” Could an MLP on a fixed, ordered window distinguish [1,0] from [0,1]?
□ Yes · □ No
My reasoning:
SEQUENCE MODELLING / STUDENT PRACTICE
02 · Inputs and targets
One-hot vocabulary: [not, very, good]. Sequence classification predicts a final label; token tagging aligns labels; next-token prediction shifts targets one step ahead.
2.1 / ENCODEOur input vocabulary is [not, very, good]. How many coordinates does each one-hot input vector have?
Answer: __________________________
My reasoning:
2.2 / ALIGNFor next-token training on “not very good”, the model has just read “very”. What is its target?
□ very · □ good · □ negative
My reasoning:
2.3 / AUDITAt noon, a live forecast predicts the 1 pm temperature. May the input include the actual 1 pm measurement?
□ Yes · □ No
My reasoning:
SEQUENCE MODELLING / STUDENT PRACTICE
03 · A running state
Linear toy: hₜ = xₜ + 0.5hₜ₋₁, h₀ = 0. Tanh RNN: hₜ = tanh(Wₓxₜ + Wₕhₜ₋₁ + bₕ). States and weights are different objects.
3.1 / CALCULATEFor the linear toy hₜ = xₜ + 0.5hₜ₋₁, h₀ = 0 and inputs [1,0,1], what is h₂?
Answer: __________________________
My reasoning:
3.2 / DISTINGUISHDuring an ordinary inference pass, which can change from one time step to the next?
□ The hidden state · □ The shared weights are retrained
My reasoning:
3.3 / ADD THE NONLINEARITYUsing tanh, h₀ = 0, x₁ = 1, input weight 1, recurrent weight 0.5 and bias 0, what is h₁ to three decimals?
Answer: __________________________
My reasoning:
SEQUENCE MODELLING / STUDENT PRACTICE
04 · Unroll the RNN
One recurrent layer + output head: P = Hd + H² + H + CH + C. Count each shared weight and bias once; the initial state is fixed.
4.1 / COUNTFor d = 3, H = 2 and C = 2, how many parameters are in the recurrent layer plus output head, including biases?
Answer: __________________________
My reasoning:
4.2 / CHANGE LENGTHThe same model now reads T = 100 steps instead of T = 4. How many trainable parameters does it have?
Answer: __________________________
My reasoning:
4.3 / FOLLOW CREDITTwo time steps contribute gradients 0.2 and 0.3 to the same weight, with the loss scaling already included. What gradient updates that weight?
□ 0.3: keep the last · □ 0.5: add contributions · □ 0.06: multiply contributions
My reasoning:
SEQUENCE MODELLING / STUDENT PRACTICE
05 · Distant dependencies
Across a recurrent path, local derivatives multiply. For a scalar linear chain the sensitivity is wᴸ. For tanh each local derivative is w(1 − hₜ²).
5.1 / CALCULATEFor 20 linear recurrent links with derivative 0.8 each, what fraction of a unit sensitivity reaches the beginning? Give a decimal.
Answer: __________________________
My reasoning:
5.2 / CHOOSE A REMEDYCan clipping a gradient of 0.0115 at threshold 5 restore it to 1?
□ Yes · □ No
My reasoning:
5.3 / EXPLAIN THE SURPRISEWith tanh and w = 1.3, why can the returning sensitivity still become small?
□ It cannot: w > 1 guarantees explosion · □ The factors 1 − hₜ² can be small
My reasoning:
SEQUENCE MODELLING / EXIT TICKET
Design. Diagnose. Remember.
A sensor sends one measurement per minute. At the end of a variable-length stream, report whether an early warning happened before a later fault. Reversing those events should change the answer.
1. Specify the input, target, output timing and what the hidden state must retain. Why may the mean reading be insufficient?
2. If performance worsens as the gap grows, name two hypotheses and one experiment to distinguish them.
3. What word began the lecture? How is your memory challenge similar to—and different from—the toy RNN?