Introduction
Training Recurrent Neural Networks (RNNs) on long sequences presents a significant computational challenge. Standard Backpropagation Through Time (BPTT) is memory-intensive, requiring the storage of hidden states for the entire sequence length. To mitigate this, practitioners often employ Truncated BPTT (TBPTT), which restricts gradient flow to a fixed temporal window of $K$ steps. However, choosing $K$ is non-trivial: a window that is too small introduces significant gradient bias, preventing the model from learning long-term dependencies, while a window that is too large leads to excessive memory consumption and slow training.
Methodology: Adaptive TBPTT
This paper proposes an Adaptive TBPTT scheme that automates the selection of the truncation length $K$. Instead of manually tuning $K$, users specify a tolerable level of relative gradient bias ($\delta$).
The approach relies on the Geometric Decay Assumption, which posits that in most practical RNNs, the influence of past states on the current loss decays geometrically on average. Specifically, the algorithm assumes the expected norm of the backpropagated gradient at step $k+1$ is bounded by a fraction $\beta$ of the norm at step $k$. By periodically sampling gradients to estimate the decay rate $\beta$, the algorithm dynamically calculates the minimum $K$ required to maintain the relative bias below the threshold $\delta$. This allows the model's "memory" to expand or contract as training progresses.
Experimental Evaluation
The authors evaluated Adaptive TBPTT on synthetic copy tasks and standard language modeling benchmarks, including Penn Treebank (PTB) and Wikitext-2 (Wiki2).
Performance and Efficiency
Adaptive TBPTT consistently matched or exceeded the performance of fixed-length TBPTT. In language modeling tasks, the adaptive method converged faster than fixed $K$ baselines. As shown in Figure 1, the adaptive scheme (specifically with $\delta=0.1$) achieves lower perplexity (PPL) more rapidly than fixed truncation lengths.
Bias Control and Dynamic Adaptation
A key advantage of the adaptive method is its ability to maintain a stable bias level throughout training. Figure 4 illustrates the behavior of the algorithm across two datasets. In both PTB and Wiki2, the adaptive scheme successfully keeps the relative bias $\delta$ near the target threshold. Furthermore, the truncation length $K$ is observed to increase dynamically as the model learns more complex dependencies, optimizing the trade-off between computational cost and gradient accuracy.
Discussion and Future Work
The proposed method provides a principled way to handle the bias-variance-computation trade-off in RNN training. While effective, the authors note potential limitations in very large, unregularized models where certain hidden state dimensions might not exhibit geometric decay. Future research could explore more sophisticated norm-weighting schemes (e.g., Mahalanobis norms) to improve robustness in complex architectures or explicit parameter regularization to ensure the geometric decay assumption holds.
Summary updated