用大模型生成安全策略,让无违规数据也能学出靠谱的决策。
Model-Based Proactive Cost Generation for Learning Safe Policies Offline with Limited Violation Data

- 结合大模型语言知识构建保守成本函数,识别潜在危险状态。
- 通过模型回放合成反事实违规样本,提升安全策略可靠性。
- 适合高风险场景下无违规数据的离线安全强化学习应用。
从无风险在线交互的离线数据中学习满足约束的策略,对安全关键决策至关重要。传统方法依赖大量不安全样本学习成本价值函数以定义安全边界并惩罚违规行为,但在高风险场景中,试错不可行,导致数据集中极少或没有不安全样本。此时,现有方法通常将所有数据视为安全,忽略“安全但不可行”的状态——即当前满足约束但几步内必然违反的状态,造成部署失败。受知识-数据融合启发,我们利用大语言模型(LLMs)将自然语言知识融入策略中,提出面向几乎无违规数据的模型式离线安全强化学习框架PROCO。PROCO首先从离线数据中学习动力学模型,并通过将自然语言中的不安全状态知识嵌入LLM来构建保守成本函数,实现无观测违规下的风险估计。基于该成本函数与学习到的模型,PROCO进行模型式回放,合成多样化的反事实不安全样本,支持可靠可行性识别与可行性引导的策略学习。在一系列仅有安全或极低风险训练数据的Safety-Gymnasium任务中,PROCO可无缝集成多种离线安全强化学习算法,显著减少约束违反次数,提升安全性能,优于原始方法及其他行为克隆基线。
原文摘要 · Abstract (English)
Learning constraint-satisfying policies from offline data without risky online interaction is crucial for safety-critical decision making. Conventional methods typically learn cost value functions from abundant unsafe samples to define safety boundaries and penalize violations. However, in high-stakes scenarios, risky trial-and-error is infeasible, yielding datasets with few or no unsafe samples. Under this limitation, existing approaches often treat all data as uniformly safe, overlooking safe-but-infeasible states - states that currently satisfy constraints but inevitably violate them within a few steps - leading to deployment failures. Drawing inspiration from the concept of knowledge-data integration, we leverage large language models (LLMs) to incorporate natural language knowledge into the policy to address this challenge. Specifically, we propose PROCO, a model-based offline safe reinforcement learning (RL) framework tailored to datasets largely free of violations. PROCO first learns a dynamics model from offline data and constructs a conservative cost function by grounding natural-language knowledge of unsafe states in LLMs, enabling risk estimation even without observed violations. Using the cost function and learned model, PROCO performs model-based rollouts to synthesize diverse counterfactual unsafe samples, supporting reliable feasibility identification and feasibility-guided policy learning. Across a range of Safety-Gymnasium tasks with exclusively safe or minimally risky training data, PROCO integrates seamlessly with a variety of offline safe RL algorithms and consistently demonstrates reduced constraint violations and improved safety performance compared to both the original methods and other behavior cloning baselines.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。