Adaptable Safe Policy Learning from Multi-task Data with Constraint Prioritized Decision Transformer

Rui-Qi Xue, Ziqian Zhang, Li-He Li, Cong Guan, Lei Yuan +1 more
1/1/2025
transformer-attentionrl

No official code found. Best implementation: ApocalypseX/CoPDT (5 stars).

Abstract

Learning safe reinforcement learning (RL) policies from offline multi-task datasets without direct environmental interaction is crucial for efficient and reliable deployment of RL agents. Benefiting from their scalability and strong in-context learning capabilities, recent approaches attempt to utilize Decision Transformer (DT) architectures for offline safe RL, demonstrating promising adaptability across varying safety budgets.

Show full abstract

However, these methods primarily focus on single-constraint scenarios and struggle with diverse constraint configurations across multiple tasks. Additionally, their reliance on heuristically defined Return-To-Go (RTG) inputs limits flexibility and reduces learning efficiency, particularly in complex multi-task scenarios. To address these limitations, we propose CoPDT, a novel DT-based framework designed to enhance adaptability to diverse constraints (i.e., cost functions) and varying budgets. Specifically, CoPDT introduces a constraint prioritized prompt encoder, which leverages sparse binary cost signals to accurately identify constraints, and a constraint prioritized Return-To-Go (CPRTG) token mechanism, which dynamically generates RTGs based on identified constraints and corresponding safety budgets. Extensive experiments on the OSRL benchmark demonstrate that CoPDT achieves superior efficiency and significantly enhanced safety compliance across diverse multi-task scenarios, surpassing state-of-the-art DT-based methods by satisfying safety constraints in more than twice as many tasks.

DOISemantic Scholar

Code Implementations(1)

ApocalypseX/CoPDTCommunity25%

The implementation of NeurIPS'25 paper "Adaptable Safe Policy Learning from Multi-task Data with Constraint Prioritized Decision Transformer".

50

Similar Papers

Cite this paper

@article{xue2025adaptable,
  title  = {Adaptable Safe Policy Learning from Multi-task Data with Constraint Prioritized Decision Transformer},
  author = {Rui-Qi Xue and Ziqian Zhang and Li-He Li and Cong Guan and Lei Yuan and Yang Yu},
  year   = {2025},
  doi    = {10.52202/085713-2170},
  url    = {https://doi.org/10.52202/085713-2170},
  journal = {Neural Information Processing Systems}
}

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/99dea7c3171b8b9709c5af7b707bc3260964dd6f.svg)](https://codeofpaper.com/paper/99dea7c3171b8b9709c5af7b707bc3260964dd6f)

Discussion