Cost Effective Optimization for Cost-related Hyperparameters

Qingyun Wu, Chi Wang, Silu HuangarXiv 2020

Abstract

Hyperparameter optimization (HPO) is essential for maximizing machine learning model performance, yet standard methods often ignore the varying computational costs of different configurations. This paper introduces CFO (Cost-Frugal Optimization), a framework specifically designed for cost-efficiency. Utilizing the $FLOW^2$ randomized direct-search algorithm, CFO provides theoretical cost guarantees and achieves up to three orders of magnitude speedup compared to state-of-the-art baselines. Empirical results across diverse benchmarks demonstrate that CFO consistently finds high-quality models with significantly lower total computational expenditure.

Introduction

The primary goal of hyperparameter optimization is typically to minimize validation loss within a given budget. A common assumption in existing HPO literature is that evaluating any hyperparameter configuration incurs a uniform cost. In reality, hyperparameters such as the number of estimators in ensemble methods or the batch size in deep learning significantly influence training and validation time.

Standard methods often waste resources by evaluating complex, high-cost configurations that do not necessarily yield better accuracy. This paper argues that sample efficiency (finding the best model in few iterations) is distinct from cost frugality (finding the best model with the least total compute time). CFO addresses this by implicitly controlling evaluation costs through local search and strategic initialization.

Methodology

The authors propose a two-layered approach to achieve cost-frugal optimization.

The $FLOW^2$ Algorithm

At the core of CFO is $FLOW^2$, a randomized direct-search algorithm. It operates by sampling a random direction from a unit sphere and evaluating whether a step in that direction (or its opposite) improves the loss. This approach offers:

  • Theoretical Convergence: A proven convergence rate of $O(\sqrt{\sqrt{d}/K})$ for non-convex objectives.
  • Cost Guarantees: If the search begins in a low-cost region, the total cost to reach an $\epsilon$-optimal solution is bounded by $O(d\epsilon^{-2})$ times the cost of the optimal configuration.

CFO Framework

CFO builds upon $FLOW^2$ by adding practical features for robust HPO:

  • Low-cost Initialization: CFO starts from the "cheapest" possible configurations, moving toward higher performance only as necessary.
  • Dynamic Stepsize: The search radius is automatically adjusted based on progress to balance exploration and exploitation.
  • Randomized Restarts: To prevent the local search from becoming trapped in local optima.

Experimental Evaluation

CFO was evaluated against five state-of-the-art baselines: Random Search (RS), GPEI, GPEIPS, SMAC, and BOHB. The benchmarks included 39 classification tasks from the AutoML Benchmark and 14 regression tasks from PMLB, tuning hyperparameters for XGBoost and Deep Neural Networks (DNNs).

Key Results

CFO demonstrated superior performance across both model types. As shown in the performance curves below, CFO (the solid black line) consistently drops to lower loss values much faster than competitors across various datasets.

Performance curves showing loss vs. wall clock time across six datasets. CFO (black line) consistently outperforms baselines in both speed and final loss.
  • Anytime Performance: In XGBoost tuning, CFO reached the "best" loss (within 0.05% of the global optimum) on 96% of datasets, compared to only 19% for the next best baseline, BOHB.
  • Computational Speedup: The method achieved up to three orders of magnitude speedup in reaching target loss levels compared to traditional Bayesian Optimization methods.

Discussion and Insights

A key insight driving CFO's success is the "overfitting monotonicity" observed in many hyperparameter spaces. Beyond an optimal point, increasing model complexity (and cost) often leads to overfitting, which increases validation loss. By starting with low-cost models and performing local updates, CFO stays within "locally monotonic" regions where lower cost correlates with better performance. Unlike methods like GPEIPS that attempt to explicitly model cost using complex Gaussian Processes, CFO's implicit control prevents unpredictable spikes in evaluation time between iterations.

Conclusion

CFO represents a significant advancement in cost-aware hyperparameter optimization. By prioritizing low-cost evaluations and utilizing a search strategy with theoretical guarantees, it provides a practical and efficient solution for tuning complex machine learning models. Future work includes extending CFO's theoretical framework to categorical hyperparameters and exploring more advanced parallelization strategies.

Summary updated

BibTeX
@misc{wu2020cost,
  author = {Qingyun Wu and Chi Wang and Silu Huang},
  title = {{Cost Effective Optimization for Cost-related Hyperparameters}},
  year = {2020},
  eprint = {2005.01571},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.01571},
}
Figure