Handling Long and Richly Constrained Tasks through Constrained Hierarchical Reinforcement Learning
Yuxiao Lu, Arunesh Sinha, Pradeep Varakantham
TL;DR
This work tackles safety in temporally extended reinforcement learning by addressing long-horizon tasks with complex safety constraints. It introduces CoSHRL, a two-level framework combining a lower-level distributional RL agent that learns local reward and cost distributions with an upper-level constrained search via ConstrainedRRT* to plan sequences of waypoints under CVaR-based cost constraints. The main contributions include (i) a scalable constrained search method suitable for long-horizon tasks, (ii) the ability to handle rich percentile cost constraints, (iii) rapid policy updates when constraint thresholds or start/goals change, and (iv) a theoretical guarantee of asymptotic optimality under constraints. Empirical results across 2D navigation and image-based Safe-ViZDoom domains show CoSHRL achieving high success rates and CVaR-compliant costs, outperforming several baselines and demonstrating robustness without retraining for varying safety thresholds.
Abstract
Safety in goal directed Reinforcement Learning (RL) settings has typically been handled through constraints over trajectories and have demonstrated good performance in primarily short horizon tasks. In this paper, we are specifically interested in the problem of solving temporally extended decision making problems such as robots cleaning different areas in a house while avoiding slippery and unsafe areas (e.g., stairs) and retaining enough charge to move to a charging dock; in the presence of complex safety constraints. Our key contribution is a (safety) Constrained Search with Hierarchical Reinforcement Learning (CoSHRL) mechanism that combines an upper level constrained search agent (which computes a reward maximizing policy from a given start to a far away goal state while satisfying cost constraints) with a low-level goal conditioned RL agent (which estimates cost and reward values to move between nearby states). A major advantage of CoSHRL is that it can handle constraints on the cost value distribution (e.g., on Conditional Value at Risk, CVaR) and can adjust to flexible constraint thresholds without retraining. We perform extensive experiments with different types of safety constraints to demonstrate the utility of our approach over leading approaches in constrained and hierarchical RL.
