NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hyp-RL : Hyperparameter Optimization by Reinforcement Learning

Hadi S. Jomaa, Josif Grabocka, Lars Schmidt-ThiemearXiv 2019

Abstract

Hyperparameter optimization (HPO) is critical for model performance but often relies on hand-crafted heuristics or expensive surrogate models that ignore cross-task knowledge. This paper introduces Hyp-RL, a reinforcement learning approach that treats HPO as a sequential decision-making problem. By training a Deep Q-Network on a large-scale meta-dataset (nnMeta), Hyp-RL learns a policy that leverages both dataset meta-features and historical trial results. Experimental results demonstrate that Hyp-RL outperforms traditional Bayesian methods in efficiency and transferability, providing a scalable alternative to standard HPO techniques.

Introduction

Hyperparameter tuning is often considered the "black art" of machine learning. Whether selecting the learning rate for a neural network or the depth of a random forest, the right choice often determines whether a model achieves state-of-the-art performance or remains mediocre.

Traditionally, practitioners use Grid Search, Random Search, or Sequential Model-Based Optimization (SMBO) like Bayesian Optimization. While SMBO is powerful, it typically relies on hand-crafted acquisition functions—heuristics that decide where to sample next based on a surrogate model. These methods often start from scratch for every new dataset, ignoring the wealth of knowledge available from tuning similar models in the past. Hyp-RL addresses this by replacing these heuristics with a learned policy that improves over time and across different tasks.

Methods

The researchers formulated HPO as a Markov Decision Process (MDP) and solved it using Deep Q-Learning. The core of the approach is a controller that learns to navigate hyperparameter spaces efficiently.

  1. The Environment: The agent operates on the hyperparameter response surface of a specific dataset.
  2. State Representation: The state is composed of two primary components:
  3. Static Meta-features ($s_{static}$): Statistical descriptions of the dataset, such as the number of instances, skewness, and kurtosis.
  4. Dynamic History ($s_{dynamic}$): A sequence of previously tested hyperparameters and their resulting validation losses.
  5. Architecture: An LSTM (Long Short-Term Memory) network processes the dynamic history. Crucially, the LSTM's hidden state is initialized using the dataset's meta-features, allowing the agent to "warm-start" its search based on historical performance on similar datasets.
  6. Actions and Rewards: Each action corresponds to selecting a configuration from a predefined grid. The agent receives a reward based on the reduction in validation loss achieved by the selected configuration.
Architecture of the Hyp-RL controller, showing the integration of static meta-features and dynamic history through an LSTM-based Q-network.

Datasets and Training

To train the RL agent, the authors introduced nnMeta, a comprehensive meta-dataset derived from 50 randomly selected classification datasets from the UCI repository. For each dataset, they performed an exhaustive grid search of 2,916 distinct hyperparameter configurations covering architecture, optimization, and regularization. This provided the "ground truth" response surfaces necessary to train the controller over approximately 24 GPU hours.

Key Results

Hyp-RL was evaluated against standard baselines, including Random Search, Independent Gaussian Processes (I-GP), and Spearmint.

  • Superior Performance: Hyp-RL consistently achieved a lower Average Distance to the Minimum (ADTM) and a better Average Rank across the 50 datasets compared to non-transfer methods.
  • Efficiency: Unlike traditional Bayesian methods that require re-fitting complex surrogate models after every trial, Hyp-RL only requires a neural network forward pass to select the next point, making inference almost instantaneous.
  • Rapid Convergence: Due to its meta-learning capabilities, Hyp-RL selected better configurations from the very first trial compared to its competitors.

Discussion and Future Work

While Hyp-RL demonstrates significant promise, it currently operates within a fixed grid of hyperparameters. Scaling this approach to high-dimensional, continuous action spaces remains a primary challenge. Additionally, the authors noted common RL issues like Q-learning overestimation, suggesting that architectures like Double Q-learning could improve stability. Finally, while the training of the controller is a one-time cost, generating the necessary meta-data for more complex models (e.g., Large Language Models) remains computationally expensive. Future research will likely focus on reducing the data requirements for training such meta-controllers.

Summary updated

BibTeX
@misc{jomaa2019hyp,
  author = {Hadi S. Jomaa and Josif Grabocka and Lars Schmidt-Thieme},
  title = {{Hyp-RL : Hyperparameter Optimization by Reinforcement Learning}},
  year = {2019},
  eprint = {1906.11527},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.11527},
}
Figure