Abstract
Offline Reinforcement Learning (RL) has recently been approached as a sequence modeling problem, exemplified by the Decision Transformer (DT). However, standard Transformers treat trajectories as flat sequences, ignoring the inherent Markovian structure of RL. We present the Graph Decision Transformer (GDT), which structures trajectories into a causal graph to explicitly encode environment dynamics. GDT demonstrates superior performance on long-term dependency tasks in Atari and OpenAI Gym benchmarks.
Introduction
The Decision Transformer (DT) paradigm treats RL as "GPT for RL," learning policies from fixed datasets. Despite its success, the authors identify three major flaws in standard DT: it treats states and actions as identical tokens (concept blurring), ignores the Markov property where the current state depends on the previous state-action pair, and loses spatial information in visual tasks due to CNN squashing. The Graph Decision Transformer (GDT) addresses these by introducing a relational inductive bias through a causal graph representation.
Methodology
The core innovation of GDT is the transformation of the trajectory sequence into a directed causal graph.
Causal Graph Representation
In GDT, nodes represent returns-to-go ($\hat{R}_t$), states ($s_t$), and actions ($a_t$). Directed edges are explicitly defined to represent known dependencies, such as transition dynamics ($s_{t-1} \to s_t$). This structure ensures the model respects the underlying "physics" of the environment.
Relation-Enhanced Attention
The model utilizes a relation-aware attention mechanism. By incorporating edge embeddings into the attention score calculation, GDT can distinguish between temporal proximity and causal relevance, effectively filtering out noise in long sequences.
GDT-plus for Visual Environments
To handle high-dimensional visual inputs like Atari games, the authors developed GDT-plus. This variant integrates a Sequence Transformer that processes image states as patches, similar to a Vision Transformer (ViT). This preserves fine-grained spatial relationships that standard CNN encoders might lose.
Experimental Results
GDT was evaluated on Atari 2600 and D4RL (OpenAI Gym) benchmarks, representing both high-dimensional visual inputs and vector-based state inputs.
Performance on Atari and Gym
GDT-plus achieved state-of-the-art results on Atari, significantly outperforming the original DT. For instance, in Breakout, GDT-plus scored 441.7 compared to DT's 267.5. On the D4RL benchmark, GDT consistently outperformed DT across various locomotion tasks, achieving an average score of 76.8 versus 74.7.
Scaling and Robustness
A key finding is GDT's ability to handle long context windows. While DT's performance often plateaus or degrades as history increases, GDT's performance continues to improve, suggesting that the graph structure acts as an effective filter for historical dependencies. Ablation studies further confirmed that the specific causal structure, rather than just the graph architecture itself, is responsible for these gains.
Conclusion
By moving away from flat sequence modeling and embracing the causal structure of RL, the Graph Decision Transformer provides a more robust and scalable framework for offline reinforcement learning. While the graph construction adds some computational overhead, the resulting performance gains in complex, long-horizon tasks suggest a promising direction for future RL research.
Summary updated