Waypoint Transformer: Reinforcement Learning via Supervised Learning with Intermediate Targets

Anirudhan Badrinath, Yannis Flet-Berliac, Allen Nie, Emma Brunskill

Abstract

Reinforcement Learning via Supervised Learning (RvS) methods, such as the Decision Transformer, offer a stable and scalable alternative to traditional Temporal Difference (TD) learning. However, they often struggle with "stitching"—the ability to combine suboptimal trajectory segments to form an optimal path. We present the Waypoint Transformer (WT), which overcomes this by conditioning the policy on automatically generated intermediate waypoints. By breaking long-term goals into manageable short-term targets, WT achieves state-of-the-art results on challenging offline RL benchmarks like AntMaze and FrankaKitchen, matching or exceeding the performance of complex TD-learning algorithms while maintaining the simplicity of supervised learning.

Introduction: The Stitching Problem in RvS

Offline Reinforcement Learning aims to derive optimal policies from fixed datasets of past experiences. Current approaches generally fall into two categories: Temporal Difference (TD) learning and RL via Supervised Learning (RvS). While TD-learning methods (e.g., CQL, IQL) are theoretically capable of stitching together optimal paths from suboptimal data, they are often difficult to tune and unstable. Conversely, RvS methods like the Decision Transformer (DT) treat RL as a sequence modeling task, offering greater stability but failing at stitching. Because DT conditions on a single distant goal or return, it lacks the mechanism to navigate through intermediate states not explicitly linked in the training data.

Methodology: Waypoints as Local Guides

The Waypoint Transformer introduces a hierarchical approach to bridge the gap between current states and distant goals. The core innovation is the use of intermediate waypoints to guide the policy.

Waypoint Generation Network

Before training the main policy, a separate network $W_\phi$ is trained to predict intermediate targets. For goal-conditioned tasks (like navigating a maze), $W_\phi$ predicts a state $K$ steps into the future. For reward-conditioned tasks (like locomotion), it predicts the expected average and cumulative reward-to-go. This provides a learned proxy that balances bias and variance more effectively than raw Monte Carlo estimates, effectively acting as a "breadcrumb" guide for the agent.

Transformer Architecture

WT utilizes a GPT-2 style causal transformer. Unlike the original Decision Transformer, which conditions on (Return, State, Action) triplets, WT simplifies the input to (Waypoint, State) pairs. Interestingly, the authors found that omitting past actions from the conditioning sequence reduces distribution shift during evaluation and improves training efficiency.

Architecture of the Waypoint Transformer (WT). The waypoint network $W_\phi$ generates intermediate targets based on the current state $s_t$ and a goal/return $\omega$, which then condition the policy transformer.

Experimental Results

The Waypoint Transformer was evaluated on the D4RL benchmark, focusing on environments that require significant stitching capabilities, such as AntMaze and FrankaKitchen.

Performance on Complex Benchmarks

WT demonstrates remarkable performance on tasks where standard RvS methods often fail. In "Large-Play" and "Large-Diverse" AntMazes—where standard Decision Transformers typically score near 0—WT achieved scores of 72.5 and 72.0, respectively. In the FrankaKitchen "Mixed" environment, WT outperformed the next best method (IQL) by nearly 40%, reaching a score of 70.9.

Performance comparison on D4RL benchmarks. WT (Ours) demonstrates significant improvements in complex environments like AntMaze and FrankaKitchen compared to prior RvS and TD-learning methods.

Efficiency and Stability

Beyond raw scores, WT proved to be highly efficient. It often requires only 20 minutes of training for tasks that take hours for TD-learning counterparts. Furthermore, it exhibited significantly lower variance across random seeds, suggesting a more robust and "trustworthy" learning process for researchers.

Conclusion

The Waypoint Transformer effectively addresses the primary weakness of supervised learning approaches in RL. By incorporating intermediate waypoints, it enables the "stitching" of trajectories while retaining the training stability and simplicity of the transformer architecture. As generative AI continues to scale, WT provides a promising framework for leveraging these advancements in the domain of offline reinforcement learning.

Summary updated

BibTeX
@inproceedings{badrinath2023waypoint,
  author = {Anirudhan Badrinath and Yannis Flet-Berliac and Allen Nie and Emma Brunskill},
  title = {{Waypoint Transformer: Reinforcement Learning via Supervised Learning with Intermediate Targets}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=BYywOFbRFz},
}
Figure