Learning to Plan via a Multi-step Policy Regression Method

Stefan Wagner, Michael Janschek, Tobias Uelwer, Stefan Harmeling

Introduction

In standard model-free reinforcement learning (RL), agents typically operate in a "reactionary" mode. At every time step, the agent observes the environment, performs a computationally expensive forward pass through a deep neural network, and executes a single action. This cycle repeats continuously, creating a significant bottleneck for real-time applications or deployment on resource-constrained hardware. While model-based RL attempts to mitigate this through planning and simulating future trajectories, it often introduces even greater computational complexity.

Researchers have proposed Policy Horizon Regression (PHR) as a solution to this efficiency problem. PHR enables agents to predict a sequence of $n$ future actions from a single observation. By using policy distillation to "compress" multiple decision steps into a single model evaluation, the method achieves significant speedups in inference time while maintaining or improving performance in complex environments.

The Policy Horizon Regression (PHR) Framework

The core innovation of PHR is the shift from predicting a single action to predicting a policy vector $\vec{\pi}^\theta = [\pi_1^\theta, \dots, \pi_n^\theta]^T$. This allows the agent to "look ahead" several steps without the overhead of a full environment model or tree search.

Architecture of the PHR model showing the convolutional layers and the multi-step policy vector output.

As shown in the architecture above, the model utilizes standard convolutional layers to learn spatial representations. The primary modification is in the final fully connected layer, which is expanded to output the $n$-dimensional policy vector. This design ensures minimal architectural overhead, recycling existing feature extractors to support multi-step planning.

Training Methodology

Training a PHR agent occurs in two distinct stages to ensure the student model accurately captures the temporal dependencies of the environment:

  1. Teacher Training (Stage 1): A base agent is trained using standard Advantage Actor-Critic (A2C) to solve the environment. This agent serves as the "teacher," providing a high-quality single-step policy.
  2. Policy Distillation (Stage 2): Successful trajectories are sampled from the teacher. A "student" model is then trained to look at a single state $s_t$ and predict not just the teacher's current action, but the next $n-1$ actions the teacher would have taken in subsequent states.
The two-stage training process: Stage 1 trains the teacher via A2C, and Stage 2 performs policy regression to train the student.

During the second stage, a "semi-gradient" update is employed: the parameters for the first action ($\pi_1$) are held fixed while the rest of the vector is regressed. This prevents the agent from forgetting how to act in the immediate present while it learns to predict the future. The choice of regression loss is critical; Cross-Entropy is preferred for discrete grid worlds, while Mean Squared Error (MSE) or KL-Divergence is more effective for continuous or fast-paced environments like Atari Pong.

Experimental Results

The method was evaluated on Gym-MiniGrid (MultiRoom and Crossing) and Atari Pong. These environments test both long-term path planning and high-speed reactive timing.

  • Inference Speedup: PHR agents with horizons of $n \in \{4, 8, 16\}$ achieved at least a 2x speedup in wall-clock time compared to the $n=1$ baseline. The speedup scales logarithmically, with the most significant gains occurring when moving from a horizon of 1 to 4.
  • Increased Productivity: By evaluating the model less frequently while still completing tasks successfully, agents showed a marked increase in "score per second." In the "Crossing" environment, the PHR agent was nearly twice as productive as the baseline.

Limitations and Future Work

The primary challenge for PHR is environmental stochasticity. Because the agent commits to $n$ steps based on a single observation, it is effectively "blind" during steps 2 through $n$. If the environment changes unexpectedly, the agent cannot react until the next model evaluation. Consequently, PHR is best suited for "sequenceable" tasks where the immediate future is relatively predictable. Future research may explore adaptive horizons, allowing agents to dynamically adjust their planning depth based on environmental volatility.

Summary updated

BibTeX
@inproceedings{wagner2021learning,
  author = {Stefan Wagner and Michael Janschek and Tobias Uelwer and Stefan Harmeling},
  title = {{Learning to Plan via a Multi-step Policy Regression Method}},
  booktitle = {ICANN},
  year = {2021},
  doi = {10.1007/978-3-030-86380-7\_39},
}
Figure