Abstract
Deep Reinforcement Learning (DRL) has demonstrated remarkable success in complex domains, yet it remains hindered by extreme data inefficiency. In contrast, biological systems often employ multiple memory mechanisms to learn rapidly from single experiences while gradually refining general policies. Researchers at Leiden University have introduced Two-Memory Reinforcement Learning (2M), a framework that integrates non-parametric episodic memory with parametric deep reinforcement learning to address this gap.
The Challenge of Data Efficiency
While DRL has mastered tasks ranging from Atari games to fusion reactor control, its reliance on backpropagating reward signals through neural networks (parametric learning) makes it notoriously slow. A successful outcome at the end of a long trajectory takes a significant amount of time to influence the agent's early-stage decision-making.
Conversely, Episodic Control (EC) offers a "fast" alternative. By using a non-parametric lookup table to store the maximum rewards received for specific state-action pairs, EC can learn almost instantly. However, EC typically struggles with stochasticity and lacks the ability to generalize knowledge to novel but similar states. The 2M framework seeks to combine the speed of EC with the robustness and generalization of DRL.
The 2M Framework
The 2M architecture maintains two distinct memory systems that interact to optimize performance:
- 2M-EC (Episodic Control): A non-parametric table that stores and retrieves the highest encountered episodic returns.
- 2M-RL (Reinforcement Learning): A standard parametric agent, such as a Deep Q-Network (DQN), which learns a generalized policy.
Key Innovations
- The Scheduler: At the start of each episode, the agent decides which memory system will drive action selection based on a probability $p^{ec}$. This probability is designed to start high—relying on the fast episodic memory—and decay over time as the RL agent becomes more competent.
- Mutual Improvement (Data Sharing): This is the core of the framework's efficiency. Regardless of which memory system is "driving" the agent during an episode, all collected data is pushed into a shared Experience Replay Buffer. The RL agent trains on this combined data, allowing it to learn from high-reward trajectories discovered early by the episodic "scout."
- Evaluation Selection: During testing, the agent tracks the recent average scores of both memories and automatically selects the superior performer for final evaluation.
Experimental Validation
The authors evaluated the 2M framework on two primary benchmarks:
- WindyGrid: A custom 7x10 gridworld featuring stochastic "wind" and penalty traps, used as a proof-of-concept for tabular reinforcement learning.
- MinAtar: A simplified version of the Atari Learning Environment (including games like Breakout, Space Invaders, and Seaquest) designed to test behavioral challenges without the overhead of raw image processing.
Key Results
In nearly all MinAtar environments, the 2M agent outperformed both pure DQN and pure Episodic Control (MFEC). In the WindyGrid task, 2M reached the optimal solution significantly faster than pure RL and avoided the local optima that frequently trapped the pure EC agent. Furthermore, 2M performed as well as or better than EMDQN, a state-of-the-art memory-augmented RL agent, while offering a more general framework compatible with any off-policy RL algorithm.
Insights: The "Scout" Effect and Generalization
A critical finding of the study is the "Scout" Effect. Episodic memory acts as an explorer that quickly finds paths to goals and "seeds" the replay buffer with successful trajectories. This prevents the RL agent from wandering aimlessly in the early stages of training.
While EC is fast, it eventually plateaus because it cannot generalize. However, because the RL agent trains on the EC's successful data, it eventually "overtakes" the episodic system. The neural network's ability to smooth out noise and find generalized strategies allows the RL component to reach a higher global optimum than the episodic memory could achieve alone.
Limitations and Future Directions
Despite its success, the framework currently relies on a manually tuned decay schedule for the scheduler ($p^{ec}$). The authors suggest that an adaptive scheduling mechanism—one that switches based on real-time performance metrics—would be a significant improvement. Additionally, future iterations could include a "filtering" step to ensure the RL agent prioritizes the highest-quality or most diverse episodic trajectories, and the integration of more advanced episodic modules like Neural Episodic Control (NEC).
Summary updated