Model-Based Reinforcement Learning with Multi-Step Plan Value Estimation

Haoxin Lin, Yihao Sun, Jiaji Zhang, Yang Yu

Abstract

A promising way to improve the sample efficiency of reinforcement learning is model-based methods, in which many explorations and evaluations can happen in the learned models to save real-world samples. However, when the learned model has a non-negligible model error, sequential steps in the model are hard to be accurately evaluated, limiting the model’s utilization. This paper proposes to alleviate this issue by introducing multi-step plans into policy optimization for model-based RL. We employ the multi-step plan value estimation, which evaluates the expected discounted return after executing a sequence of action plans at a given state, and updates the policy by directly computing the multi-step policy gradient via plan value estimation. The new model-based reinforcement learning algorithm MPPVE (Model-based Planning Policy Learning with Multi-step Plan Value Estimation) shows a better utilization of the learned model and achieves a better sample efficiency than state-of-the-art model-based RL approaches.

Introduction

In Model-Based Reinforcement Learning (MBRL), agents learn a dynamics model to simulate the environment, allowing them to "imagine" future scenarios and learn without exhaustive real-world interaction. However, these models suffer from compounding error: small inaccuracies in predicting the next state accumulate over time. By the time an agent projects several steps into the future, the predicted states often become unrealistic. Standard methods that update policies based on these "hallucinated" states receive biased gradients, which can degrade performance rather than improve it.

Methodology: Shifting from States to Plans

To address the compounding error problem, the authors introduce MPPVE (Model-based Planning Policy Learning with Multi-step Plan Value Estimation). The core innovation is a shift in focus from evaluating states to evaluating action sequences, or "plans."

  1. Multi-step Plan Value Estimation: Unlike a standard Q-function $Q(s, a)$ that evaluates a single state-action pair, MPPVE trains a critic to evaluate a state and a sequence of $k$ actions: $Q(s, a_t, a_{t+1}, ..., a_{t+k-1})$. This is defined as the "Plan Value."
  2. Direct Gradient Updates: Traditional MBRL methods (like MBPO) perform rollouts to generate synthetic states and update the policy on those states. In contrast, MPPVE computes the policy gradient by differentiating through the plan value function starting exclusively from real states sampled from the environment buffer.
  3. Architecture: The system utilizes an ensemble of neural networks to model dynamics and capture uncertainty, alongside a deep Q-network to estimate the multi-step plan values.
Overview of MPPVE architecture showing data generation and the multi-step plan value estimation process compared to standard methods.

Experimental Setup

The algorithm was evaluated on the MuJoCo benchmark suite, the industry standard for continuous control tasks. The suite includes tasks of varying complexity:

  • InvertedPendulum and Swimmer (Low complexity)
  • Hopper and Walker2d (Medium complexity)
  • HalfCheetah and Ant (High complexity)

Key Insights and Analysis

Gradient Accuracy

A critical finding of this research is the reliability of the policy gradient. In standard MBRL, as the state rollout error increases, the cosine similarity between the estimated gradient and the true environment gradient drops sharply. MPPVE maintains a more reliable gradient direction by anchoring its evaluations to real states, even when the underlying dynamics model contains errors.

The relationship between state rollout error and policy gradient similarity in standard MBRL methods, highlighting the bias introduced by compounding errors.

The k-step Trade-off

There is a "Goldilocks zone" for the plan length $k$. Short plans ($k=1$) fail to leverage the benefits of look-ahead planning, while excessively long plans (e.g., $k=10$) create a high-dimensional input space for the Q-function that is difficult to learn accurately, leading to training fluctuations.

Results

MPPVE demonstrates superior sample efficiency compared to state-of-the-art baselines like MBPO and BMPO:

  • Learning Speed: On the "Hopper" task, MPPVE achieved target performance 1.5x faster than BMPO and 2x faster than MBPO.
  • Efficiency: The method consistently reaches high performance levels with significantly fewer environment steps than model-free alternatives like SAC, while maintaining the same high asymptotic performance.

Limitations and Future Work

While effective, MPPVE faces challenges in scalability. As the plan length $k$ or the action space dimensionality increases, the input space for the plan-value function grows significantly, requiring more complex architectures. Additionally, the computational cost per training iteration is higher due to the multi-step gradient calculations. Future research will focus on stabilizing value estimation for longer horizons and optimizing the computational overhead.

Summary updated

BibTeX
@inproceedings{lin2023model,
  author = {Haoxin Lin and Yihao Sun and Jiaji Zhang and Yang Yu},
  title = {{Model-Based Reinforcement Learning with Multi-Step Plan Value Estimation}},
  booktitle = {ECAI},
  year = {2023},
  url = {https://openreview.net/forum?id=4BYCeA_GZs},
}
Figure