Abstract
Action planning using learned and differentiable forward models of the world is a general approach which has a number of desirable properties, including improved sample complexity over model-free RL methods, reuse of learned models across different tasks, and the ability to perform efficient gradient-based optimization in continuous action spaces. However, this approach does not apply straightforwardly when the action space is discrete. In this work, we show that it is in fact possible to effectively perform planning via backprop in discrete action spaces, using a simple paramaterization of the actions vectors on the simplex combined with input noise when training the forward model. Our experiments show that this approach can match or outperform model-free RL and discrete planning methods on gridworld navigation tasks in terms of performance and/or planning time while using limited environment interactions, and can additionally be used to perform model-based control in a challenging new task where the action space combines discrete and continuous actions. We furthermore propose a policy distillation approach which yields a fast policy network which can be used at inference time, removing the need for an iterative planning procedure.
Introduction
In reinforcement learning (RL), agents typically decide on actions through either model-free methods—learning a direct mapping from states to actions—or model-based methods—learning a "world model" to predict future outcomes. Model-based planning is particularly attractive due to its high sample efficiency; it allows an agent to learn from every interaction by refining its internal model of the environment. When this world model is a differentiable neural network, agents can utilize "planning by backpropagation," where the gradient of the total predicted reward is calculated with respect to the action sequence, allowing for efficient optimization in continuous action spaces.
However, this paradigm traditionally fails in discrete action spaces (e.g., choosing between "up," "down," "left," or "right"), as discrete choices are non-differentiable. While methods like Monte Carlo Tree Search (MCTS) exist for discrete planning, they are often computationally expensive and lack the parallelization benefits of gradient-based optimization on GPUs. This work introduces a method to bridge this gap, enabling effective planning by backprop in discrete and hybrid action spaces.
Methodology: Differentiable Discrete Planning
The core challenge lies in making discrete actions amenable to gradient-based optimization. The authors propose two primary modifications to achieve this:
1. Simplex Parameterization and Input Noise
Instead of treating actions as categorical integers, they are represented as continuous vectors on a simplex using a softmax function. The "secret sauce" of this approach is the addition of Gaussian noise to these action vectors during the training of the forward world model. Without noise, a neural network might predict high rewards for "impossible" intermediate action vectors. By training with noise, the model is forced to be accurate across the entire simplex, effectively smoothing the reward landscape and creating "attractors" around valid discrete actions.
2. Gradient-Based Planner (GBP) and Distillation
With a smoothed, differentiable model, the Gradient-Based Planner (GBP) optimizes action sequences to maximize predicted rewards. To address the latency of iterative planning at inference time, the authors introduce DistGBP (Distilled GBP). This approach uses the planner to generate high-quality trajectories, which are then used to train a fast, reactive policy network via policy distillation.
Experimental Results
The researchers evaluated their approach on two distinct domains: Gridworld navigation (8x8 and 16x16) and a new "Spaceship" benchmark requiring hybrid (discrete + continuous) control.
- Sample Efficiency: In the 8x8 Gridworld, GBP reached peak performance in approximately 54,000 steps, whereas the model-free TRPO baseline required millions of steps to achieve comparable results.
- Performance: On 16x16 Gridworlds, the distilled policy (DistGBP) achieved 52.6% accuracy, significantly outperforming TRPO's 33.1%.
- Hybrid Control: In the Spaceship domain, agents had to navigate gravity wells (continuous) while signaling waypoints with colors (discrete). While model-free A2C failed to learn the dependency between these tasks, DistGBP successfully mastered the hybrid space.
- Inference Speed: While the raw GBP planner is relatively slow (0.51s per action), the distilled DistGBP policy operates near-instantaneously (<0.001s), matching the speed of standard model-free networks.
Discussion and Limitations
While providing a powerful framework for discrete planning, the method faces standard model-based challenges. Inaccurate forward models can lead to "model exploitation," where the planner finds sequences that appear optimal to the model but fail in reality. Additionally, scaling to very long-term planning horizons remains difficult due to potential gradient instability over many time steps. Future work may involve refining noise schedules and exploring more complex world model architectures to mitigate these issues.
In conclusion, by combining simplex parameterization with input noise training, this work demonstrates that planning by backpropagation is not only possible but highly effective for discrete and hybrid action spaces, offering a sample-efficient alternative to traditional RL methods.
Summary updated