Skip to main content
QUICK REVIEW

[Paper Review] Integrating Episodic Memory into a Reinforcement Learning Agent using Reservoir Sampling

Kenny Young, Richard S. Sutton|arXiv (Cornell University)|Jun 1, 2018
Neural Networks and Reservoir ComputingComputer Science15 references6 citations
TL;DR

This paper proposes a novel reinforcement learning algorithm that integrates episodic memory using reservoir sampling to enable efficient online learning of long-term dependencies. By storing past states with learnable importance weights and using gradient estimates via reservoir sampling, the agent learns to prioritize useful memories without backpropagating through time, achieving near-perfect performance on tasks with sharp long-term dependencies.

ABSTRACT

Episodic memory is a psychology term which refers to the ability to recall specific events from the past. We suggest one advantage of this particular type of memory is the ability to easily assign credit to a specific state when remembered information is found to be useful. Inspired by this idea, and the increasing popularity of external memory mechanisms to handle long-term dependencies in deep learning systems, we propose a novel algorithm which uses a reservoir sampling procedure to maintain an external memory consisting of a fixed number of past states. The algorithm allows a deep reinforcement learning agent to learn online to preferentially remember those states which are found to be useful to recall later on. Critically this method allows for efficient online computation of gradient estimates with respect to the write process of the external memory. Thus unlike most prior mechanisms for external memory it is feasible to use in an online reinforcement learning setting.

Motivation & Objective

  • To address the challenge of learning long-term dependencies in non-Markovian reinforcement learning environments where the Markov property does not hold.
  • To enable efficient online training of agents with external memory by avoiding backpropagation through time.
  • To develop a memory mechanism that allows credit assignment to past states based on their future utility, without requiring full history tracking.
  • To design a differentiable, scalable memory system that maintains a fixed-size set of past states with learnable importance weights.
  • To demonstrate that episodic memory with reservoir sampling enables stable and high-performing learning in environments with sharp long-term dependencies.

Proposed method

  • The agent maintains an external memory of fixed size n, storing past states with associated importance weights learned via a differentiable write process.
  • A reservoir sampling procedure is used to stochastically select which past states to retain, ensuring the memory set is representative of the distribution of states weighted by their utility.
  • The write weight for each state is learned via stochastic gradient descent using gradient estimates derived from the reservoir sampling mechanism, enabling online learning.
  • The policy network queries the memory using a query network that computes similarity between the current state and stored states, with the output used to condition the action policy.
  • The value and policy networks are trained using advantage actor-critic with experience from the memory, and the entire system is optimized end-to-end with standard SGD.
  • A key innovation is the derivation of gradient estimates with respect to the write process that do not require backpropagation through time, making online training feasible.

Experimental results

Research questions

  • RQ1Can a reinforcement learning agent learn to prioritize and retain only the most useful past states for decision-making in non-Markovian environments?
  • RQ2Is it possible to train an external memory system online without relying on backpropagation through time?
  • RQ3How does episodic memory with reservoir sampling compare to recurrent architectures in learning long-term dependencies?
  • RQ4Can gradient estimation be efficiently performed with respect to the memory write process in a streaming, online setting?
  • RQ5Does the proposed method achieve stable and high-performance learning on tasks requiring sharp long-term credit assignment?

Key findings

  • The episodic memory agent achieved near-perfect average return on the 1-decision and 2-decision chain environments, indicating effective learning of long-term dependencies.
  • The agent successfully drove the write weights of uninformative states to near zero while maintaining high write weights for informative states, demonstrating effective memory selection.
  • The method required no discounting or entropy regularization to avoid catastrophic looping, unlike the recurrent baseline, which needed these for stable training.
  • Convergence time roughly doubled when the environment length increased from 25,000 to 50,000 episodes, but training remained stable across runs.
  • The reservoir sampling-based memory system enabled online training with constant memory and computation cost, independent of history length, making it scalable.
  • The recurrent baseline required RMSProp and hyperparameter tuning (e.g., γ=0.9, entropy weight 0.0005) for stable learning, whereas the episodic memory agent performed well with standard SGD and no such adjustments.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.