The vanishing gradient problem occurs when gradients used by gradient descent approach zero as they pass through many recurrent steps or layers. Training then struggles to preserve the influence of earlier information, limiting an RNN’s effective memory for sequential prediction. section 6.2.2 section 6.5.1
Gated recurrent architectures address the problem through controlled memory updates:
- Use LSTM networks to introduce more complex dependencies than a vanilla RNN; their role is described, but their internals remain outside the treatment. section 6.2.2
- Use GRU update gates to control how much past information remains and reset gates to control how much is discarded. section 6.5.1
- Represent the GRU’s candidate activation as a proposed new state and its hidden state as the resulting representation. section 6.5.1
PyTorch GRU for pose estimation
A practical replacement for a recurrent baseline defines nn.GRU(input_size, hidden_size, num_layers, batch_first=True), initializes a zero hidden state on the input device, runs the sequence, and maps the final selected outputs through a linear layer. The same workflow supports predicting sensor trajectories over time. section 6.5.1 section 6.2.2
Figure 6.18 Design of the GRU layer, where rt represents the reset gate, zt is the update gate, ~ht is the candidate function, and ht is the final actual hidden state
Inspect the GRU diagram to connect reset gates, update gates, candidate activation, and the final hidden state. section 6.5.1













