Optimize Planning Heuristics to Rank, not to Estimate Cost-to-Goal

Leah Chrestien, Tomás Pevný, Stefan Edelkamp, Antonín Komenda · DOI

In the field of automated planning, the efficiency of search algorithms like A* and Greedy Best-First Search (GBFS) hinges on the quality of the heuristic function $h(s)$. Traditionally, the objective has been to train neural networks to approximate the true cost-to-goal, $h^*(s)$, treating heuristic generation as a regression problem. However, a NeurIPS 2023 paper titled "Optimize Planning Heuristics to Rank, not to Estimate Cost-to-Goal" challenges this paradigm. The authors argue that search algorithms do not require absolute distance estimates; they only require a relative ordering of states to make optimal decisions.

The Limitations of Regression-Based Heuristics

Traditional regression approaches aim to minimize the Mean Squared Error ($L_2$ loss) between the predicted $h(s)$ and the actual distance $h^*(s)$. While intuitive, this approach suffers from two primary theoretical and practical flaws:

  1. The Problem of Ties: Even a perfect $h^*$ function can lead to inefficient searches. If multiple states have the same $h^*$ value, the search algorithm may expand a large number of states that are not on the optimal path before finding the goal. Regression does not inherently provide a mechanism to break these ties effectively.
  2. Ignorance of Off-Path States: Regression models are typically trained on states that lie on optimal plans. Consequently, the model learns very little about "bad" states that lead away from the goal. If a search process strays into these regions, the heuristic provides poor guidance, often failing to penalize suboptimal directions.

Shifting to a Ranking Paradigm

The authors propose a shift from regression to learning to rank. Under this framework, the goal is to ensure that for any two states, the one closer to the goal (or more likely to lead to an optimal solution) is assigned a lower merit value.

Strict Optimal Efficiency

To formalize this, the paper introduces the concept of strict optimal efficiency. A heuristic is considered strictly optimally efficient if the search algorithm expands only those states that are strictly necessary to reach the goal along an optimal path. This is a higher bar than traditional optimality and focuses on minimizing the search effort.

Loss Functions for Ranking

To achieve this, the authors utilize loss functions based on the Iverson bracket. For a state $s_i$ on an optimal path and a state $s_j$ that could be expanded instead, the loss penalizes the model if it fails to rank $s_i$ as better than $s_j$. To make this differentiable for neural network training, they employ a surrogate logistic loss:

$$\mathcal{L} = \log(1 + \exp(r))$$

where $r$ represents the difference in merit values between the "good" state and the "bad" state. This formulation allows the model to be trained specifically for the search algorithm it will support, with distinct loss variations for A* (which incorporates path cost $g$) and GBFS (which relies solely on $h$).

Experimental Evaluation

The researchers evaluated the ranking approach across eight diverse planning domains, including grid-based environments and standard Planning Domain Definition Language (PDDL) tasks:

  • Grid Domains: Sokoban, Maze with teleports, and the Sliding Puzzle (using Convolutional Neural Networks with CoAT blocks).
  • PDDL Domains: Blocksworld, Ferry, Spanner, N-Puzzle, and Elevators (using Hypergraph Networks, specifically Strips-HGN).

Key Findings

  • Statistical Simplicity: The paper argues that ranking is essentially a classification task. Statistical learning theory suggests that classification is generally easier to learn and converges faster than regression, requiring less data to achieve high performance.
  • Superior Success Rates: The performance gap was most notable in the Elevators domain. Using A, the ranking-based heuristic ($L^*$) achieved a 91% success rate, vastly outperforming the standard regression-based heuristic ($L_2$), which only solved 36%* of the test cases.
  • Search Efficiency: In complex domains like Sokoban, ranking-based heuristics significantly reduced the number of expanded states. By learning to "push down" the priority of states off the optimal path, the model creates a steeper gradient that guides the search more directly to the goal.
  • Handling Dead-Ends: Regression models often struggle with dead-ends, as assigning them a value (like infinity) can destabilize training. Ranking losses handle this naturally by simply requiring that dead-ends be ranked lower than any state on a valid path.

Conclusion and Future Directions

By prioritizing the relative order of states over absolute cost estimation, the authors demonstrate a more robust and efficient way to train planning heuristics. While ranking-based models currently lack absolute "goal-awareness"—which can be useful for certain pruning techniques—their ability to guide search algorithms with precision marks a significant advancement.

Future work may involve integrating these ranking losses into bootstrap learning protocols, where agents learn from their own successful searches rather than relying solely on pre-solved optimal plans. This could further bridge the gap between imitation learning and autonomous discovery in complex planning environments.

Summary updated

BibTeX
@inproceedings{chrestien2023optimize,
  author = {Leah Chrestien and Tomás Pevný and Stefan Edelkamp and Antonín Komenda},
  title = {{Optimize Planning Heuristics to Rank, not to Estimate Cost-to-Goal}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=Mgy6sgslPY},
}
Figure