Planning in Dynamic Environments with Conditional Autoregressive Models.

Johanna Hansen, Kyle Kastner, Aaron C. Courville, Gregory DudekarXiv 2018

TL;DR

This paper introduces a method for model-based planning in dynamic environments by combining Vector Quantized Variational Autoencoders (VQ-VAEs) and PixelCNNs to build an accurate world model. By performing Monte-Carlo Tree Search (MCTS) over a highly compressed discrete latent space rather than raw pixel space, the agent can successfully navigate environments with moving goals and obstacles, nearly matching the performance of an omniscient oracle.

What Problem Does This Paper Address?

For model-based reinforcement learning and planning agents, success hinges on having an accurate "world model" to predict future states. While autoregressive generative models (like PixelCNN) are excellent at capturing complex distributions in video and audio, they are notoriously slow because they generate data sequentially (e.g., pixel by pixel). This computational bottleneck has traditionally made them impractical for online, decision-time planning methods like MCTS, which require rolling out thousands of potential future scenarios.

The authors tackle this challenge: How can we leverage the high-fidelity predictive power of autoregressive models for real-time forward planning in dynamic environments?

Methods

The authors propose a two-phase framework that shifts the planning burden from high-dimensional pixel space to a compact latent space:

  1. Discrete Latent Compression (VQ-VAE): First, a VQ-VAE compresses individual $48 \times 48 \times 1$ environment frames into a discrete $6 \times 6 \times 1$ latent space ($Z$). Unlike standard VAEs that use continuous distributions, VQ-VAEs map inputs to discrete codebook vectors, preserving sharp semantic boundaries.
  2. Autoregressive Dynamics (PixelCNN): A conditional gated PixelCNN is trained to predict the next latent state ($Z_t$) given the current state and a spatial conditioning map of the four preceding frames ($Z_{t-1}$ to $Z_{t-4}$).
  3. MCTS Planning: At decision time, the agent uses PUCT MCTS to plan its path.

Crucially, the authors exploit an environmental property: action-independence of background dynamics. Because the obstacles and goals move independently of the agent's choices, future frame predictions can be generated once and shared across all MCTS rollout paths at a given timestep, drastically cutting down the computational cost.

Figure 1. This figure illustrates forward rollout steps by the oracle (left column), our 5 sample model (middle column), and the error in the model (right column). The number of steps from the given state t is indicated in the oracle plot’s title. In the first two columns, free space is violet, moving obstacles are cyan, and the goal is yellow. In the third column, we illustrate obstacle error in the model as follows: false negatives (predicted free space where there should be an obstacle) are red and false positives (predicted obstacle where there was free space) are blue. The true goal is plotted in yellow and the predicted goal is plotted in orange (perfect goal prediction is orange).

Datasets

The paper introduces a new 2D Dynamic Navigation Benchmark to evaluate the model:

  • Environment: A $48 \times 48$ grid where a $1 \times 1$ agent must reach a $2 \times 2$ moving goal.
  • Dynamics: The goal moves at a constant speed and reflects off walls. Obstacles of varying lengths and speeds spawn in horizontal lanes according to a Poisson distribution.
  • Data Volume: The VQ-VAE was trained on 837,270 frames generated from the environment. The PixelCNN was trained on 3,000 unseen episodes (each 407 frames long).

Key Insights and Ideas

  • The Latent Speedup: Compressing the frame to a $6 \times 6$ grid yields a $\approx 21.3\times$ compression rate in bits. Operating the PixelCNN on this concise space is what makes autoregressive planning computationally feasible.
  • Conservative Hallucination: To mitigate prediction errors, the authors sampled the PixelCNN multiple times (5 or 10) and took the pixel-wise maximum for obstacle probabilities. This created a conservative estimate, biasing the agent to give moving obstacles a wide berth.
  • Goal-Oriented Priors: Incorporating a simple heuristic prior into MCTS that favors actions pointing toward the predicted median goal location significantly shortened the required rollout lengths.

Key Results

The authors evaluated agents at two speeds: $1\times$ (same speed as the goal) and $2\times$ (twice as fast as the goal), comparing their learned model against an "Oracle" that had perfect knowledge of the future.

Table 1. Performance Comparison over 100 Episodes
  • Near-Oracle Success: The $2\times$ agent using 5 samples and a 3-step MCTS rollout achieved a 94% success rate in reaching the goal, coming remarkably close to the Oracle's 100% success rate.
  • Execution Speed: Each future timestep prediction took roughly 0.4 seconds on a TitanX-Pascal GPU. A full action decision for the best-performing agent configuration took approximately 1.7 seconds.

Limitations and Future Work

  • Compounding Errors: As rollout horizons extend (e.g., up to 10 steps), errors accumulate. False negatives (failing to predict an obstacle, shown in red in Figure 1) lead to catastrophic, fatal collisions.
  • Horizon Blindness: The model can only predict the trajectories of obstacles currently visible in the scene; it cannot anticipate new obstacles spawning just outside the field of view.
  • Wall-Clock Latency: While 1.7 seconds per decision is fast enough for some applications, it remains too slow for high-frequency real-time control. The authors point to newer sub-linear autoregressive generation techniques (like Parallel WaveNet) as a vital next step to accelerate inference.

Summary updated

BibTeX
@misc{hansen2018planning,
  author = {Johanna Hansen and Kyle Kastner and Aaron C. Courville and Gregory Dudek},
  title = {{Planning in Dynamic Environments with Conditional Autoregressive Models.}},
  year = {2018},
  eprint = {1811.10097},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.10097},
}
Figure