Skip to main content
QUICK REVIEW

[Paper Review] Hyperparameters in Reinforcement Learning and How To Tune Them

Theresa Eimer, Marius Lindauer|arXiv (Cornell University)|Jun 2, 2023
Machine Learning and Data ClassificationComputer Science9 citations
TL;DR

The paper argues that RL hyperparameters strongly influence performance and reproducibility, and shows that automated hyperparameter optimization (HPO) often beats hand-tuning with lower compute; it provides best-practice guidelines and open-source tuning tools for RL.

ABSTRACT

In order to improve reproducibility, deep reinforcement learning (RL) has been adopting better scientific practices such as standardized evaluation metrics and reporting. However, the process of hyperparameter optimization still varies widely across papers, which makes it challenging to compare RL algorithms fairly. In this paper, we show that hyperparameter choices in RL can significantly affect the agent's final performance and sample efficiency, and that the hyperparameter landscape can strongly depend on the tuning seed which may lead to overfitting. We therefore propose adopting established best practices from AutoML, such as the separation of tuning and testing seeds, as well as principled hyperparameter optimization (HPO) across a broad search space. We support this by comparing multiple state-of-the-art HPO tools on a range of RL algorithms and environments to their hand-tuned counterparts, demonstrating that HPO approaches often have higher performance and lower compute overhead. As a result of our findings, we recommend a set of best practices for the RL community, which should result in stronger empirical results with fewer computational costs, better reproducibility, and thus faster progress. In order to encourage the adoption of these practices, we provide plug-and-play implementations of the tuning algorithms used in this paper at https://github.com/facebookresearch/how-to-autorl.

Motivation & Objective

  • Demonstrate the impact of RL hyperparameters on final performance and sample efficiency across diverse environments.
  • Evaluate multiple HPO methods against hand-tuned baselines on state-of-the-art RL algorithms.
  • Provide open-source, plug-and-play tuning tools and practical best-practice recommendations for the RL community.
  • Highlight the importance of separating tuning and test seeds to avoid overfitting and improve reproducibility.

Proposed method

  • Formally define hyperparameter optimization in RL as Algorithm Configuration (AC) and Dynamic Algorithm Configuration (DAC).
  • Empirically study hyperparameter landscapes for PPO, DQN, and SAC across diverse Gym-like and Brax/Procgen environments using multiple seeds.
  • Compare RS (random search), multi-fidelity methods (DEHB), and population-based tuning (PB2, BGT) against hand-tuned baselines.
  • Assess the effect of tuning seed vs. test seed on reproducibility and performance estimates.
  • Provide open-source, Hydra-based tuning implementations compatible with any RL algorithm or environment.
Figure 1: Comparison of Hyperparameter Tuning Approaches: state-of-the-art hyperparameter optimization packages match or outperform hand tuning via grid search, while using less than 1/12 of the budget.
Figure 1: Comparison of Hyperparameter Tuning Approaches: state-of-the-art hyperparameter optimization packages match or outperform hand tuning via grid search, while using less than 1/12 of the budget.

Experimental results

Research questions

  • RQ1How much do RL hyperparameters affect final performance and stability across various environments and algorithms?
  • RQ2Are conventional hand-tuning practices suboptimal compared to automatic hyperparameter optimization in RL?
  • RQ3How do different HPO paradigms (RS, multi-fidelity, PBT) perform in RL settings with limited budgets?
  • RQ4What best practices (seed separation, reporting, integration into pipelines) improve reproducibility and comparability in RL experiments?

Key findings

  • Hyperparameters have a large influence on performance across environments and algorithms; even rarely-tuned parameters can be decisive.
  • The hyperparameter landscape in RL is typically smooth, enabling effective optimization with simple methods under modest budgets.
  • Random search can match or outperform more complex setups on some tasks, but multi-fidelity and PBT methods generally improve stability and final performance across budgets.
  • Separating tuning and testing seeds is crucial to avoid overfitting and to obtain reliable estimates of generalization performance.
  • Automated HPO approaches often require less compute than exhaustive hand-tuning or grid searches, and provide more robust, comparable baselines.
Figure 5: Tuning Results for PPO on Brax. Shown is the mean evaluation reward across $10$ episodes for $3$ tuning runs as well as the $98\%$ confidence interval across tuning runs.
Figure 5: Tuning Results for PPO on Brax. Shown is the mean evaluation reward across $10$ episodes for $3$ tuning runs as well as the $98\%$ confidence interval across tuning runs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.