Skip to main content
QUICK REVIEW

[Paper Review] Offline Reinforcement Learning as One Big Sequence Modeling Problem

Michael Jänner, Qiyang Li|arXiv (Cornell University)|Jun 3, 2021
Reinforcement Learning in RoboticsComputer Science41 citations
TL;DR

The paper treats trajectories as a unified sequence and uses a Transformer (Trajectory Transformer) with beam search to perform imitation learning, goal-conditioned RL, and offline RL, achieving competitive or state-of-the-art results without many traditional RL components.

ABSTRACT

Reinforcement learning (RL) is typically concerned with estimating stationary policies or single-step models, leveraging the Markov property to factorize problems in time. However, we can also view RL as a generic sequence modeling problem, with the goal being to produce a sequence of actions that leads to a sequence of high rewards. Viewed in this way, it is tempting to consider whether high-capacity sequence prediction models that work well in other domains, such as natural-language processing, can also provide effective solutions to the RL problem. To this end, we explore how RL can be tackled with the tools of sequence modeling, using a Transformer architecture to model distributions over trajectories and repurposing beam search as a planning algorithm. Framing RL as sequence modeling problem simplifies a range of design decisions, allowing us to dispense with many of the components common in offline RL algorithms. We demonstrate the flexibility of this approach across long-horizon dynamics prediction, imitation learning, goal-conditioned RL, and offline RL. Further, we show that this approach can be combined with existing model-free algorithms to yield a state-of-the-art planner in sparse-reward, long-horizon tasks.

Motivation & Objective

  • Reframe RL as a unified sequence modeling problem to simplify design and leverage high-capacity seq models.
  • Demonstrate long-horizon trajectory prediction accuracy with a Transformer architecture.
  • Show that beam search planning on the Trajectory Transformer yields competitive offline RL results and enables imitation learning and goal-conditioned RL.
  • Explore how variants of decoding yield model-based planning and goal-reaching capabilities.
  • Assess whether this sequence-modeling approach can match or surpass specialized offline RL methods.

Proposed method

  • Represent trajectories as sequences of discretized, autoregressively modeled states, actions, and rewards.
  • Train a Transformer decoder (Trajectory Transformer) to model P(theta)(s_t, a_t, r_t | history).
  • Discretize continuous dimensions via uniform or quantile discretization to form a discrete token stream.
  • Use beam search as a planning algorithm to generate high-reward trajectories by maximizing (or approximating) sequence likelihoods or rewards.
  • Augment rewards with reward-to-go to guide offline planning and optionally integrate a Q-function as a search heuristic for sparse-reward tasks.
  • Apply the same decoding procedure across imitation learning, goal-conditioned RL, and offline RL, with minimal changes to conditioning inputs and sequence length.

Experimental results

Research questions

  • RQ1Can a high-capacity sequence model (Transformer) accurately predict long-horizon trajectories without traditional RL decomposition?
  • RQ2Is beam search planning on a trajectory-based model competitive with specialized offline RL methods?
  • RQ3Can the same model support imitation learning, goal-conditioned RL, and offline RL through simple decoding strategies?
  • RQ4Does incorporating reward-to-go or Q-function heuristics improve planning in sparse-reward tasks?

Key findings

  • Trajectory Transformer delivers substantially better long-horizon prediction accuracy than standard single-step dynamics models, maintaining plausibility over 100 steps.
  • In offline RL benchmarks, TT (quantile discretization) matches or exceeds state-of-the-art methods across locomotion tasks, outperforming several baselines.
  • Combining TT planning with a Q-function as a search heuristic yields superior performance on sparse-reward tasks (AntMaze) compared to IQL and return-conditioning approaches.
  • Imitation learning and goal-reaching with TT via standard beam search achieve high performance, demonstrating the versatility of the decoding-based planning approach.
  • Variations of decoding (e.g., goal conditioning by prepending a goal state) enable goal-reaching without rewards or shaping.

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.