To train a Recurrent Neural Network (RNN), we usually rely on Backpropagation Through Time (BPTT). While effective, BPTT has a fundamental flaw: it is not "online." To calculate gradients, the model must store the entire history of hidden states, leading to a memory bottleneck that grows with sequence length. If we truncate this history to save memory, we lose the ability to learn long-term dependencies.
The alternative is Real-Time Recurrent Learning (RTRL). Instead of looking backward at the end of a sequence, RTRL updates weights at every timestep by propagating the "influence" of parameters forward. Historically, RTRL was dismissed as mathematically elegant but computationally impossible, scaling at $O(N^4)$ for $N$ neurons.
Recent research has transformed this landscape. By imposing specific architectural constraints—such as diagonal connectivity and modularity—researchers have reduced the complexity of RTRL to $O(N)$, making truly online, memory-efficient learning a reality.
The Jacobian Bottleneck
The core challenge of RTRL is tracking the Jacobian matrix, which describes how every single weight in the network affects every single hidden state. In a fully connected RNN with $N$ neurons, there are $N^2$ weights. Tracking how $N^2$ weights influence $N$ states requires maintaining $N^3$ values, and updating them at each step costs $O(N^4)$.
As Kazuki Irie and Jürgen Schmidhuber explore in Exploring the Promise and Limits of Real-Time Recurrent Learning, this quartic wall is what makes standard RTRL impractical for modern deep learning. To break this wall, we must ensure the Jacobian is sparse.
Diagonal Connectivity: Decoupling the States
The most direct way to sparsify the Jacobian is to restrict the recurrent weight matrix to be diagonal. In this setup, each neuron’s next state depends only on its own previous state and the current input, rather than a weighted sum of all other neurons.
Alexander Keller and Matthijs Van Keirsbilck demonstrate in Rethinking Full Connectivity in Recurrent Neural Networks that this change turns matrix-vector multiplications into element-wise operations. Because neurons no longer interact within the recurrent loop, the influence of a weight is local to its specific neuron.
This architectural shift collapses the complexity:
- Standard RTRL: $O(N^4)$
- Diagonally Constrained RTRL: $O(N)$
This efficiency is a cornerstone of Real-Time Recurrent Reinforcement Learning, where Julian Lemmel and Radu Grosu use diagonal connectivity to solve complex tasks without BPTT, achieving speeds comparable to standard backpropagation.
Columnar and Modular Architectures
If diagonal connectivity is too restrictive for a specific task, we can use modularization. Instead of individual neurons being independent, we group them into "columns" or "modules."
In Scalable Online Recurrent Learning Using Columnar Neural Networks, Khurram Javed, Martha White, and Richard S. Sutton introduce Columnar Neural Networks (Col-NNs). By restricting how parameters track their influence to within these independent columns, they achieve $O(N)$ scaling while maintaining higher representational capacity than simple diagonal networks.
Similarly, Nicolas Zucchet and colleagues in Online learning of long-range dependencies use independent linear recurrent modules. This allows the network to capture long-range dependencies online with only twice the memory overhead of a single forward pass.
Stochastic and Rank-One Approximations
Another path to scalability involves approximating the gradient rather than restricting the architecture. In Training recurrent networks online without backtracking, Yann Ollivier and Corentin Tallec propose the NoBackTrack algorithm.
Instead of tracking the full Jacobian, NoBackTrack uses a "rank-one trick" to produce unbiased stochastic estimates of the gradient. This allows the network to learn in a memoryless fashion, matching the linear cost of a forward pass without forcing the weights into a diagonal structure.
Applications in Spiking and Reinforcement Learning
These scalable online methods are particularly vital for two fields: Neuromorphic Engineering and Reinforcement Learning (RL).
- Spiking Neural Networks (SNNs): SNNs aim for biological plausibility and energy efficiency. Chaoming Wang and the team behind BrainScale used diagonal Jacobian approximations to train a whole-brain model of a fruit fly on a single GPU—a task that previously required industrial-scale clusters.
- Online RL: Agents interacting with the world cannot wait for a sequence to end to learn. Esraa Elelimy and Adam White demonstrate in Real-Time Recurrent Learning using Trace Units in Reinforcement Learning that using diagonal complex-valued matrices allows agents to learn from partially observable environments in real-time without the bias of truncation.
By moving away from the "heavy" recurrent loops of the past—as seen in the Lightweight Recurrent Network (LRN) by Biao Zhang—the field is converging on a shared principle: architectural simplicity enables algorithmic efficiency. When we restrict how information flows, we unlock the ability for networks to learn continuously, forever, without ever looking back.