# On Hyperparameter Optimization of Machine Learning Algorithms: Theory and Practice

Automated hyper-parameter search compared across eight methods on common benchmark datasets

Li Yang, Abdallah Shami · arXiv · 2020-7-30

- **Problem** Tuning hyper-parameters by hand works only when the person knows the algorithm well. It breaks down when models have many hyper-parameters and slow evaluations.
- **Method** The authors treat tuning as hyper-parameter optimization, an automated search for a good configuration. They fix the search space and 3-fold cross-validation, then compare eight HPO methods on MNIST and Boston housing.
- **Results** The authors recommend BOHB for mixed hyper-parameter types and PSO for large search spaces. The setup gives no comparison scores, so it cannot say which method ranked highest.

## Why hand tuning stops working

A model's hyper-parameters are fixed before training, and they control settings such as the penalty C in an SVM or the learning rate of a neural network. Practitioners have long set them by hand, which works only when the person knows the algorithm well. That approach breaks down when there are many hyper-parameters, slow model evaluations and non-linear interactions between them.

The authors therefore treat the job as hyper-parameter optimization (HPO), an automated search for a good configuration.

Automating the search cuts human effort and can lift performance, because the best setting often differs from one dataset to another. Using the same tuning procedure for every algorithm also makes comparisons between them fair. The harder difficulty is that many HPO problems are non-convex, so a naive optimizer can settle on a local optimum instead of the global one.

Gradient descent can tune only continuous values, so it covers just part of the problem.

## Where grid, random and Bayesian search get stuck

Grid search exhaustively evaluates a fixed grid of values, while random search samples a set of combinations within a budget. In both methods each configuration is treated independently, so earlier results never guide the next choice. Because evaluations don't depend on one another, random search is easy to parallelise. Its complexity is \\(O(n)\\) when the number of evaluations n is fixed before the search starts.

The cost of ignoring history is that many evaluations land in poorly performing regions of the space. Bayesian optimization fixes this by using earlier results to pick the next configuration, so it usually needs fewer iterations. The trade-off is that BO works sequentially, which makes it hard to parallelise.

That cubic growth limits parallelism, and the BO-GP surrogate is mainly used for continuous variables. Random forest and TPE surrogates keep conditional hyper-parameters, so they suit choices like the SVM kernel type. Hyperband gives every configuration an equal budget on small dataset versions and removes the poor ones. BOHB replaces Hyperband's random sampling with BO, and gradient-based methods need gradients, so they only fit continuous hyper-parameters.

## Which models carry which hyper-parameters

SVM's kernel type is a categorical choice, and gamma, coef0 and degree depend on which kernel is picked. KNN has one key hyper-parameter, the number of neighbours, which makes it the simplest of the models studied. Random forest carries several hyper-parameters of different types, including the number of trees, the maximum depth and the split criterion.

The authors chose these three models because they cover one important hyper-parameter, a few conditional ones and many mixed ones.

## How the benchmark comparison is set up

The experiments use MNIST for classification and the Boston housing dataset for regression. Each HPO method is evaluated with 3-fold cross-validation, so every model is scored on the same folds. All methods search one shared space, with n neighbors from 1 to 20 for KNN. The SVM classifier searches C over \[0.1,50\], and the RF classifier searches n estimators over \[10,100\].

Accuracy scores the classifiers, and mean squared error (MSE) scores the regressors. Computational time records the total cost of a full HPO run with 3-fold cross-validation. Each run returns the configuration with the highest accuracy or the lowest MSE.

## What the comparison can and can't show

The setup gives no comparison scores, so it can't say which method ranked highest on either dataset. The authors' conclusion is that BOHB suits all hyper-parameter types when random subsets represent the data, and that PSO suits large search spaces.

Cost is the main open problem, since one configuration can take minutes, hours or days to evaluate. Multi-fidelity methods like Hyperband still fail on problems as large as ImageNet with CNN models. Results can also vary between runs, and a tuned optimum may not hold on unseen data. Few HPO frameworks support distributed ML, and no reliable benchmark platform covers all HPO methods yet.

## Paper info

