Memory-based control with recurrent neural networks

Nicolas Heess, Jonathan J. Hunt, Timothy P. Lillicrap, David SilverarXiv 2015

Abstract

Partially observed control problems are a challenging aspect of reinforcement learning. We extend two related, model-free algorithms for continuous control -- deterministic policy gradient and stochastic value gradient -- to solve partially observed domains using recurrent neural networks trained with backpropagation through time. We demonstrate that this approach, coupled with long-short term memory is able to solve a variety of physical control problems exhibiting an assortment of memory requirements. These include the short-term integration of information from noisy sensors and the identification of system parameters, as well as long-term memory problems that require preserving information over many time steps. We also demonstrate success on a combined exploration and memory problem in the form of a simplified version of the well-known Morris water maze task. Finally, we show that our approach can deal with high-dimensional observations by learning directly from pixels. We find that recurrent deterministic and stochastic policies are able to learn similarly good solutions to these tasks, including the water maze where the agent must learn effective search strategies.

Introduction

Most reinforcement learning (RL) research assumes "full observability," where the agent's current sensor reading provides all the information needed to make an optimal decision. In the real world, this is rarely true. Sensors are noisy, views are occluded, and critical information (like the location of a goal) might only be visible for a brief moment.

These scenarios are modeled as Partially Observable Markov Decision Processes (POMDPs). Traditionally, solving POMDPs required either an explicit "belief state" (which requires a model of the world) or "frame stacking" (which only provides a very short-term memory). This paper seeks a model-free approach where the agent learns its own internal representation of history to solve continuous control tasks using recurrent neural networks.

Methodology

The authors extend two existing actor-critic algorithms to use Recurrent Neural Networks (RNNs), specifically LSTMs:

  1. Recurrent DPG (RDPG): Based on the Deterministic Policy Gradient, it utilizes a deterministic actor and a critic, both of which are recurrent.
  2. Recurrent SVG(0): A stochastic version based on Stochastic Value Gradients, using the "re-parameterization trick" to allow gradients to flow through stochastic nodes.

Key technical details include the use of Backpropagation Through Time (BPTT) on trajectories sampled from an experience replay buffer. To stabilize learning, the authors employ "soft updates" for target networks. Crucially, the policy and critic are conditioned on the entire history of observations and actions $h_t = (o_1, a_1, ... o_t)$ rather than just the current observation.

Experimental Evaluation

The algorithms were evaluated on several simulated physical control domains using the MuJoCo physics engine:

  • Sensor Integration: Pendulum and Cartpole swing-up tasks where velocity information is hidden, forcing the agent to estimate it from position history.
  • System Identification: A Cartpole task where the pole length varies between episodes, requiring the agent to adapt based on physical feedback.
  • Memory Tasks: A 3-joint Reacher where the target is transient, and a 5-joint Gripper that must return a payload to a starting position that is no longer visible.
  • Morris Water Maze: A simplified version of the behavioral biology task where an agent must find a hidden platform and remember its location for future trials.

Results and Discussion

Recurrent agents demonstrated the ability to solve tasks that are impossible for purely feedforward agents. For instance, in tasks requiring velocity estimation or system identification, RDPG and RSVG(0) with LSTMs successfully learned policies, whereas standard DDPG failed.

Performance of recurrent agents (RDPG, RSVG) vs feedforward (DDPG) on partially observed tasks.

In the Morris water maze, recurrent agents showed a clear "aha moment." After finding the platform once, they were able to return to it much faster in subsequent attempts within the same episode, proving they had stored the location in memory. Furthermore, the study found that LSTMs are crucial for long-term dependencies; standard RNNs often failed due to vanishing gradients in tasks like the cartpole with varying lengths.

Interestingly, the authors found that deterministic policies (RDPG) performed as well as stochastic ones, even in tasks like the water maze where search strategies are essential. This challenges the common assumption that stochasticity is strictly necessary for solving POMDPs.

Conclusion

This work demonstrates that integrating LSTMs into continuous control algorithms allows agents to solve complex POMDPs by learning to extract and store task-relevant features in their hidden state. The approach is robust enough to handle noisy sensors, system identification, and long-term memory requirements, even when learning directly from high-dimensional pixel data. Future work may explore shared architectures between actor and critic or more sophisticated exploration strategies specifically designed for partially observed environments.

Summary updated

BibTeX
@misc{heess2015memory,
  author = {Nicolas Heess and Jonathan J. Hunt and Timothy P. Lillicrap and David Silver},
  title = {{Memory-based control with recurrent neural networks}},
  year = {2015},
  eprint = {1512.04455},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1512.04455},
}
Figure