2
$\begingroup$

In machine learning, I've learned one of the ways to optimize hyperparameters of a model is to do a grid search, which tests model for evenly spaced out values of hyperparametrs and determines which combination gives best results on validation set.

Since space represented by hyperparameters and efficiency of the model can have multiple local optimas, would it make sense to use some metaheuristic search method, like genetic algorithm?

Our gene could be a binary sequence representing hyperparameter values, and our individual's fitness function could be score of the model for hyperparameters represented by it's genetic material.

Major flaw that comes into my mind is that model has to be trained over and over again, which would take a lot of time, but is there any way to compensate for that by doing less training iterations? Would that affect our result a lot? Also, when doing grid search, model also has to be trained for every hyperparameter combination, so maybe the time difference between the two wouldn't be that big?

What do you think?

$\endgroup$
2
$\begingroup$

You can use genetic algorithms. Yes, it will require to rerun experiments again and again but it is also true for other hyperparameter optimization methods. You can try to use warm-starts, i.e., don't train your models from scratch but to warm-start them from some previously found solutions. The latter sometimes is used for deep neural networks when searching for networks architectures.

Genetic algorithms can potentially be slow compared to other methods. However, they are relatively easy to adjust for any search space. The first GAs for hyperparameter tuning appeared about 30 years ago. For a more recent work, see "Large-Scale Evolution of Image Classifiers" by Real et al., 2017 at https://arxiv.org/abs/1703.01041

$\endgroup$
  • $\begingroup$ I don't understand your answer. $\endgroup$ – Michael Chernick Sep 11 '18 at 5:13
  • 1
    $\begingroup$ If you tell me more about your background, e.g., whether you are familiar with i) GA, ii) training ML model using warm starts, iii) hyperparameter optimization with evaluations on different levels of fidelity (note "to compensate for that by doing less training iterations" mentioned in the question) , then I could help. $\endgroup$ – IndieSolver Sep 11 '18 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.