Hyperparameter Optimization Is Deceiving Us, and How to Stop It

A. Feder Cooper, Yucheng Lu, Jessica Zosa Forde, Christopher De Sa

Hyperparameter optimization (HPO) is often the "silent partner" in machine learning results, but it can be highly deceptive. Choosing one search subspace might show Algorithm A is better, while another shows Algorithm B wins. This paper formalizes this "hyperparameter deception" using modal logic and proves that we can build "defended" HPO procedures that prioritize skepticism to ensure our scientific conclusions remain consistent, even under limited compute budgets.

The Problem: Hyperparameter Deception

In modern ML research, we rarely compare "raw" algorithms; we compare algorithms after they’ve been tuned via HPO (like grid search or random search). However, the HPO search space is effectively infinite, forcing researchers to pick small, often arbitrary subspaces to test.

The authors identify a critical gap: hyperparameter deception. This occurs when the conclusion of a study (e.g., "Optimizer J outperforms Optimizer K") is entirely dependent on the specific, arbitrary boundaries of the HPO search. If a different researcher picks a slightly different grid, they might conclude the exact opposite.

Comparison of SGD, Heavy Ball, and Adam under two different HPO configurations, demonstrating hyperparameter deception.

Even worse, standard statistical significance tests do not protect against this. A deceptive result can be both reproducible and statistically significant while still being "wrong" in a broader context.

Methods: Epistemic Hyperparameter Optimization

The paper moves beyond empirical observation into formal theory by introducing Epistemic Hyperparameter Optimization (EHPO).

  1. The Deceptive Demon: Taking a page from Descartes, the authors model HPO as a game against an "evil demon" (an adversary) who tries to pick hyperparameters and random seeds to trick the researcher into a specific conclusion.
  2. Modal Logic Framework: To reason about uncertainty, the authors use modal logic. They define two key operators:
  3. $\diamond_t p$: It is possible for the demon to make us conclude $p$ within a time budget $t$.
  4. $B p$: We believe (conclude) $p$ based on our HPO logs.
  5. Defended Reasoner ($B_*$): They propose a "skeptical" reasoner that only concludes $p$ if it is impossible for an adversary to have forced the opposite conclusion ($\neg p$) within the same constraints.
  6. Defended Random Search: They translate this theory into a practical algorithm. Instead of one giant random search, they split the search into multiple independent "logs" and only reach a conclusion if there is a strong consensus (majority or unanimity) across those logs.

Experimental Validation and Key Results

The authors validate their framework using CIFAR-10 on a VGG16 architecture, comparing the optimizers SGD, Heavy Ball (HB), and Adam. They specifically use these to replicate and challenge a well-known study (Wilson et al., 2017) regarding the "marginal value" of adaptive gradient methods.

  • The Reversal: The authors show that in the original study, a specific grid search made Adam look significantly worse than SGD (as seen in Config 1 of the figure above). By simply expanding the HPO search space for Adam (tuning the $\epsilon$ parameter), they showed Adam performs just as well as non-adaptive methods (Config 2), reversing the original paper's conclusion.
  • Empirical Validation of Defended Search: Using their "Defended Random Search," the authors showed that as they increased the "skepticism" parameter ($\delta$), the algorithm correctly stopped claiming SGD was better than Adam, instead outputting "Nothing." This demonstrates the defense working as intended: preventing a conclusion that could be easily overturned by a different search space.

Key Insights and Future Work

  • Reproducibility is not enough: A result can be perfectly reproducible (same code, same seed, same grid) but still be deceptive if the grid itself was "lucky" or biased.
  • "Conclude Nothing" is a valid result: Traditional HPO always picks a "winner." The authors argue that if the evidence is brittle or highly dependent on hyper-hyperparameters (like the range of the learning rate), the most scientific output is to remain skeptical and conclude nothing.
  • Sublinear Cost of Defense: They prove that defending against a "demon" with a large compute budget $t$ only requires a "good-faith" researcher to increase their budget by a sublinear amount (specifically $O(\sqrt{t})$).

Limitations: Defending against deception requires running more HPO trials to ensure consensus, which may be computationally expensive for massive models. Furthermore, the framework relies on what the community considers a "reasonable" set of allowable hyperparameters. Being explicit about why a subspace was chosen remains a critical human and social requirement of ML research.

Summary updated

BibTeX
@inproceedings{cooper2021hyperparameter,
  author = {A. Feder Cooper and Yucheng Lu and Jessica Zosa Forde and Christopher De Sa},
  title = {{Hyperparameter Optimization Is Deceiving Us, and How to Stop It}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=2lZdja9xYzh},
}
Figure