Imitate the Good and Avoid the Bad: An Incremental Approach to Safe Reinforcement Learning
Huy Hoang, Tien Mai, Pradeep Varakantham
Abstract
A popular framework for enforcing safe actions in Reinforcement Learning (RL) is Constrained RL, where trajectory based constraints on expected cost (or other cost measures) are employed to enforce safety and more importantly these constraints are enforced while maximizing expected reward. Most recent approaches for solving Constrained RL convert the trajectory based cost constraint into a surrogate problem that can be solved using minor modifications to RL methods. A key drawback with such approaches is an over or underestimation of the cost constraint at each state. Therefore, we provide an approach that does not modify the trajectory based cost constraint and instead imitates "good" trajectories and avoids "bad" trajectories generated from incrementally improving policies. We employ an oracle that utilizes a reward threshold (which is varied with learning) and the overall cost constraint to label trajectories as "good" or "bad". A key advantage of our approach is that we are able to work from any starting policy or set of trajectories and improve on it. In an exhaustive set of experiments, we demonstrate that our approach is able to outperform top benchmark approaches for solving Constrained RL problems, with respect to expected cost, CVaR cost, or even unknown cost constraints. Code is available at: https://github.com/hmhuy0/SIM-RL .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers5
- SPRINQL: Sub-optimal Demonstrations driven Offline Imitation LearningHuy Hoang, Tien Mai, Pradeep VarakanthamNeurIPS 2024 · 12 citations
- Safety through feedback in Constrained RLShashank Reddy Chirra, Pradeep Varakantham, Praveen ParuchuriNeurIPS 2024 · 6 citations
- Offline Safe Reinforcement Learning Using Trajectory ClassificationZe Gong, Akshat Kumar, Pradeep VarakanthamAAAI 2025 · 6 citations
- Semantic Loss Guided Data Efficient Supervised Fine Tuning for Safe Responses in LLMsYuxiao Lu, Arunesh Sinha, Pradeep VarakanthamICLR 2025
- DualCOIL: Offline Imitation Learning from Contrasting DemonstrationsHuy Hoang, Tien Mai, Pradeep Varakantham, Tanvi VermaICML 2026
Builds on14
- Bootstrap Your Own Latent - A New Approach to Self-Supervised LearningJean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec et al.NeurIPS 2020 · 9,171 citations
- SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 2,496 citations
- CURL: Contrastive Unsupervised Representations for Reinforcement LearningMichael Laskin, Aravind Srinivas, Pieter AbbeelICML 2020 · 1,261 citations
- ELECTRA: Pre-training Text Encoders as Discriminators Rather Than GeneratorsKevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. ManningICLR 2020 · 541 citations
- IQ-Learn: Inverse soft-Q Learning for ImitationDivyansh Garg, Shuvam Chakraborty, Chris Cundy, Jiaming Song et al.NeurIPS 2021 · 271 citations
Related papers
- Reward Penalties on Augmented States for Solving Richly Constrained RL EffectivelyHao Jiang, Tien Mai, Pradeep Varakantham, Huy HoangAAAI 2024 · 2 citations
- Online Optimization for Offline Safe Reinforcement LearningYassine Chemingui, Aryan Deshwal, Alan Fern, Thanh Nguyen-Tang et al.NeurIPS 2025 · 3 citations
- Constrained Markov Decision Processes via Backward Value FunctionsHarsh Satija, Philip Amortila, Joelle PineauICML 2020 · 58 citations
- TraCeS: Learning Per-Timestep Constraint-Violation Credit from Sparse Trajectory-Level LabelsSiow Meng Low, Ze Gong, Akshat KumarICML 2026
- Safe Offline Reinforcement Learning with Real-Time Budget ConstraintsQian Lin, Bo Tang, Zifan Wu, Chao Yu et al.ICML 2023 · 31 citations
