Scaling Laws for Hyperparameter Optimization

Arlind Kadra, Maciej Janowski, Martin Wistuba, Josif Grabocka

TL;DR

This paper introduces Deep Power Laws (DPL), a novel approach to Hyperparameter Optimization (HPO) that predicts a model's final performance by exploiting the "power law" nature of learning curves. By using an ensemble of neural networks to forecast how a configuration will perform at full maturity after only a few training epochs, DPL achieves state-of-the-art results across 59 diverse machine learning tasks, including the tuning of Large Language Models (LLMs).

The Challenge of Hyperparameter Optimization

Hyperparameter Optimization (HPO)—finding the best settings for variables like learning rate, weight decay, or architecture—is notoriously expensive in Deep Learning. Traditionally, researchers have had to train dozens of models to completion just to find one optimal configuration.

To save time, "multi-fidelity" or "gray-box" methods (like Hyperband or ASHA) are often used. These techniques observe a model's performance early in training and terminate "unpromising" configurations. However, most existing methods are purely reactive: they look at the current validation error but don't explicitly model the shape of the learning curve to predict future performance. The authors argue that because neural network training curves almost always follow predictable "scaling laws" (specifically power laws), we can be much more proactive and efficient in how we search the hyperparameter space.

Deep Power Laws (DPL): The Method

The core contribution of this paper is the Deep Power Law (DPL) surrogate model. Here is how it operates:

  1. The Power Law Assumption: The authors assume the validation loss $f$ for a configuration $\lambda$ at budget $b$ (e.g., epochs) follows a specific functional form: $$\hat{f}(\lambda, b) = \alpha_\lambda + \beta_\lambda b^{-\gamma_\lambda}$$
  2. Neural Network Ensemble: Instead of fitting a separate curve for every configuration, DPL trains an ensemble of neural networks. This network takes the hyperparameter configuration $\lambda$ as input and outputs the three parameters of the power law ($\alpha, \beta, \gamma$).
  3. Bayesian Optimization (BO): By using an ensemble (typically 5 models), DPL can estimate both the mean and the uncertainty (variance) of the predicted final performance. These estimates are then plugged into an "Expected Improvement" (EI) acquisition function.
  4. Dynamic Scheduling: The algorithm uses these predictions to decide which configurations to pause and which to continue training incrementally, focusing computational resources on the most promising "rising stars."
Correlation of estimated vs. true performance at varying learning curve fractions.

Datasets and Benchmarks

The authors evaluated DPL against seven top-tier competitors across 59 diverse tasks:

  • LCBench: 35 tabular datasets featuring 2,000 pre-evaluated hyperparameter configurations each.
  • PD1: A large-scale benchmark covering vision (CIFAR-100, ImageNet), NLP (Transformers), and bioinformatics.
  • TaskSet: 12 different RNN-based text classification tasks.
  • nanoGPT-Bench: A newly introduced benchmark involving the tuning of GPT-2 models (ranging from 0.3M to 30M parameters) on the OpenWebText dataset. This specifically tests how well hyperparameters found on small "proxy" models transfer to full-scale LLMs.

Key Insights and Ideas

  • Inductive Bias Matters: By forcing the neural network to output parameters for a power law rather than predicting the loss directly, the authors bake a powerful "inductive bias" into the model. This allows the surrogate to accurately extrapolate from 5 epochs to 50 epochs.
  • Joint Learning: Because the DPL model is trained on all evaluated configurations simultaneously, it learns the relationship between hyperparameters and the shape of the learning curve. For example, it might learn that a high learning rate causes a steep initial drop but a higher final loss floor ($\alpha$).
  • LLM Transferability: DPL successfully finds optimal hyperparameters on tiny versions of a Transformer that transfer to much larger models, significantly reducing the cost of tuning LLMs.

Key Results

  • State-of-the-Art Performance: DPL outperformed all 7 baselines (including ASHA, BOHB, and SMAC) in 5 out of 6 benchmark scenarios.
  • Superior "Any-time" Results: DPL finds better configurations much earlier in the HPO process than its competitors. Across major benchmarks, it consistently achieved the lowest average normalized regret at any given HPO budget.
Average Normalized Regret vs. HPO Budget across LCBench, TaskSet, and PD1 benchmarks.
  • Low Overhead: Despite using a neural network ensemble as a surrogate, the computational overhead is negligible. In the nanoGPT experiments, the DPL "thinking time" accounted for only about 5-10% of the total HPO budget.

Limitations and Future Work

The authors identify a few areas for future improvement:

  • Uncertainty Estimation: "Deep Ensembles" provide a somewhat suboptimal estimate of uncertainty compared to standard Bayesian tools like Gaussian Processes (GPs).
  • Computational Cost of the Surrogate: While small compared to training a GPT model, training an ensemble of NNs is still more expensive than simpler surrogate models.
  • Future Directions: The team plans to investigate hybrid models that combine the strengths of power laws with Gaussian Processes and explore other types of "fidelities," such as training on subsets of data rather than just fewer epochs.

Summary updated

BibTeX
@inproceedings{kadra2023scaling,
  author = {Arlind Kadra and Maciej Janowski and Martin Wistuba and Josif Grabocka},
  title = {{Scaling Laws for Hyperparameter Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=ghzEUGfRMD},
}
Figure