Adaptive Rollout Length for Model-Based RL Using Model-Free Deep RL

Abhinav Bhatia, Philip S. Thomas, Shlomo ZilbersteinarXiv 2022 · DOI

Abstract

Model-based reinforcement learning (MBRL) offers high sample efficiency but is often limited by compounding errors in long rollouts. This paper introduces a meta-learning framework where a model-free DQN agent dynamically adjusts the rollout length of an MBRL agent. By monitoring model accuracy and training progress, the meta-reasoner learns adaptive schedules that outperform fixed and heuristic baselines on classic control tasks.

Introduction

Reinforcement learning (RL) agents generally fall into two categories: model-free and model-based. Model-based methods are prized for their sample efficiency, which is vital for real-world applications like robotics. However, they suffer from the "compounding error" problem: small inaccuracies in a learned world model accumulate over a sequence of predicted states (a rollout), leading the agent to learn from "hallucinated" physics.

This creates a fundamental trade-off. Short rollouts are accurate but provide limited data for learning. Long rollouts provide abundant data but risk corrupting the policy with model errors. While researchers typically use fixed rollout lengths or simple linear schedules, this work proposes that rollout length should be a dynamic decision based on the current state of the model and the learning process.

Methodology

The authors frame hyperparameter tuning as a meta-level sequential decision-making problem. The training process of a base MBRL agent serves as the environment for a "meta-level" agent.

The Base Agent and Meta-Reasoner

The base agent utilizes a Dyna-DQN architecture, alternating between real-world interaction and training on imagined transitions. The meta-reasoner is a model-free DQN agent that controls the rollout length ($K$).

Algorithm 1: The Dyna-style MBRL loop integrated with a meta-reasoning step to adjust rollout length K.

The meta-agent's state space includes the remaining interaction budget, current rollout length, policy quality, and model error (the discrepancy between predicted and actual transitions). Its action space allows it to increase ($K \leftarrow 1.5K$), decrease ($K \leftarrow K/2$), or maintain the current rollout length. The reward for the meta-agent is tied directly to the performance improvement of the base agent.

Evaluation and Results

The approach was tested on MountainCar and Acrobot benchmarks from the ReinforcementLearning.jl library. To ensure robustness, the meta-reasoner was evaluated on perturbed environments with modified physical parameters (e.g., gravity, mass), simulating a "sim-to-real" gap.

The meta-reasoning approach (META) was compared against model-free DQN ($K=0$), fixed rollout lengths ($K=16, 32$), and various linear schedules (Increasing, Decreasing, and Increasing-then-Decreasing).

Performance (J) and learned rollout schedules for MountainCar (top) and Acrobot (bottom). The META approach (blue line) consistently achieves higher performance by adapting the rollout length dynamically.

Key Findings

  • MountainCar: The META approach achieved a mean score of -160.0, outperforming the best heuristic (INC-DEC at -165.8). It learned a "hump-shaped" schedule, increasing rollouts mid-training and tapering off as real data became sufficient.
  • Acrobot: META achieved -130.7, surpassing the best baseline (-140.5). In this environment, where model-free baselines are strong, the meta-reasoner learned to reduce the rollout length to zero over time to avoid model-induced errors.
  • Trust and Adaptability: The meta-reasoner effectively learns when to "trust" the model. It prioritizes model-based learning when accuracy is high and reverts to model-free learning when the model becomes a liability.

Discussion and Future Work

This work demonstrates that treating hyperparameter selection as a metareasoning task can significantly improve RL stability and performance. However, several challenges remain. The current study focused on low-dimensional tasks; scaling to high-dimensional pixel inputs or complex manipulation remains an open question. Additionally, the computational cost of meta-training—requiring thousands of base agent runs—is significant, though potentially offset by the gains in final performance and robustness. Future research could explore continuous action spaces for $K$ and cross-task generalization.

Summary updated

BibTeX
@misc{bhatia2022adaptive,
  author = {Abhinav Bhatia and Philip S. Thomas and Shlomo Zilberstein},
  title = {{Adaptive Rollout Length for Model-Based RL Using Model-Free Deep RL}},
  year = {2022},
  eprint = {2206.02380},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.02380},
}
Figure