How can RL agents recall the past in detail, in order to behave appropriately in the present? In our new preprint "Towards mental time travel: A hierarchical memory for RL agents" (arxiv.org/abs/2105.14039) we propose a memory architecture that steps in this direction.
We draw inspiration from the idea that human memory is like "mental time travel"—we can recall a specific event in the past, and relive it in some sequential detail, with relatively little interference from other events. This ability is key to our goal-directed use of memory.
By contrast, RL agent memories generally lack either this sparsity (attending to one or a few events in the past) or this detail (replaying an event in sequence, rather than just recalling a single vector from each event). This limits their ability to learn from their memory.
We therefore propose a Hierarchical Transformer Memory (HTM). HTM stores chunks of the past, together with a summary for each chunk. It recalls hierarchically: first attending over summaries to identify relevance, then time-traveling to each relevant chunk to attend in detail.
We show that HTM allows RL agents to excel across 6 varied memory domains, such as recalling a ballet, maintaining object permanence, rapidly learning to navigate efficiently in a new neighborhood, and rapidly learning new nouns and recalling them after distractor tasks.
Agents with HTM can extrapolate to recalling knowledge after an order of magnitude(!) more distractor phases than they were trained on, and can even generalize zero-shot from training within single episodes to evaluation of knowledge from several episodes before.
They also achieve near-optimal performance on One-Shot StreetLearn (openreview.net/forum?id=F-mvp…), a challenging domain which requires recombining memories of prior paths in order to plan new routes. HTM matches the performance of a memory specifically designed for this setting.
We think these results highlight the value of hierarchy, sparsity, and attention in RL agent memories. Combining these allows agents to effectively "mental time travel" into relevant memories, which allows them to better learn from the past to achieve their present goals.
We also think our work highlights some generally interesting ideas, including 1) hierarchical attention where the top level determines what deserves detailed attention and 2) key-value memories where the values are not just vectors, but more general structures (e.g. sequences).
Interested to hear your thoughts! Thanks to my awesome coauthors @scychan_brains, Andrea Banino, and @FelixHill84, as well as all our colleagues who provided amazing suggestions and support while working on this paper!
• • •
Missing some Tweet in this thread? You can try to
force a refresh
I'm pleased to share that we've open-sourced two environments and the hierarchical attention mechanism for our "Towards mental time travel: A hierarchical memory for RL" paper: github.com/deepmind/deepm…
The repository linked above contains 1) a JAX/Haiku implementation of the hierarchical attention module, and 2) an implementation of the Ballet environment, which requires recalling spatio-temporal events, and is surprisingly challenging.
We've also open-sourced the Rapid Word Learning environment, but to simplify dependencies we added these new tasks to the repository for the paper they were based upon (github.com/deepmind/dm_fa…). This environment tests memory extrapolation far out of the training distribution.
What are symbols? Where do symbols come from? What behaviors demonstrate the ability to engage with symbols? How do the answers to these questions impact AI research? We argue for a new perspective on these issues our preprint: arxiv.org/abs/2102.03406 Summary in thread: 1/6
We interpret symbols as entities whose meaning is established by convention. We therefore argue that an entity is a symbol *only* to a system that demonstrates active participation in a system of meaning by convention; that is, a system that exhibits symbolic behavior. 2/6
What is symbolic behavior, and how could an AI (or animal) demonstrate it? We outline a set of criteria based on our interpretation of symbols: symbolic behavior is receptive, constructive, embedded, malleable, separable, meaningful, and graded. We illustrate with examples. 3/6
How can deep learning models flexibly reuse their knowledge? How can they adapt to new tasks zero-shot, as humans can? In our new preprint (arxiv.org/pdf/2005.04318), we propose a new approach based on learning to transform task representations: meta-mapping. Preview in thread:
Our approach can make drastic adaptations zero-shot, like switching from winning at (simplified) poker to trying to lose. It can allow a visual classification system to recognize new concepts, and can adapt a model-free reinforcement learning to new tasks, without data from them.
It accomplishes this without prior domain knowledge, based only on the relationships between tasks. Specifically, it learns basic task representations, e.g. for poker, via meta-learning. It also learns meta-mappings, higher order tasks which transform these basic task reps.