Abstract
Training Recurrent Neural Networks (RNNs) for reinforcement learning typically relies on Backpropagation Through Time (BPTT), a method that is biologically implausible and computationally restrictive for real-time applications. This paper presents Real-Time Recurrent Reinforcement Learning (RTRRL), a framework that utilizes online gradient descent and eligibility traces to solve complex, memory-dependent tasks. By integrating Meta-RL architectures with local learning rules like Random Feedback Local Online learning (RFLO), RTRRL mimics the reward pathways of the mammalian basal ganglia. Experimental results across benchmarks such as PopGym and Gymnax demonstrate that RTRRL not only offers a biologically plausible alternative to BPTT but frequently outperforms state-of-the-art baselines like PPO in partially observable environments.
Introduction
In artificial intelligence, RNNs are essential for navigating Partially Observable Markov Decision Processes (POMDPs), where agents must maintain a memory of past observations to make informed decisions. However, the standard training paradigm, BPTT, requires storing long sequences of activity and performing non-local weight updates—processes that do not occur in biological systems. Furthermore, traditional RL algorithms often depend on future rewards for current updates, which is impossible for an organism interacting with its environment in real-time. RTRRL addresses these discrepancies by enabling agents to learn entirely online using only locally available information.
The RTRRL Framework
The RTRRL framework is built upon three core pillars designed to ensure biological plausibility and efficiency:
- Meta-RL RNN Architecture: Inspired by the basal ganglia, the RNN receives not only current observations ($o_t$) but also the previous action ($a_{t-1}$) and reward ($r_t$). This feedback loop allows the network to "learn how to learn" by adapting its hidden state dynamically to environmental rules.
- Temporal-Difference (TD($\lambda$)) Learning: The agent employs eligibility traces—short-term synaptic "tags"—to bridge the gap between actions and delayed rewards, allowing for immediate credit assignment without waiting for episode completion.
- Online Gradient Computation: To replace BPTT, the framework uses RFLO or diagonal Real-Time Recurrent Learning (RTRL). RFLO utilizes Feedback Alignment (FA), propagating errors through fixed random weights to solve the "weight transport" problem. For efficiency, Linear Recurrent Units (LRUs) are used in RTRL to restrict connectivity to diagonal matrices, reducing computational overhead.
Experimental Evaluation
The authors evaluated RTRRL against several challenging POMDP benchmarks:
- Gymnax: Classic control tasks modified with noise or state masking.
- PopGym: A suite specifically designed to test memory capabilities (e.g.,
RepeatPrevious). - Brax: High-dimensional physics simulations masked to create partial observability.
- MemoryChain: A "T-maze" environment testing long-term information retention.
Key Results and Insights
The experiments revealed several significant advantages of the RTRRL approach:
- Performance Beyond BPTT: Surprisingly, RTRRL variants using LRUs often outperformed PPO trained with BPTT. This suggests that real-time, online updates can be more effective for memory-heavy tasks than batch-processed gradients.
- Robustness to Noise: RTRRL-RFLO showed exceptional performance in noisy environments like
NoisyStatelessCartPole, indicating that biologically inspired local learning rules may offer superior robustness compared to traditional backpropagation. - Memory Retention: In the
MemoryChaintask, RTRRL maintained near-perfect performance over much longer sequences than BPTT-trained networks of equivalent size.
Discussion and Future Work
While RTRRL demonstrates high potential, it faces challenges such as high variance due to step-by-step updates and sensitivity to hyperparameters like entropy and learning rates. Additionally, while LRUs improve efficiency, general RTRL scaling remains computationally demanding ($O(n^4)$).
Future research aims to implement these algorithms on neuromorphic hardware. Such specialized chips, designed to mimic brain structure, could leverage RTRRL's local learning rules to achieve unprecedented energy efficiency in autonomous AI systems.
Summary updated