The standard way to train a Recurrent Neural Network (RNN) is Backpropagation Through Time (BPTT). To make it practical, we usually "truncate" it: we only look back a fixed number of steps. While this saves memory, it introduces a fundamental flaw known as truncation bias. The network becomes blind to any dependency longer than the truncation window, and the gradients it receives are systematically distorted.
A growing body of research suggests we can do better. By shifting from backward-mode to forward-mode differentiation, or by using clever stochastic approximations, we can train recurrent models on sequences of arbitrary length—even infinite ones—without ever looking back.
The Problem with Looking Backward
In BPTT, you run a sequence forward, store all the intermediate hidden states, and then "unroll" the graph backward to compute gradients. If a sequence has a million steps, you need to store a million states.
To avoid this, practitioners use Truncated BPTT (TBPTT). But as Bryan Lim, Stefan Zohren, and S Roberts argue in Population-based Global Optimisation Methods for Learning Long-term Dependencies with RNNs, this truncation acts as a barrier. If a financial pattern or a physical movement takes 200 steps to manifest, but your window is only 100 steps, the gradient signal simply vanishes. The model never "sees" the connection.
Forward Mode and Real-Time Learning
The alternative is Real-Time Recurrent Learning (RTRL). Instead of waiting for the end of a sequence to propagate errors backward, RTRL propagates the sensitivity of the current state forward.
Think of it this way: at every time step, you update a "gradient buffer" that tracks how the current hidden state would change if you tweaked the model's parameters. As Samuel Chun Hei Lam, Justin Sirignano, and Konstantinos Spiliopoulos explain in Convergence Analysis of Real-time Recurrent Learning (RTRL) for a class of Recurrent Neural Networks, this allows for exact gradient computation without ever storing a history of activations. You can learn from a stream of data that never ends.
The catch is the cost. For a network with $N$ neurons, RTRL requires $O(N^4)$ operations per step, which is why it was ignored for decades.
Making Online Learning Tractable
Recent work has focused on making this "forward-tracking" efficient. One approach is to restrict the architecture. Kazuki Irie, Anand Gopalakrishnan, and Jürgen Schmidhuber show in Exploring the Promise and Limits of Real-Time Recurrent Learning that if you use "element-wise" recurrent layers (where neurons don't interact within the same layer), the complexity of RTRL drops dramatically. This allows agents to solve complex 3D navigation tasks by learning from infinite-length sequences that would crash a BPTT-based system.
Another approach is to use stochastic approximations. In Training recurrent networks online without backtracking, Yann Ollivier, Corentin Tallec, and Guillaume Charpiat introduce the "NoBackTrack" algorithm. They use a "rank-one trick" to create a noisy but unbiased estimate of the gradient. Because the noise is zero-centered, the model parameters naturally drift toward the optimal solution over time, capturing long-term dependencies without the memory overhead of full BPTT.
Persistence and Unbiased Estimation
The theme of "unbiasedness" is critical. When we truncate a sequence, we aren't just adding noise; we are adding a systematic error. Paul Vicol, Luke Metz, and Jascha Sohl-Dickstein address this in Unbiased Gradient Estimation in Unrolled Computation Graphs with Persistent Evolution Strategies.
Their method, Persistent Evolution Strategies (PES), works by accumulating perturbations across sequential segments. Instead of resetting the "search" at every window, PES keeps track of how perturbations influence the trajectory over time. This ensures that the gradient signal remains valid even when the computation graph is unrolled over thousands of steps, effectively navigating "chaotic" loss landscapes where standard gradients might fail.
Applications in Reinforcement Learning
These concepts are now moving into Reinforcement Learning (RL), where long-horizon dependencies are the norm. Standard RL libraries often truncate episodes into short chunks to fit them into GPU memory.
In Recurrent Reinforcement Learning with Memoroids, authors including Steven D. Morad and Chris Lu propose Tape-Based Batching. By reformulating linear recurrent units as associative operations, they allow gradients to flow through an entire, variable-length episode. This "untruncated" backpropagation ensures that the agent's value function is updated based on the full context of the task, rather than a fragmented slice of experience.
Summary of the Shift
The transition from BPTT to these online, untruncated methods represents a shift in how we think about temporal credit assignment:
- From Backward to Forward: Moving from storing history to tracking sensitivity in real-time.
- From Truncated to Persistent: Ensuring that gradient estimates remain unbiased across arbitrary time scales.
- From Exact to Stochastic: Using rank-one approximations or evolution strategies to trade off precision for computational feasibility.
By removing the "truncation ceiling," these methods allow recurrent models to finally reach their potential in modeling the truly long-term structures of the real world.