PHS: A Toolbox for Parallel Hyperparameter Search

Peter Michael Habelitz, Janis KeuperarXiv 2020

Introduction

Hyperparameter optimization (HPO) remains one of the most significant engineering hurdles in modern machine learning. Settings such as learning rate, batch size, and network architecture—parameters not learned during the training process—often dictate the success or failure of a model. Traditionally, finding the optimal configuration has been an empirical, trial-and-error process. PHS (Parallel Hyperparameter Search) is an open-source Python toolbox designed to alleviate this burden by combining Bayesian optimization with seamless parallelization via Dask, allowing researchers to scale their searches across high-performance computing (HPC) clusters with minimal code modifications.

Methods and Architecture

The PHS framework is built upon three core pillars: intelligent search strategies, robust parallelization, and developer ergonomics.

Bayesian Optimization

While PHS supports manual and random search, its primary strength lies in its Bayesian Optimization implementation. This approach treats the objective function as a "black box" and constructs a probabilistic surrogate model—specifically a Gaussian Process—to predict performance across the parameter space. An acquisition function then guides the search, strategically deciding whether to explore unknown regions or exploit areas already known to yield high performance. This method is significantly more efficient than exhaustive grid searches for "expensive" functions where each evaluation may take hours or days.

The optimization landscape for the Griewank function, illustrating how PHS navigates complex, multi-modal surfaces to find global minima.

Parallelization and Backend

To handle the computational load, PHS utilizes two distinct backends. For distributed computing across large clusters, it leverages Dask, enabling the distribution of trials across numerous nodes. For local development and debugging, it uses Python’s concurrent.futures to utilize multiple cores on a single machine. The API is designed for "minimal modifications," ensuring that researchers can transition from local testing to cluster-wide deployment without rewriting their core training logic.

Experimental Evaluation

The authors evaluated PHS using two distinct scenarios to demonstrate its versatility. First, the Griewank Function served as a mathematical stress test, showcasing the tool's ability to find minima in a complex, multi-modal landscape. Second, a real-world application was demonstrated using the CIFAR-10 image classification dataset. In this scenario, PHS was tasked with tuning the learning rate, batch size, and weight decay of a deep learning model.

Key Results and Scalability

In the CIFAR-10 showcase, PHS performed 30 evaluations, consisting of 10 random initializations followed by 20 Bayesian steps. The tool successfully identified optimal regions for the learning rate and batch size, proving that intelligent search can outperform random or grid-based methods with fewer trials.

A worker timeline demonstrating concurrent function evaluations across multiple compute nodes, highlighting the system's ability to maximize hardware utilization.

A critical feature of PHS is its decentralized logic. By offloading the Bayesian suggestion process to the worker nodes themselves, the master node is relieved of computational overhead. This design ensures that the system scales linearly as more compute nodes are added to the cluster. Furthermore, PHS includes built-in visualization tools that generate contour plots and parallel coordinate charts, providing researchers with intuitive insights into parameter sensitivity and search progress.

Limitations and Future Work

Despite its strengths, PHS faces several challenges common to the field of HPO. Currently, the Bayesian optimization implementation is primarily suited for continuous numerical parameters, whereas categorical or discrete parameters are better handled by the random search component. Additionally, the inherent stochasticity of deep learning—where results can vary based on random seeds—necessitates running multiple trials per parameter set to obtain reliable averages. Finally, as models move toward hundreds of hyperparameters, the "dimensionality curse" remains a significant hurdle that future iterations of PHS and similar tools must address.

Summary updated

BibTeX
@misc{habelitz2020phs,
  author = {Peter Michael Habelitz and Janis Keuper},
  title = {{PHS: A Toolbox for Parallel Hyperparameter Search}},
  year = {2020},
  eprint = {2002.11429},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.11429},
}
Figure