Improving and Benchmarking Offline Reinforcement Learning Algorithms

Bingyi Kang, Xiao Ma, Yirui Wang, Yang Yue, Shuicheng YanarXiv 2023

Abstract

Recently, Offline Reinforcement Learning (RL) has achieved remarkable progress with the emergence of various algorithms and datasets. However, these methods usually focus on algorithmic advancements, ignoring that many low-level implementation choices considerably influence or even drive the final performance. As a result, it becomes hard to attribute the progress in Offline RL as these choices are not sufficiently discussed and aligned in the literature. In addition, papers focusing on a dataset (e.g., D4RL) often ignore algorithms proposed on another dataset (e.g., RL Unplugged), causing isolation among the algorithms, which might slow down the overall progress. Therefore, this work aims to bridge the gaps caused by low-level choices and datasets. To this end, we empirically investigate 20 implementation choices using three representative algorithms (i.e., CQL, CRR, and IQL) and present a guidebook for choosing implementations. Following the guidebook, we find two variants CRR+ and CQL+, achieving new state-of-the-art on D4RL. Moreover, we benchmark eight popular offline RL algorithms across datasets under unified training and evaluation framework. The findings are inspiring: the success of a learning paradigm severely depends on the data distribution, and some previous conclusions are biased by the dataset used.

Introduction: The Implementation Bottleneck in Offline RL

Offline Reinforcement Learning (RL) seeks to train effective agents using only pre-collected datasets, bypassing the risks and costs associated with real-world exploration. A central challenge in this domain is distribution shift: when an agent selects an action not represented in the training data, it may overestimate its value (extrapolation error), leading to policy failure.

While research often focuses on novel mathematical frameworks to mitigate this shift, this paper identifies two critical gaps in the current literature. First, "low-level" implementation details—such as weight initialization and activation functions—are frequently overlooked despite their significant impact on performance. Second, research is often siloed into specific benchmarks like D4RL or RL Unplugged, preventing a holistic understanding of how algorithms generalize across different data distributions.

Systematic Investigation of Implementation Choices

To address these gaps, the authors conducted an extensive empirical study of 20 implementation choices across three foundational algorithms: Conservative Q-Learning (CQL), Critic Regularized Regression (CRR), and Implicit Q-Learning (IQL). These choices included reward normalization, layer normalization, weight initialization, and policy distribution types.

Ablation studies for IQL and a summary of implementation impacts across different algorithms.

By distilling the results of these experiments, the researchers developed a "guidebook" of best practices. Applying these insights led to the creation of optimized variants:

  • CQL+: Enhanced with ELU activations, tuned policy learning rates, and increased action sampling.
  • CRR+: Improved through the addition of Double Q-learning and Layer Normalization.

To ensure a fair comparison, eight popular algorithms (BC, SAC, Onestep RL, TD3+BC, CQL, IQL, MuZero Unplugged, and CRR) were re-implemented from scratch using a unified JAX/Flax framework.

Benchmarking Across Diverse Datasets

The study evaluates these algorithms across two distinct benchmarks:

  • D4RL: Focuses on continuous control tasks (Gym, Adroit, Kitchen, Antmaze) with data typically generated by a few fixed agents (e.g., expert or medium level).
  • RL Unplugged: Utilizes the DeepMind Control Suite, where data is sourced from the entire replay buffer of a learning agent, providing a broader and more uniform distribution of experiences.

Key Results: Achieving New State-of-the-Art

The optimized baselines, CQL+ and CRR+, demonstrated significant performance gains. On the D4RL gym-locomotion tasks, CQL+ (731.9 total score) and CRR+ (702.3) both surpassed the previous state-of-the-art, IQL (692.4).

Comparison of original vs. improved baselines and detailed ablation results for CQL and CRR.

Key Insights and Ideas

  • Implementation as a Primary Driver: The performance gap between standard CRR and CRR+ reached 33.8%, highlighting that implementation choices can be as impactful as the core algorithm itself. This suggests that many reported breakthroughs in the field may be partially attributable to superior tuning rather than algorithmic innovation.
  • Sensitivity to Data Distribution: Algorithms utilizing value constraints (like CQL) struggle with the diverse replay data in RL Unplugged, as conservative bounds can become too loose. Conversely, policy constraint methods (like IQL and CRR) prove more robust across varying dataset types.
  • The Versatility of IQL: Despite its sensitivity to tuning, IQL emerged as the most consistent performer across both benchmarks, making it a reliable baseline for practical applications.
  • MuZero's Limitations: While effective on diverse replay data, MuZero Unplugged underperforms on D4RL's narrow distributions due to a lack of conservative constraints.

Conclusion

This work underscores the necessity of aligning implementation details and benchmarking across diverse datasets to accurately measure progress in Offline RL. The provided guidebook and unified framework offer a path forward for more transparent and robust research. Future work will extend this benchmarking to include architectural innovations like Decision Transformers and large-ensemble methods.

Summary updated

BibTeX
@misc{kang2023improving,
  author = {Bingyi Kang and Xiao Ma and Yirui Wang and Yang Yue and Shuicheng Yan},
  title = {{Improving and Benchmarking Offline Reinforcement Learning Algorithms}},
  year = {2023},
  eprint = {2306.00972},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.00972},
}
Figure