World Programs for Model-Based Learning and Planning in Compositional State and Action Spaces

Marwin H. S. SeglerarXiv 2019 · OpenReview

TL;DR

This paper introduces a novel framework for model-based reinforcement learning (RL) in complex environments where the action space is unknown and the state space is compositional. By learning a "world program" that models both the environment's dynamics and the available actions from observed state transitions, agents can effectively plan and learn in scenarios where traditional RL methods struggle.

What Problem Does This Paper Address?

Reinforcement learning (RL) has seen tremendous success in domains with readily available simulators or direct access to the real environment. However, many real-world applications, such as robotics or scientific experimentation, present significant challenges: interactions can be expensive, dangerous, or simply impossible to simulate perfectly. Furthermore, in these complex environments, defining the complete set of possible actions a priori is often infeasible. This paper tackles the problem of learning and planning in such settings, specifically focusing on compositional state spaces (where states are built from smaller, related components, like graphs) and unknown action spaces.

Methods

The core contribution is a formalism for learning a "world program" from observed state transitions. This world program consists of three key components:

  1. Action Space Induction: The system learns the set of possible actions ($A$) and how they apply to different states ($A(s)$). This is framed as a program induction problem, where actions are represented as graph rewriting rules. The learner infers these rules from examples of state-state transitions.
  2. Dynamics Model Learning: A transition function ($T$) is learned, which predicts the next state given a current state and an action. This is implemented using neural networks, specifically graph neural networks (GNNs) to handle the compositional nature of the states.
  3. Planning: Once the world program (actions and dynamics) is learned, it acts as a simulator. This simulator can then be used with standard RL algorithms, such as Monte Carlo Tree Search (MCTS), to train an agent or perform planning for complex tasks.

The paper leverages graph neural networks extensively, as they provide an appropriate inductive bias for compositional state representations.

Datasets

The paper describes an application to chemical synthesis planning for organic molecules. The "dataset" used for learning the world program consists of state-state transitions derived from literature chemical reactions. For evaluation, they used a dataset of 497 different molecules for which synthesis plans were predicted.

Key Insights and Ideas

  • Learning the Action Space is Crucial: The paper highlights that in many real-world scenarios, the action space is not a given. Learning to infer what actions are possible and how they operate is a fundamental step towards enabling model-based RL.
  • Compositional States and Graph Neural Networks: The use of graph-based representations for states and GNNs for learning dynamics and action mappings is a powerful combination for handling complex, structured environments.
  • World Program as a Learned Simulator: The concept of a "world program" that encapsulates both actions and dynamics provides a flexible and learnable simulator, bridging the gap between model-free RL and environments with unknown dynamics or actions.
  • Bridging Symbolic and Neural Approaches: The method combines symbolic reasoning (graph rewriting for actions) with neural networks (for dynamics and action selection probabilities), leveraging the strengths of both.

Key Results

The formalism was applied to chemical synthesis planning, a task requiring backward search by deconstructing molecules.

  • Quantitative Results: In predicting synthesis plans for 497 molecules, the proposed PUCT-MCTS agent achieved a 95.24% success rate, significantly outperforming other methods like Monte Carlo Search (MCS) and Best First Search (BFS) variants. The PUCT-MCTS agent was also considerably faster, taking an average of 13.0 seconds per plan compared to hundreds of seconds for other methods.
  • Qualitative Results: A double-blind study with expert organic chemists showed that plans generated by their PUCT-MCTS algorithm were perceived as equivalent to literature-reported plans (57.0% vs 43.0%) and significantly preferred over plans from a baseline heuristic BFS system (68.2% vs 31.8%).

Limitations and Future Work

  • Continuous State/Action Spaces: The current framework is primarily designed for discrete state and action spaces. Extending it to continuous settings, particularly for robotics, is identified as a key area for future work.
  • Hyperparameter Tuning: The authors note that most hyperparameters were not extensively tuned, suggesting that further gains could be achieved with more thorough investigation.
  • Challenge for the Community: The paper proposes a challenge: to learn the rules of games like Go and Chess from historical game data (as grid graphs), build a simulator, and then compete with an AlphaZero-like agent using an agent trained in the learned simulator. This highlights the potential for applying these techniques to broader AI problems.

Summary updated

Abstract

Some of the most important tasks take place in environments which lack cheap and perfect simulators, thus hampering the application of model-free reinforcement learning (RL). While model-based RL aims to learn a dynamics model, in a more general case the learner does not know a priori what the action space is. Here we propose a formalism where the learner induces a world program by learning a dynamics model and the actions in graph-based compositional environments by observing state-state transition examples. Then, the learner can perform RL with the world program as the simulator for complex planning tasks. We highlight a recent application, and propose a challenge for the community to assess world program-based planning.
BibTeX
@misc{segler2019world,
  author = {Marwin H. S. Segler},
  title = {{World Programs for Model-Based Learning and Planning in Compositional State and Action Spaces}},
  year = {2019},
  eprint = {1912.13007},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.13007},
}
Figure