Every use of a weight contributes
symbolic▲▲▲Exact values where possible; six decimal places for non-exact numerical results.
STATEMENT
Derive backpropagation through time and compute every parameter gradient for the forward pass in I.9.B01.
GIVEN
Use (I.9.1) and a sum of per-step losses for the derivation. For the numerical case use the linear scalar cell, inputs , , , and final target one.
FIND
The recurrent backward rule, the shared-weight accumulation rule, all five scalar parameter gradients, input derivatives and initial-state derivative.
STRATEGY
First add the two incoming backward signals at each state. Differentiate the activation, then accumulate the local parameter contributions. Specialise to the identity activation only after deriving the tanh rule.
SOLUTION
The readout at time contributes to its state. The next cell contributes . Multiplying their sum by the coordinatewise tanh derivative gives (I.9.3).
For a shared recurrent-weight entry , the local differential is . Summing all uses gives
This is the entrywise derivation of (I.9.4), not an average over time. If the objective is an average, its factor is already in .
In the linear example, and the activation derivative is one. Only the final readout has a loss. Starting from the end,
The local contributions to are therefore , and :
Input derivatives are , giving . The initial-state derivative is . We compute the latter even though this example does not optimise .
For an independent algebraic check, with the final state is . Thus , and .
The reproduction script perturbs each parameter by , recomputes the full forward loss and compares central differences with the analytic derivative. It additionally checks tanh cells with losses at multiple steps and a two-coordinate state with non-symmetric recurrent weights. The latter catches transpose errors that a scalar example cannot.
The script and run command are in the numeric check on I.9.B01.
Answer
In the order the gradient is . All three time steps contribute to the same parameter objects.
Check — sanity
Since , the first local contribution is zero, but the first input still receives a nonzero derivative. “This use contributes zero” does not mean “this time step is disconnected.”
Where this breaks
Updating parameters inside the backward sweep would mix derivatives of different forward computations. Accumulate first, then take one optimiser step. A detached boundary also removes terms and must be tested as a different graph.
Variation
If all three time steps had local output losses, replace each zero local readout derivative by its actual value in (I.9.3). The future term remains; local supervision does not replace it.