Critical Hyper-Parameters: No Random, No Cry

Olivier Bousquet, Sylvain Gelly, Karol Kurach, Olivier Teytaud, Damien VincentarXiv 2017

Introduction

Hyperparameter (HP) optimization remains one of the most significant bottlenecks in training deep learning models. Given the computational expense, researchers often resort to "one-shot" methods, where configurations are selected in advance and executed in parallel. While grid search and random search are the industry standards, both suffer from fundamental inefficiencies. This paper argues for the adoption of Low Discrepancy Sequences (LDS), specifically Scrambled Hammersley, as a superior, drop-in replacement for random search.

The Hyperparameter Search Problem

Traditional methods for one-shot HP optimization have distinct drawbacks. Grid search is inefficient in high-dimensional spaces because it repeats values for parameters that may not be critical to model performance, effectively wasting trials. Random search is generally more effective but is susceptible to "unlucky" clustering. In these instances, certain regions of the search space are over-sampled while others remain entirely unexplored, leading to inconsistent results and a non-zero probability of missing the optimal configuration.

Methods: Low Discrepancy Sequences

To address these issues, the authors propose using quasi-random methods. Unlike independent random sampling, LDS points are mathematically designed to be "well-spread" across the search space. This minimizes dispersion—the size of the largest unsampled "hole" in the parameter space.

The paper evaluates several sequences, including Halton, Sobol, and Hammersley. To mitigate deterministic patterns that might conflict with specific loss functions, the authors employ Random Shifting and Scrambling. The primary recommendation is Randomly Scrambled Hammersley (S-SH).

Comparison of sampling methods across key properties. S-SH and S-Ha are the only methods that satisfy all theoretical requirements for robust hyperparameter search.

As shown in the table above, S-SH provides a unique combination of consistency, optimal dispersion, and robustness to irrelevant parameters, which grid and random search lack.

Projections and Critical Parameters

A key insight of this work is the behavior of sequences under projection. In most deep learning tasks, only a few "critical" hyperparameters (e.g., learning rate) significantly impact performance. LDS is mathematically superior because when a high-dimensional sequence is projected onto these few critical axes, the points remain uniformly spread. In contrast, grid search projections collapse onto a limited set of points, wasting the majority of the budget.

Results and Discussion

The approach was validated across toy functions, synthetic language benchmarks, and real-world deep learning tasks (CIFAR-10 and language modeling on PTB/MiniWiki).

Performance Gains

In language modeling tasks, S-SH outperformed random search with a win rate between 57% and 64%. More impressively, the authors calculated a "speed-up" metric, finding that S-SH provided a 32% to 76% speedup—meaning random search would require significantly more trials to match the performance of a smaller S-SH budget.

Performance comparison (bits-per-byte) between S-SH, Random, and Sobol sequences across different budgets. S-SH (blue) consistently achieves lower error rates.

Robustness

S-SH proved to be more robust than random search, significantly reducing the likelihood of a "bad" trial set. While Latin Hypercube Sampling (LHS) showed promise at very small budgets (under 10 trials), S-SH became the dominant choice as the number of trials increased.

Conclusion

The transition from random search to Scrambled Hammersley represents a simple yet powerful shift in hyperparameter optimization. By ensuring more uniform coverage of the search space, S-SH provides better model performance with fewer computational resources. As standardized libraries for these sequences become more common, there is little reason to continue relying on the "luck of the draw" in random search.

Summary updated

BibTeX
@misc{bousquet2017critical,
  author = {Olivier Bousquet and Sylvain Gelly and Karol Kurach and Olivier Teytaud and Damien Vincent},
  title = {{Critical Hyper-Parameters: No Random, No Cry}},
  year = {2017},
  eprint = {1706.03200},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1706.03200},
}
Figure