Introduction
Reinforcement learning (RL) has achieved remarkable success in complex domains, yet its adoption in safety-critical engineering remains limited. The primary obstacle is the "black box" nature of monolithic deep RL agents, which makes it nearly impossible to provide formal guarantees regarding safety and performance. This paper introduces Iterative Compositional Reinforcement Learning (ICRL), a framework that addresses these challenges by decomposing complex tasks into verifiable modules.
The ICRL Framework
The core of the proposed approach is a two-level hierarchy that separates high-level strategic planning from low-level control. Unlike traditional Hierarchical RL, ICRL uses formal methods to ensure that the composition of subtasks satisfies global specifications.
The process begins with a High-Level Model (HLM) constructed from task specifications and subtask definitions. A parameter synthesis step then calculates the required performance bounds for each subtask. These bounds guide the training of low-level RL agents (using Proximal Policy Optimization). Crucially, a performance estimator provides feedback to the high-level planner, allowing the system to iteratively refine its strategy if certain subtasks prove too difficult to master.
High-Level Modeling and Verification
The HLM is represented as a parametric Markov Decision Process (pMDP). In this model, states represent regions of the environment, and transitions correspond to the execution of specific RL subtask policies. The transition probabilities are parameters representing the success rates of these policies.
By solving a bilinear optimization program over this pMDP, the framework identifies the optimal set of subtasks to train and the minimum success probability required for each to meet a global safety or performance threshold (e.g., "reach the goal with at least 95% certainty"). This modularity allows for Theorem 1, which proves that the HLM’s predicted success probability serves as a mathematically sound lower bound for the actual system performance.
Experimental Results
The ICRL framework was tested in diverse environments, including discrete grids, vision-based mazes, and high-fidelity physics simulations in Unity.
- Efficiency: In a continuous physics "Labyrinth" task, ICRL reached the target specification in 450,000 steps. In contrast, a monolithic RL agent failed to solve the task even after 13 million steps—a 30-fold increase in sample efficiency.
- Adaptability: When environmental noise made a direct path unreliable, the ICRL algorithm automatically detected the bottleneck and pivoted to a longer but safer route that could meet the required success guarantees.
- Zero-Shot Transfer: Because the subtasks are modular, policies trained in one environment can be reused in entirely new layouts. The system can verify the success probability of these new configurations instantly by plugging existing performance metrics into a new HLM.
Conclusion
By treating RL agents as modular components with formal interfaces, ICRL bridges the gap between deep learning and formal verification. While current implementations require manual subtask definition, the framework provides a rigorous path toward deploying trustworthy autonomous systems in the real world.
Summary updated