Imitating Graph-Based Planning with Goal-Conditioned Policies

Junsu Kim, Younggyo Seo, Sungsoo Ahn, Kyunghwan Son, Jinwoo Shin

TL;DR

PIG (Planning-guided self-Imitation) is a new framework that dramatically improves the sample efficiency of goal-conditioned reinforcement learning (RL). By forcing an agent to imitate its own planned subgoals during training and stochastically "skipping" waypoints during execution, PIG allows agents to solve complex, long-horizon tasks—like navigating intricate mazes—much faster than previous state-of-the-art methods.

What Problem Does This Paper Address?

Goal-conditioned reinforcement learning (GCRL) aims to train a single policy capable of reaching any arbitrary goal state. While powerful, GCRL struggles with long-horizon tasks where the target is far away and rewards are sparse.

To solve this, researchers often use graph-based planning. They build a "map" of visited states and use shortest-path algorithms to provide the agent with a sequence of easier-to-reach subgoals. However, most existing methods only use the planner as a "crutch" during execution. The underlying policy doesn't actually "learn" the wisdom of the planner; it just follows the immediate next waypoint. This leads to poor sample efficiency and a policy that remains dependent on expensive graph searches at test time.

Comparison of previous waypoint-following methods versus the PIG approach.

Methods

The authors introduce two key components under the PIG framework to bridge the gap between the planner and the policy:

The PIG framework: (a) Self-imitation during training and (b) Subgoal skipping during execution.
  1. Training with Self-Imitation: This is the core "distillation" step. Based on the optimal substructure property (the idea that any segment of an optimal path is itself an optimal path), the authors argue that a policy conditioned on a distant goal should behave similarly to a policy conditioned on an intermediate subgoal. PIG introduces a new loss term ($\mathcal{L}_{PIG}$) that encourages the agent to imitate the actions it would take to reach the subgoals proposed by the planner. Essentially, the "easier" nearby subgoals act as teachers for the "harder" distant goals.
  2. Execution with Subgoal Skipping: Standard planners always give the agent the very next node in the graph. PIG introduces a stochastic "skipping" mechanism. If the policy is confident (measured by a low $\mathcal{L}_{PIG}$ loss), the agent stochastically jumps further ahead in the planned path. This encourages the agent to find "shortcuts" and reduces the overhead of strictly following every single waypoint.

Key Insights and Ideas

  • The Planner as a Teacher: Instead of just using a graph to tell the agent where to go now, PIG uses the graph to tell the agent how it should behave in the future. By distilling the planner's path into the policy's weights, the agent "internalizes" the map.
  • Consistency is Key: The intuition that $\pi(s, \text{far\_goal})$ should look like $\pi(s, \text{near\_subgoal})$ is a powerful inductive bias. It effectively smooths the learning signal across the entire trajectory.
  • Independence from the Planner: A surprising "aha" moment in the paper is that after training with PIG, the agent becomes so good that it can often reach distant goals without using the planner at all during test time. This is a huge win for real-time applications where graph search might be too slow or memory-intensive.

Datasets and Key Results

The researchers evaluated PIG using the MuJoCo simulator across continuous control benchmarks, ranging from simple tasks (2DReach, Reacher, Pusher) to complex long-horizon tasks (AntMaze environments with L-shape, U-shape, S-shape, $\omega$-shape, and $\Pi$-shape geometries).

PIG significantly outperformed existing baselines like MSS, HIGL, and $L^3P$:

  • Massive Success Rate Boost: In the "Large U-shaped AntMaze," the baseline MSS achieved only a 19.08% success rate. Adding PIG boosted this to 57.41%.
  • Sample Efficiency: PIG reached high success rates much earlier in the training process compared to other methods.
  • Robustness: The method proved effective even in stochastic environments (where random noise is added to the agent's movement), showing that the graph-based imitation is resilient to uncertainty.
  • Ablation Success: The authors showed that both self-imitation and subgoal skipping are necessary; removing either component led to a noticeable drop in performance.

Limitations and Future Work

  • State-Based Inputs: The current work focuses on "proprioceptive" state inputs (e.g., joint angles, coordinates). It has not yet been tested on high-dimensional visual inputs (pixels), which would require combining PIG with representation learning.
  • Hyperparameter Sensitivity: While the authors provide a task-agnostic way to set the balancing coefficient ($\lambda$), the performance still relies on these hyperparameters.
  • Future Directions: The authors suggest that combining PIG with more advanced subgoal representation learning could further enhance its ability to handle even more complex, unstructured environments.

Summary updated

BibTeX
@inproceedings{kim2023imitating,
  author = {Junsu Kim and Younggyo Seo and Sungsoo Ahn and Kyunghwan Son and Jinwoo Shin},
  title = {{Imitating Graph-Based Planning with Goal-Conditioned Policies}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=6lUEy1J5R7p},
}
Figure