[Paper Review] Fast Efficient Hyperparameter Tuning for Policy Gradients
This paper proposes Hyperparameter Optimisation on the Fly (HOOF), a sample- and computationally efficient method that dynamically tunes key policy gradient hyperparameters—such as learning rate and GAE parameters—during a single training run using off-policy importance sampling. HOOF outperforms grid search and fixed-hyperparameter baselines, achieving faster learning and superior performance with only one environment interaction run.
The performance of policy gradient methods is sensitive to hyperparameter settings that must be tuned for any new application. Widely used grid search methods for tuning hyperparameters are sample inefficient and computationally expensive. More advanced methods like Population Based Training that learn optimal schedules for hyperparameters instead of fixed settings can yield better results, but are also sample inefficient and computationally expensive. In this paper, we propose Hyperparameter Optimisation on the Fly (HOOF), a gradient-free algorithm that requires no more than one training run to automatically adapt the hyperparameter that affect the policy update directly through the gradient. The main idea is to use existing trajectories sampled by the policy gradient method to optimise a one-step improvement objective, yielding a sample and computationally efficient algorithm that is easy to implement. Our experimental results across multiple domains and algorithms show that using HOOF to learn these hyperparameter schedules leads to faster learning with improved performance.
Motivation & Objective
- To address the high sample and computational cost of existing hyperparameter tuning methods in reinforcement learning.
- To develop a method that learns dynamic hyperparameter schedules rather than fixed values, which are often suboptimal in non-stationary RL settings.
- To achieve effective hyperparameter optimization using only data from a single training run, avoiding the need for multiple environment interactions.
- To ensure stability and reliability of off-policy value estimation despite high variance, particularly when behavior and evaluation policies diverge.
- To demonstrate that a simple KL constraint suffices to stabilize importance sampling estimates in first-order policy gradient methods, eliminating the need for complex second-order methods.
Proposed method
- HOOF uses existing trajectories from a policy gradient method to generate candidate policies with different hyperparameter settings (e.g., learning rate, γ, λ).
- It applies off-policy evaluation via weighted importance sampling (WIS) to estimate the return of each candidate policy using the same data collected by the current policy.
- The method greedily updates the policy to the candidate with the highest estimated return, effectively learning a dynamic hyperparameter schedule.
- A KL divergence constraint is applied to limit policy updates, ensuring that importance sampling estimates remain stable and informative.
- The algorithm operates in a single training run, reusing all environment interactions, and requires no additional hyperparameters beyond the standard policy gradient ones.
- The approach is general and can be applied to various policy gradient algorithms, including A2C, TNPG, and TRPO.
Experimental results
Research questions
- RQ1Can hyperparameter tuning be performed efficiently within a single training run without requiring additional environment interactions?
- RQ2Can off-policy importance sampling be stabilized in first-order policy gradient methods using only a simple KL constraint?
- RQ3Does dynamically adapting hyperparameters like learning rate and GAE parameters lead to faster learning and better performance than fixed settings?
- RQ4How does HOOF compare to grid search and other hyperparameter optimization baselines in terms of sample efficiency and final performance?
- RQ5Is the proposed method robust to changes in the underlying optimizer (e.g., RMSProp vs. SGD)?
Key findings
- HOOF achieves better performance than grid search with the same number of training runs, requiring over 10 times more samples than HOOF to match its performance.
- HOOF significantly outperforms fixed-hyperparameter baselines, such as A2C and TRPO, in environments like HalfCheetah, Hopper, Ant, and Walker.
- In the TNPG setting, HOOF-TNPG learns faster and matches or exceeds the performance of TRPO with default hyperparameters across all tested environments.
- The hyperparameters learned by HOOF—such as δ, γ, and λ—vary meaningfully across environments, indicating the need for dynamic adaptation rather than fixed values.
- The KL constraint is crucial for stabilizing importance sampling estimates; without it, WIS estimates become unreliable and learning fails.
- HOOF remains effective even when using SGD instead of RMSProp, demonstrating robustness to the choice of optimizer, unlike baseline A2C which fails to learn under SGD.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.