Learning General Policies with Policy Gradient Methods

Simon Ståhlberg, Blai Bonet, Hector Geffner

Abstract

While reinforcement learning methods have delivered remarkable results in a number of settings, generalization, i.e., the ability to produce policies that generalize in a reliable and systematic way, has remained a challenge. The problem of generalization has been addressed formally in classical planning where provable correct policies that generalize over all instances of a given domain have been learned using combinatorial methods. The aim of this work is to bring these two research threads together to illuminate the conditions under which (deep) reinforcement learning approaches, and in particular, policy optimization methods, can be used to learn policies that generalize like combinatorial methods do. We draw on lessons learned from previous combinatorial and deep learning approaches, and extend them in a convenient way. From the former, we model policies as state transition classifiers, as (ground) actions are not general and change from instance to instance. From the latter, we use graph neural networks (GNNs) adapted to deal with relational structures for representing value functions over planning states, and in our case, policies. With these ingredients in place, we find that actor-critic methods can be used to learn policies that generalize almost as well as those obtained using combinatorial approaches while avoiding the scalability bottleneck and the use of feature pools. Moreover, the limitations of the DRL methods on the benchmarks considered have little to do with deep learning or reinforcement learning algorithms, and result from the well-understood expressive limitations of GNNs, and the tradeoff between optimality and generalization (general policies cannot be optimal in some domains). Both of these limitations are addressed without changing the basic DRL methods by adding derived predicates and an alternative cost structure to optimize.

Introduction

Deep Reinforcement Learning (DRL) has achieved significant success in specialized environments, yet systematic generalization remains elusive. In contrast, classical planning focuses on "General Policies"—rules capable of solving any instance within a domain, regardless of size or specific object count. While combinatorial optimization can derive these policies with formal guarantees, it often faces scalability issues and requires extensive manual feature engineering. This research explores whether standard actor-critic DRL algorithms can bridge this gap, learning robust general policies by leveraging relational representations and Graph Neural Networks (GNNs).

Methodology

The proposed framework integrates relational logic with policy gradient methods. States are represented as sets of objects and predicates, ensuring the model is agnostic to specific object identities.

Relational Representation and GNNs

By using GNNs, the architecture maintains permutation invariance, focusing on the relational structure of the state rather than fixed input dimensions. This allows a model trained on small instances (e.g., 5 blocks) to be applied directly to larger ones (e.g., 50 blocks).

Policies as State-Transition Classifiers

In generalized planning, the set of available actions varies between instances. To address this, the policy is modeled as a classifier over state transitions $(s, s')$. The network evaluates potential successor states to determine which transitions lead toward the goal.

Actor-Critic Variants

The study evaluates two primary algorithmic approaches:

  1. Standard Actor-Critic (AC-1): Samples a single successor state per update.
  2. All-Actions Actor-Critic (AC-M): Considers all possible successor states during updates, effectively performing a full Bellman update for greater efficiency.
Algorithm 1: Standard Actor-Critic for generalized planning.

Experimental Evaluation

The approach was tested across 10 classic planning benchmarks, including Blocks, Gripper, Logistics, and Miconic. Models were trained on small-scale instances and validated on significantly larger, unseen problems to test true generalization.

Results and Discussion

The results demonstrate that DRL can indeed learn near-perfect general policies. In 6 of the 10 domains, the learned policies achieved 100% coverage out of the box.

Experimental results comparing Standard and All-Actions Actor-Critic across domains.

The GNN Expressivity Bottleneck

Failures in generalization were often traced back to the logical limits of GNNs rather than the RL algorithms. Standard GNNs are limited to the two-variable fragment of first-order logic ($C_2$). Domains like Logistics require more complex relational reasoning. By introducing "derived predicates"—additional logical features—the researchers achieved 100% generalization across nearly all benchmarks.

Sample Efficiency

The "All-Actions" variant (AC-M) proved significantly more stable and sample-efficient than the standard sampling-based approach, highlighting the benefit of leveraging the transition model when available.

Conclusion

This work shows that standard policy gradient methods, when combined with relational GNNs and transition-based classifiers, can learn general policies that rival combinatorial methods. The primary hurdles to generalization in DRL are often architectural (GNN expressivity) or structural (optimality vs. generalization tradeoffs) rather than algorithmic. Future work will focus on automating the discovery of necessary predicates to remove the need for manual feature engineering.

Summary updated

BibTeX
@inproceedings{stahlberg2023learning,
  author = {Simon Ståhlberg and Blai Bonet and Hector Geffner},
  title = {{Learning General Policies with Policy Gradient Methods}},
  booktitle = {PRL},
  year = {2023},
  url = {https://openreview.net/forum?id=keNhJXjVDW},
}
Figure