[Paper Review] Q-learning Decision Transformer: Leveraging Dynamic Programming for Conditional Sequence Modelling in Offline RL
This paper proposes Q-learning Decision Transformer (QDT), a hybrid offline reinforcement learning method that leverages Q-learning's Dynamic Programming estimates to relabel return-to-go (RTG) values in offline datasets, thereby endowing Decision Transformers with stitching capability—enabling them to combine sub-optimal trajectories into optimal policies. QDT achieves superior performance across diverse environments, including sparse-reward and long-horizon tasks, by combining the strengths of Q-learning (robust credit assignment) and DT (sequence modeling), outperforming both DT and CQL in challenging benchmarks.
Recent works have shown that tackling offline reinforcement learning (RL) with a conditional policy produces promising results. The Decision Transformer (DT) combines the conditional policy approach and a transformer architecture, showing competitive performance against several benchmarks. However, DT lacks stitching ability -- one of the critical abilities for offline RL to learn the optimal policy from sub-optimal trajectories. This issue becomes particularly significant when the offline dataset only contains sub-optimal trajectories. On the other hand, the conventional RL approaches based on Dynamic Programming (such as Q-learning) do not have the same limitation; however, they suffer from unstable learning behaviours, especially when they rely on function approximation in an off-policy learning setting. In this paper, we propose the Q-learning Decision Transformer (QDT) to address the shortcomings of DT by leveraging the benefits of Dynamic Programming (Q-learning). It utilises the Dynamic Programming results to relabel the return-to-go in the training data to then train the DT with the relabelled data. Our approach efficiently exploits the benefits of these two approaches and compensates for each other's shortcomings to achieve better performance. We empirically show these in both simple toy environments and the more complex D4RL benchmark, showing competitive performance gains.
Motivation & Objective
- Address the lack of 'stitching ability' in Decision Transformers (DT), which prevents them from combining sub-optimal trajectories into optimal policies.
- Overcome the instability and poor sample efficiency of Q-learning in long-horizon and sparse-reward settings by leveraging DT's sequence modeling capabilities.
- Improve offline RL performance by using Q-learning to relabel return-to-go (RTG) values in the dataset, thus enhancing the quality of supervision for DT.
- Develop a model-free, modular framework that enhances existing offline RL algorithms without requiring architectural redesign.
- Demonstrate robust performance across diverse environments, including simple gridworlds, Maze2D, and MuJoCo environments with delayed rewards.
Proposed method
- Train a Q-learning agent (specifically CQL) on the offline dataset to estimate optimal return-to-go (RTG) values for each state-action pair.
- Use the Q-learning estimates to relabel the RTG values in the original offline dataset, replacing the original RTG with the learned optimal RTG values.
- Fine-tune the Decision Transformer on the relabeled dataset, where the goal is now the Q-learned RTG, enabling the model to learn optimal behavior from sub-optimal trajectories.
- Leverage the transformer's self-attention mechanism to model long sequences of states and actions conditioned on the relabeled RTG, enabling effective sequence modeling.
- Use a two-stage training process: first train Q-learning (CQL) on the dataset, then pre-train and fine-tune the DT on the relabeled data.
- Ensure compatibility with existing offline RL benchmarks by using standard D4RL MuJoCo datasets and evaluating on v0, v1, and v2 versions to ensure reproducibility.
Experimental results
Research questions
- RQ1Can Q-learning estimates improve the ability of Decision Transformers to stitch sub-optimal trajectories into optimal policies?
- RQ2Does relabeling the return-to-go (RTG) in offline datasets using Q-learning results in better generalization and performance on long-horizon and sparse-reward tasks?
- RQ3How does the proposed QDT framework compare to standalone DT and CQL in environments where each method exhibits known weaknesses?
- RQ4Can a model-free, modular approach combining Q-learning and DT outperform end-to-end architectures in offline RL without requiring architectural redesign?
- RQ5To what extent does the relabeling of RTG values mitigate the instability of Q-learning in off-policy settings with function approximation?
Key findings
- QDT successfully enables Decision Transformers to stitch sub-optimal trajectories, solving a key limitation of standard DT in environments like the simple gridworld and Maze2D.
- In the simple environment, QDT achieves optimal performance, while DT fails due to its inability to stitch, and CQL struggles with delayed rewards.
- On the MuJoCo Walker2d environment with delayed rewards, QDT significantly outperforms CQL, which fails to learn effectively in sparse-reward scenarios.
- In the Maze2D environment, QDT improves upon DT's performance but still underperforms CQL, indicating room for improvement in certain tasks.
- The relabeling of RTG using Q-learning estimates leads to more accurate and stable value supervision, enabling DT to generalize better across diverse offline RL benchmarks.
- The method demonstrates robustness across different D4RL dataset versions (v0, v1, v2), highlighting its reproducibility and practical utility in real-world settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.