Constrained Decision Transformer for Offline Safe Reinforcement Learning

Zuxin Liu, Zijian Guo, Yihang Yao, Zhepeng Cen, Wenhao Yu +2 more
2/14/2023
cs.LGcs.AIcs.RO

Official code: liuzuxin/OSRL (246 stars, Apache-2.0, PyTorch, last commit 2024-09-13).

Abstract

Safe reinforcement learning (RL) trains a constraint satisfaction policy by interacting with the environment. We aim to tackle a more challenging problem: learning a safe policy from an offline dataset. We study the offline safe RL problem from a novel multi-objective optimization perspective and propose the $ε$-reducible concept to characterize problem difficulties. The inherent trade-offs between safety and task performance inspire us to propose the constrained decision transformer (CDT) approach, which can dynamically adjust the trade-offs during deployment. Extensive experiments show the advantages of the proposed method in learning an adaptive, safe, robust, and high-reward policy. CDT outperforms its variants and strong offline safe RL baselines by a large margin with the same hyperparameters across all tasks, while keeping the zero-shot adaptation capability to different constraint thresholds, making our approach more suitable for real-world RL under constraints. The code is available at https://github.com/liuzuxin/OSRL.

View on arXivView PDF

Code Implementations(1)

liuzuxin/OSRLOfficial100%
PyTorchApache-2.0

🤖 Elegant implementations of offline safe RL algorithms in PyTorch

24617Python, MakefileApr 8, 20232 years agoApache-2.0
bc-safecdtcpqlibraryoffline-rl+5 more

Similar Papers

Cite this paper

@article{liu2023constrained,
  title  = {Constrained Decision Transformer for Offline Safe Reinforcement Learning},
  author = {Zuxin Liu and Zijian Guo and Yihang Yao and Zhepeng Cen and Wenhao Yu and Tingnan Zhang and Ding Zhao},
  year   = {2023},
  eprint = {2302.07351},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2302.07351v2},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2302.07351.svg)](https://codeofpaper.com/paper/2302.07351)

Discussion