On the Importance of Hyperparameter Optimization for Model-based Reinforcement Learning

Baohe Zhang, Raghu Rajan, Luis Pineda, Nathan O. Lambert, André Biedenkapp, Kurtland Chua, Frank Hutter, Roberto Calandra

Introduction

Model-based Reinforcement Learning (MBRL) offers the promise of sample efficiency by learning a dynamics model of the environment. However, these systems are notoriously difficult to tune, often described as a "black art" requiring significant expert intervention. This difficulty stems from the interaction between two complex components: a dynamics model and a planner. This paper investigates whether automated Hyperparameter Optimization (HPO) can replace manual tuning and whether dynamic tuning—adjusting parameters during the learning process—is superior to static approaches.

Methodology

The study utilizes Probabilistic Ensembles with Trajectory Sampling (PETS) as the baseline MBRL algorithm. The researchers evaluate several HPO strategies:

  • Random Search (RS): A standard baseline for hyperparameter exploration.
  • Hyperband (HB): A multi-fidelity method that allocates more resources to promising configurations.
  • Population Based Training (PBT): An evolutionary method where a population of agents learns in parallel, with high-performers' parameters and weights being "exploited" by low-performers.
  • PBT-BT (Backtracking): A novel extension of PBT that allows agents to revert to previous high-performing checkpoints if a new hyperparameter perturbation leads to a performance drop.

The hyperparameter space is categorized into two functional groups: Model Training (parameters affecting the dynamics model) and the CEM Optimizer (parameters affecting the trajectory planner).

Experimental Results

The algorithms were tested on continuous control benchmarks, including MuJoCo environments (Pusher, Hopper, HalfCheetah) and the Daisy hexapod simulation.

Learning curves for Hopper and HalfCheetah-v3 comparing HPO methods against human-tuned defaults.

As shown in Figure 1, automated HPO consistently outperforms human-tuned "default" parameters. In the Hopper environment, HPO methods achieved a 1.5x to 2x improvement. The most dramatic result occurred in HalfCheetah-v3, where HPO-tuned agents achieved a 10x performance boost over the baseline. This massive gain was attributed to the discovery of a "rolling gait" that exploited the physics simulator's reward structure, eventually leading to numerical overflows.

Distribution of final scores across multiple runs for different HPO strategies in Hopper and HalfCheetah.

Figure 3 illustrates the distribution of final scores. Dynamic methods like PBT and PBT-BT generally show a higher density of high-performing runs compared to static methods like Hyperband or Random Search, particularly in the more complex HalfCheetah tasks.

Discussion: The Non-Stationarity of MBRL

A key insight from this work is the non-stationary nature of optimal hyperparameters in MBRL. Early in training, the dynamics model is inaccurate, making long planning horizons detrimental due to compounding errors. As the model improves, the agent benefits from looking further ahead. Dynamic HPO methods like PBT naturally adapt to this shift, whereas static methods must settle for a sub-optimal compromise across the entire training duration.

Furthermore, the researchers found that for PBT to be effective in MBRL, it is crucial to transfer the agent's replay buffer (data history) along with its weights during exploitation phases. Failure to do so often results in a significant performance regression for the inheriting agent.

Conclusion

Automated HPO, particularly dynamic population-based methods, significantly enhances the performance and accessibility of MBRL. By outperforming human experts and discovering novel behaviors, these methods mitigate the "black art" of manual tuning. Future work will explore the joint optimization of neural architectures and hyperparameters to further push the boundaries of model-based agents.

Summary updated

BibTeX
@inproceedings{zhang2021importance,
  author = {Baohe Zhang and Raghu Rajan and Luis Pineda and Nathan O. Lambert and André Biedenkapp and Kurtland Chua and Frank Hutter and Roberto Calandra},
  title = {{On the Importance of Hyperparameter Optimization for Model-based Reinforcement Learning}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2021},
}
Figure