- **Authors**: Li Yang, Abdallah Shami
- **Venue**: arXiv · Preprint
- **First published**: 2020-7-30
- **Added**: 2026-11-12
- **Updated**: 2022-10-5
- **Version**: v3
- **arXiv**: 2007.15745
- **DOI**: 10.1016/j.neucom.2020.07.061
- **Category**: cs.LG · stat.ML
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/2007.15745v3) · [PDF ↗](https://arxiv.org/pdf/2007.15745v3)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Li Yang, Abdallah Shami (2020). On Hyperparameter Optimization of Machine Learning Algorithms: Theory and Practice. arXiv:2007.15745v3. https://doi.org/10.1016/j.neucom.2020.07.061

**BibTeX**

```
@article{yang2020hyperparameter,
  title = {{On Hyperparameter Optimization of Machine Learning Algorithms: Theory and Practice}},
  author = {Li Yang and Abdallah Shami},
  year = {2020},
  eprint = {2007.15745},
  archivePrefix = {arXiv},
  doi = {10.1016/j.neucom.2020.07.061},
  url = {https://arxiv.org/abs/2007.15745v3}
}
```

## Other paper commentary

- [Understanding deep learning requires rethinking generalization](https://refivu.com/en/papers/cb138997-32a3-4005-82f2-6597e2492ff8-understanding-deep-learning-requires-rethinking.md)
- [Federated Optimization in Heterogeneous Networks](https://refivu.com/en/papers/2cd45774-4d0c-4ae9-9650-6a1593f93832-federated-optimization-in-heterogeneous-networks.md)
- [CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features](https://refivu.com/en/papers/5b819733-3817-45f5-9d87-61545a63f83b-cutmix-regularization-strategy-to-train-strong-classifiers.md)
- [Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learning](https://refivu.com/en/papers/6721e929-d93e-4c00-ac0e-6ba7eeaa97a2-dropout-as-a-bayesian-approximation-representing-model.md)
- [ADADELTA: An Adaptive Learning Rate Method](https://refivu.com/en/papers/e2abf038-96af-4e19-bbda-5c8262404473-adadelta-an-adaptive-learning-rate-method.md)
- [An overview of gradient descent optimization algorithms](https://refivu.com/en/papers/96d69873-e1ce-41dd-9333-645272090396-an-overview-of-gradient-descent-optimization-algorithms.md)
- [Lost in the Middle: How Language Models Use Long Contexts](https://refivu.com/en/papers/990be3e6-ce8b-473a-94d1-735a4cb6a76f-lost-in-the-middle-how-language-models-use.md)
- [KPConv: Flexible and Deformable Convolution for Point Clouds](https://refivu.com/en/papers/aadc9ee6-ee0e-485d-ae5a-841bc5fcdfb3-kpconv-flexible-and-deformable-convolution-for-point-clouds.md)
- [InfoGAN: Interpretable Representation Learning by Information Maximizing Generative Adversarial Nets](https://refivu.com/en/papers/9891b5b5-2ddd-42e7-a5df-4b7e02d593dc-infogan-interpretable-representation-learning-by-information.md)
- [RandAugment: Practical automated data augmentation with a reduced search space](https://refivu.com/en/papers/8b56147c-5b9a-4e55-85b2-0f0992053956-randaugment-practical-automated-data-augmentation-with-a.md)
- [MnasNet: Platform-Aware Neural Architecture Search for Mobile](https://refivu.com/en/papers/9898212b-ee8e-448d-817e-c0047d43e15a-mnasnet-platform-aware-neural-architecture-search-for-mobile.md)
- [Robust Recovery of Subspace Structures by Low-Rank Representation](https://refivu.com/en/papers/14c27646-6e22-4f5b-b820-67e75508bf84-robust-recovery-of-subspace-structures-by-low-rank.md)

## Terms in this paper

- [Accuracy](https://refivu.com/en/terms/1995c0cd6282-accuracy)
- [MNIST](https://refivu.com/en/terms/28b9bb66d1c6-mnist)
- [mean squared error](https://refivu.com/en/terms/e8df98e6d7b7-mean-squared-error)
- [gradient descent](https://refivu.com/en/terms/7557852c745c-gradient-descent)
- [Machine Learning](https://refivu.com/en/terms/86e004431ba6-machine-learning)
- [random forest](https://refivu.com/en/terms/e69b7b54f2ea-random-forest)
- [deep learning](https://refivu.com/en/terms/1114eabeb503-deep-learning)
- [Random search](https://refivu.com/en/terms/4122ba3151ed-random-search)
- [decision tree](https://refivu.com/en/terms/3158e0807c66-decision-tree)
- [classification](https://refivu.com/en/terms/df3aa00e3435-classification)
- [Support Vector Machine](https://refivu.com/en/terms/34721f065497-support-vector-machine)
- [bagging](https://refivu.com/en/terms/cc6b5bcfb655-bagging)
- [regression](https://refivu.com/en/terms/239d667a7188-regression)
- [XGBoost](https://refivu.com/en/terms/959f3da48853-xgboost)
- [Grid search](https://refivu.com/en/terms/92f46976faa5-grid-search)
- [Hyperband](https://refivu.com/en/terms/b6051a2ca1d0-hyperband)
- [SMAC](https://refivu.com/en/terms/96cbe183f791-smac)
- [Bayesian Optimization](https://refivu.com/en/terms/f408f0ab6835-bayesian-optimization)
- [kNN](https://refivu.com/en/terms/c4c008424c75-knn)
- [3-fold cross validation](https://refivu.com/en/terms/da98c0a20f52-3-fold-cross-validation)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/e35d8e99-a32c-4e33-acef-50ee792021f2-on-hyperparameter-optimization-of-machine-learning)
