Path Planning using Neural A* Search

Ryo Yonetani, Tatsunori Taniai, Mohammadamin Barekatain, Mai Nishimura, Asako Kanezaki

Path planning—the art of finding the optimal route from point A to point B—is a cornerstone of robotics, autonomous driving, and game AI. For decades, the A search algorithm has been the gold standard due to its completeness and optimality. However, A is a discrete, hard-coded algorithm. It does not learn from experience and struggles with raw sensory data, such as camera images, unless a human manually labels every obstacle.

In their ICML 2021 paper, Yonetani et al. bridge this gap with Neural A, a novel data-driven planner that reformulates the classic A algorithm into a fully differentiable module. By coupling a convolutional encoder with this "search-in-the-loop" layer, the model learns to produce guidance maps from raw inputs that minimize search effort while maintaining path optimality and guaranteed success.

The Representation Gap

Traditional path planning faces a "representation gap." Classical algorithms like A* require a clean, symbolic map (e.g., where 0 is empty space and 1 is a wall). In the real world, agents often rely on raw images. Converting these images to symbolic maps is difficult and prone to losing nuanced information.

Conversely, pure deep learning approaches, such as imitation learning, can predict paths directly from images but often lack planning guarantees. They might lead a robot into a dead end or fail to find a clearly existing path. The primary challenge is maintaining the mathematical guarantees of A while gaining the learning flexibility of neural networks. Because A involves discrete, non-differentiable operations (like selecting the best node from a list), gradients cannot naturally pass through it during standard backpropagation.

Methodology: Differentiable Search-in-the-Loop

To overcome this, the authors propose a "white-box" approach to data-driven planning consisting of two main components:

  1. The Encoder: A fully convolutional network (specifically a U-Net) processes the environmental map or raw image alongside the start and goal locations. It outputs a guidance map. Rather than a simple obstacle list, this map acts as a learned cost surface, indicating which areas are "expensive" to explore.
  2. The Differentiable A* Module: The authors reformulated the discrete steps of A*—node selection, expansion, and cost updates—using matrix operations. To handle the non-differentiable argmax function used to pick the next node, they employed a discretized activation technique. This allows the model to act discretely during the forward pass (performing an actual search) while behaving like an identity function during the backward pass to enable gradient flow.

By training the system to match expert ground-truth paths, the encoder learns to "hallucinate" high costs in dead ends and low costs along optimal routes, effectively teaching the A* module where to focus its search.

Datasets and Evaluation

The researchers evaluated Neural A* across four diverse datasets:

  • Motion Planning (MP) Dataset: 800 synthetic grid-world maps with various obstacle shapes.
  • Tiled MP Dataset: Larger, more intricate mazes created by tiling MP maps together.
  • City/Street Map (CSM) Dataset: Real-world city layouts from 30 different cities, providing realistic urban navigation challenges.
  • Stanford Drone Dataset (SDD): Real-world overhead surveillance footage used to test the model's ability to predict human trajectories directly from raw pixels without explicit obstacle labels.

Key Findings

Neural A* outperformed state-of-the-art baselines in the trade-off between path optimality and search efficiency. It demonstrated a strong ability to generalize to new, unseen map layouts, proving it learned the logic of navigation rather than just memorizing paths.

  • Efficiency vs. Optimality: Standard A explores many nodes (the green search frontier) to guarantee the shortest path. Neural A learns to aggressively prune this frontier. It discovers visual cues—like the entrance to a U-shaped dead end—and assigns them high costs so the search algorithm avoids them entirely.
  • Raw Image Success: On the Stanford Drone Dataset, Neural A* successfully predicted realistic human trajectories. It learned to identify passable regions (sidewalks, grass) and impassable regions (buildings, water) purely from visual textures.
  • Differentiable vs. Black-Box: Compared to "black-box" solvers, the "white-box" differentiable A* provides much richer gradient information by exposing the internal steps of the search during training, leading to significantly better performance.
Comparison of standard A* and Neural A* on grid maps and raw images.

Limitations and Future Directions

While impressive, Neural A* has some constraints. The current implementation is designed for 2D grid worlds with 8-neighbor connectivity; extending this to high-dimensional continuous spaces (like a 7-DOF robot arm) remains a challenge. Additionally, the model currently assumes unit movement costs. Future work could involve learning to navigate terrains with varying traversal costs. Finally, performing many search iterations in a differentiable way is memory-intensive, requiring gradient detachment techniques to make training feasible on standard hardware.

Overall, Neural A* represents a significant step toward "neuro-symbolic" AI, successfully merging the raw perception capabilities of deep learning with the rigorous logic and guarantees of classical planning algorithms.

Summary updated

BibTeX
@inproceedings{yonetani2021path,
  author = {Ryo Yonetani and Tatsunori Taniai and Mohammadamin Barekatain and Mai Nishimura and Asako Kanezaki},
  title = {{Path Planning using Neural A* Search}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
}
Figure