6
$\begingroup$

As a quick question, what are genetic algorithms meant to be used for? I read somewhere else that they should be used as optimization algorithms (similar to the way we use gradient descent to optimize the best parameters search with a linear regression, neural network...). If so, why are these GAs not so much present in machine learning (or at least I did not see it too much in the literature)?

$\endgroup$

3 Answers 3

4
$\begingroup$

Yes, as you found they (evolutionary algorithms such as genetic algorithms) are using for optimization tasks. One reason that they are not using mostly in machine learning could be their performance to converge to the optimum point. Also, implementation of the GAs for some domains could be problematic and it could not be generalized like gradient descent, as it's involved in at least 5 phases‌ (mutation, crossover, ...).

$\endgroup$
2
  • 1
    $\begingroup$ While GAs are indeed mostly used for what is broadly defined here as "optimization", other EAs (like Genetic Programming) have been successfully applied to more problems that would be better described as "synthesis". $\endgroup$
    – mikołak
    Commented Oct 28, 2019 at 21:07
  • $\begingroup$ Gradient-based optimizers are only meant for continous spaces, which are differentiable. They're not even meant to work in non-convex spaces, but give results considered good-enough. $\endgroup$ Commented Jan 8, 2020 at 9:23
1
$\begingroup$

I think you downplayed too much about GA. GA is still used actually in machine learning although not as widespread. You can see some implementation by code bullet and a more academic one for example. One of the issue with GA is it is most of the time it is computationally expensive and to some degree requires luck (because you are mutating instances randomly), hence it is usually not popular when we already know a more deterministic solution to a problem. But there is a set of problems where GA could excel, one of that is when you don't have differentiable objective e.g. parameter search, or reinforcement learning.

$\endgroup$
1
  • $\begingroup$ excellent answer, I completely agree with you about thinking of it for cases where you do not have a differentiable objective function to optimize; luckily I have a team mate who is an expert in GAs, so the idea is to apply it to cases where other more common optimization algos are not applicable or when hyperparameters search could be too expensive to do with an exhaustive grid search for instance... $\endgroup$
    – German C M
    Commented Nov 9, 2019 at 12:54
0
$\begingroup$

Tackling the second part of the question, yes GAs can be used in machine learning but are not the commonly used method.

Mainly, to optimize parameters on (parametric) models, it is common to use either a closed solution (like in least squares) or Gradient Descent (and it's variants) but the choice of Hyper-parameters are usually open to taste, GA's could be used in here, but people usually try things like Random Search, Grid Search and so on.

$\endgroup$
3
  • $\begingroup$ thanks for your answer Pedro, although I would not mix hyperparameter tuning methods like grid search with the selected optimization algorithm itself (like gradient descent). I.e., you use gradient descent to find the best coefficients of your model for each hyperparameters setup among the several ones contained in your grid search strategy $\endgroup$
    – German C M
    Commented Oct 28, 2019 at 12:28
  • $\begingroup$ I am not mixing, Hyperparameter tuning is an optimization procedure, usually not tunned with gradient descent but other optimization algorithms. $\endgroup$ Commented Oct 28, 2019 at 12:43
  • 1
    $\begingroup$ Grid search is a optimization algorithm (not very efficient, but it is) $\endgroup$ Commented Oct 28, 2019 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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