Skip to main content
QUICK REVIEW

[Paper Review] Beyond A*: Better Planning with Transformers via Search Dynamics Bootstrapping

Lucas Lehnert, Sainbayar Sukhbaatar|arXiv (Cornell University)|Feb 21, 2024
Artificial Intelligence in GamesComputer Science6 citations
TL;DR

The paper trains Transformer models to imitate and then improve A* search by logging A* execution traces as training data, producing Searchformer which solves planning tasks with fewer search steps and high optimality, outperforming traditional A* in maze and Sokoban domains.

ABSTRACT

While Transformers have enabled tremendous progress in various application settings, such architectures still trail behind traditional symbolic planners for solving complex decision making tasks. In this work, we demonstrate how to train Transformers to solve complex planning tasks. This is accomplished by training an encoder-decoder Transformer model to predict the search dynamics of the $A^*$ search algorithm. We fine tune this model to obtain a Searchformer, a Transformer model that optimally solves previously unseen Sokoban puzzles 93.7% of the time, while using up to 26.8% fewer search steps than the $A^*$ implementation that was used for training initially. In our training method, $A^*$'s search dynamics are expressed as a token sequence outlining when task states are added and removed into the search tree during symbolic planning. Searchformer significantly outperforms baselines that predict the optimal plan directly with a 5-10$ imes$ smaller model size and a 10$ imes$ smaller training dataset. Lastly, we demonstrate how Searchformer scales to larger and more complex decision making tasks with improved percentage of solved tasks and shortened search dynamics.

Motivation & Objective

  • Motivate the need for improved planning beyond traditional symbolic search.
  • Propose a method to teach Transformers to imitate and then outperform A* by leveraging search dynamics.
  • Show that a data-efficient training regime with search-augmented sequences yields robust planning for unseen tasks.

Proposed method

  • Introduce search dynamics bootstrapping: first train a Transformer to imitate A* execution traces, then fine-tune to find optimal plans with fewer search steps.
  • Encode A* search dynamics as token sequences (prompt, trace, plan) and train an encoder-decoder Transformer (RoPE-enhanced) to predict these sequences.
  • Generate synthetic datasets by running A* on randomly created tasks in maze navigation and Sokoban, with deterministic and non-deterministic A* variants.
  • Create two training variants: search-augmented sequences (<prompt><trace><plan>) and solution-only sequences (<prompt><plan>).
  • Apply expert-iteration-like fine-tuning (bootstrapping) to progressively shorten the search dynamics while preserving optimal plans, yielding a model that searches less than A*.
  • Evaluate using exact-match, any-optimal-64, and SWC metrics, and measure average search-dynamics length and ILR (Improved Length Ratio) against A*.

Experimental results

Research questions

  • RQ1Can Transformer models imitate the search dynamics of an A* planner from synthetic traces?
  • RQ2Does training with search dynamics lead to better planning with fewer search steps than traditional A* in maze and Sokoban tasks?
  • RQ3Can iterative bootstrapping (Searchformer) further reduce the length of search traces while preserving optimality?
  • RQ4How does model size, data regime (low vs high data), and task difficulty affect performance for solution-only versus search-augmented training?

Key findings

  • Searchformer solves 93.7% of Sokoban test tasks, with 26.8% shorter search dynamics than A* on average.
  • Search-augmented models outperform solution-only models in low-data regimes and scale better to harder tasks.
  • Smaller parameterized search-augmented models often beat much larger solution-only models, especially with limited training data.
  • Bootstrapping the search dynamics reduces the average length of traces over three improvement steps, converging to shorter sequences while maintaining optimal plans.
  • Including A* execution traces enables data-efficient learning and improves planning performance compared to predicting only the final plan.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.