Structured State Space Models for In-Context Reinforcement Learning

Chris Lu, Yannick Schroecker, Albert Gu, Emilio Parisotto, Jakob Foerster +2 more
3/7/2023
cs.LG

Official code: luchris429/popjaxrl (116 stars, JAX, last commit 2023-12-05).

Abstract

Structured state space sequence (S4) models have recently achieved state-of-the-art performance on long-range sequence modeling tasks. These models also have fast inference speeds and parallelisable training, making them potentially useful in many reinforcement learning settings. We propose a modification to a variant of S4 that enables us to initialise and reset the hidden state in parallel, allowing us to tackle reinforcement learning tasks. We show that our modified architecture runs asymptotically faster than Transformers in sequence length and performs better than RNN's on a simple memory-based task. We evaluate our modified architecture on a set of partially-observable environments and find that, in practice, our model outperforms RNN's while also running over five times faster. Then, by leveraging the model's ability to handle long-range sequences, we achieve strong performance on a challenging meta-learning task in which the agent is given a randomly-sampled continuous control environment, combined with a randomly-sampled linear projection of the environment's observations and actions. Furthermore, we show the resulting model can adapt to out-of-distribution held-out tasks. Overall, the results presented in this paper show that structured state space models are fast and performant for in-context reinforcement learning tasks. We provide code at https://github.com/luchris429/popjaxrl.

View on arXivView PDF

Code Implementations(1)

JAX

Benchmarking RL for POMDPs in Pure JAX [Code for "Structured State Space Models for In-Context Reinforcement Learning" (NeurIPS 2023)]

11610PythonOct 17, 20232 years ago
jaxreinforcement-learning

Similar Papers

Cite this paper

@article{lu2023structured,
  title  = {Structured State Space Models for In-Context Reinforcement Learning},
  author = {Chris Lu and Yannick Schroecker and Albert Gu and Emilio Parisotto and Jakob Foerster and Satinder Singh and Feryal Behbahani},
  year   = {2023},
  eprint = {2303.03982},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2303.03982v3},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.03982.svg)](https://codeofpaper.com/paper/2303.03982)

Discussion