Controller Synthesis from Deep Reinforcement Learning Policies

Florent Delgrange, Guy Avni, Anna Lukina, Christian Schilling, Ann Nowe, Guillermo PerezEWRL17 2024

TL;DR

This paper introduces a novel framework that combines Deep Reinforcement Learning (DRL) with formal synthesis to create controllers for complex, multi-room environments. By learning low-level policies for individual "rooms" and then using synthesis to create a high-level planner, the approach achieves formal guarantees on the controller's behavior, even in environments with unknown dynamics and moving obstacles.

What Problem Does This Paper Address?

Designing controllers for complex, real-world environments is a significant challenge. Traditional methods often struggle with environments that have unknown dynamics, high-dimensional state spaces, or require long-term planning. Reinforcement Learning (RL) excels at learning in such complex settings but often lacks formal guarantees about the learned behavior. On the other hand, formal synthesis methods provide strong guarantees but typically require accurate models of the environment, which are often unavailable or intractable to obtain for large-scale systems. This paper addresses the gap by bridging these two approaches, aiming to leverage the strengths of both: the learning capabilities of DRL and the formal guarantees of synthesis. Specifically, it tackles the problem of designing controllers for environments with a hierarchical structure, where the overall task is broken down into sub-tasks within individual "rooms," and a high-level planner needs to decide which sub-task to execute.

Methods

The core of the proposed framework is a two-level approach:

  1. Low-Level Policy Learning with DRL: For each "room" (a sub-environment with its own dynamics and objectives), Deep Reinforcement Learning (DRL) is used to train low-level policies. A key innovation here is the development of a novel DRL procedure called WAE-DQN. This procedure simultaneously learns:
  2. Latent Policies: Concise policies that are easier to reason about.
  3. Latent Abstract Rooms: Simplified models of the room dynamics.
  4. PAC Guarantees: Probabilistically Approximately Correct guarantees on the quality of the learned abstraction and policy performance. This is achieved by training a latent MDP and a policy that are "bisimilar" to the original room dynamics, circumventing the need for a separate model distillation step.
  5. High-Level Planner Synthesis: Once the low-level policies and their guarantees are established, a high-level planner is synthesized. This planner operates on a "succinct model" of the environment, which abstracts away the low-level details. The planner's role is to select which low-level policy to execute in each room to achieve a global, high-level objective (e.g., reaching a target location). This synthesis step leverages formal methods to ensure that the resulting high-level controller satisfies the specified objective, inheriting the guarantees from the low-level policies.

The framework also addresses the challenge of "distribution shift" that occurs when combining independently trained low-level policies. It introduces the concept of an "entrance loss" and uses assumptions about initial distribution coverage to lift guarantees to the two-level model.

Datasets

The paper describes a case study involving agent navigation in a grid world with moving obstacles. The environments are parameterized by size (number of rooms, dimensions of each room). The authors mention training on environments with up to 9 rooms of 20x20 cells, with varying numbers of adversaries. No specific public datasets are mentioned; the environments appear to be custom-generated for the experiments.

Key Insights and Ideas

  • Bridging DRL and Formal Synthesis: The paper demonstrates a powerful synergy between DRL's learning capabilities and formal synthesis's guarantee-providing nature. This combination allows for robust control in complex, uncertain environments.
  • WAE-DQN for Guaranteed Abstraction: The novel WAE-DQN procedure is a significant contribution. By learning latent policies and abstract models simultaneously with PAC guarantees, it avoids the often-difficult model distillation step and provides a more direct path to verifiable RL.
  • "Separation of Concerns": The framework effectively separates low-level task execution (handled by DRL) from high-level strategic planning (handled by synthesis). This modularity makes the system more scalable and easier to design and debug.
  • Reusability of Low-Level Components: The learned low-level policies and their guarantees are reusable across different high-level tasks or environment structures, offering significant efficiency gains.
  • Formal Guarantees for RL: The core value proposition is providing formal guarantees on the behavior of RL-controlled systems, which is crucial for safety-critical applications.

Key Results

  • Feasibility Demonstrated: The framework's feasibility is shown through a case study of agent navigation with moving obstacles.
  • DRL Struggles, Framework Succeeds: Standard DQN struggled to find a policy in the challenging environment, even with reward shaping. The proposed WAE-DQN approach successfully learned low-level policies for reach-avoid objectives.
  • Formal Guarantees: The paper provides theoretical bounds (PAC guarantees) on the quality of the learned abstractions and the overall controller's performance.
  • Reusability Shown: The experiments highlight the reusability of low-level components by modifying the environment (increasing rooms/adversaries) while keeping the same learned policies. The predicted latent values remained consistent with observed ones.
  • High Success Probability: The synthesized high-level controller achieved high success probability, demonstrating the effectiveness of the approach in overcoming sparse reward challenges.

Limitations and Future Work

  • Model Requirement: While the framework aims to reduce the need for explicit models, it still relies on a high-level map of the environment structure. The authors suggest future work could explore relaxing this requirement to achieve "end-to-end" synthesis.
  • Conservatism of Bounds: The authors acknowledge that the PAC bounds can be conservative and suggest future work on refining them or obtaining more efficient estimates.
  • Integration of Skill Discovery: The paper mentions integrating skill discovery, goal-oriented RL, and multi-objective RL as promising future directions.
  • Scalability of Synthesis: While the framework scales better than pure synthesis, the complexity of the synthesis step itself might still be a bottleneck for extremely large high-level graphs.

Summary updated

Abstract

We propose a novel framework to controller design in environments with a two-level structure: a high-level graph in which each vertex is populated by a Markov decision process, called a ``room'', with several low-level objectives. We proceed as follows. First, we apply deep reinforcement learning (DRL) to obtain low-level policies for each room and objective. Second, we apply reactive synthesis to obtain a planner that selects which low-level policy to apply in each room. Reactive synthesis refers to constructing a planner for a given model of the environment that satisfies a given objective (typically specified as a temporal logic formula) by design. The main advantage of the framework is formal guarantees. In addition, the framework enables a "separation of concerns": low-level tasks are addressed using DRL, which enables scaling to large rooms of unknown dynamics, reward engineering is only done locally, and policies can be reused, whereas users can specify high-level tasks intuitively and naturally. The central challenge in synthesis is the need for a model of the rooms. We address this challenge by developing a DRL procedure to train concise "latent" policies together with latent abstract rooms, both paired with PAC guarantees on performance and abstraction quality. Unlike previous approaches, this circumvents a model distillation step. We demonstrate feasibility in a case study involving agent navigation in an environment with moving obstacles.
BibTeX
@inproceedings{delgrange2024controller,
  author = {Florent Delgrange and Guy Avni and Anna Lukina and Christian Schilling and Ann Nowe and Guillermo Perez},
  title = {{Controller Synthesis from Deep Reinforcement Learning Policies}},
  booktitle = {EWRL17},
  year = {2024},
  url = {https://openreview.net/forum?id=KDiCsArAKs},
}

Loading related content...

Figure