Answers.Body: <p>A loss function can be simply converted into a fitness function or a reward function by negating it.</p>
  <p>Or in evolutionary algorithms it's also easy to use the loss function as is, then when applying selection process, select the lowest scoring individuals values from the population instead of the highest.</p>
  <p>If the loss function has been defined to work with gradient-based methods on complex problems (e.g. image recognition), then those gradient based methods will usually significantly outperform evolution-inspired algorithms. From comments it appears you would like to explore this difference yourself.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-18T14:44:02.877Z
Answers.LastActivityDate: 2024-05-18T15:43:37.807Z
Answers.LastEditDate: 2024-05-18T15:43:37.807Z
Answers.UserDisplayName: Neil Slater
Answers.Body: <p>It definitely can.  It took a bit but I found discussion on NEAT for supervised classification.</p>
  <p>But for the record, evolutionary algorithms are a lot more interesting on problems which are not differentiable.  They tend to be computationally expensive if you already know a reasonable algorithm (backprop).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-18T13:04:28.033Z
Answers.LastActivityDate: 2024-05-18T13:04:28.033Z
Answers.UserDisplayName: foreverska
Body: <p>Can't the loss function used in backpropagation be used as a fitness function in an evolutionary algorithm?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-05-18T13:39:58.237Z
Comments.Text: Why are you asking this question? Can you provide more context?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-05-18T13:44:07.037Z
Comments.Text: @nbro Personally, I think evolution is better than backpropagation.
Comments.UserDisplayName: Display name
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-05-18T13:45:11.747Z
Comments.Text: Ok, and? How does that motivate your question?
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-05-18T13:54:22.957Z
Comments.Text: @nbro I didn't know how to create a fitness function, so I was wondering if I could use an already existing loss function.
Comments.UserDisplayName: Display name
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-05-18T13:56:30.163Z
Comments.Text: So, how do you know that evolution is better than backpropagation, if you don't even know what a fitness function is? Evolution can also mean different things. Are you talking about biological evolution or evolutionary algorithms? There are also many evolutionary algorithms.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-05-18T14:03:06.820Z
Comments.Text: @nbro Backpropagation causes forgetting
Comments.UserDisplayName: Display name
Tags: <fitness-functions>
Title: Can't the loss function be used as a fitness function?
UserDisplayName: Display name
ThreadText: # Can't the loss function be used as a fitness function?
  
  (Asked by: username_0 on 2024-05-18)
  
  Can't the loss function used in backpropagation be used as a fitness function in an evolutionary algorithm?
  
  **Tags:** fitness-functions
  
  > **Comments:**
  > **username_1**: Why are you asking this question? Can you provide more context?  
  > **username_0**: @username_1 Personally, I think evolution is better than backpropagation.  
  > **username_1**: Ok, and? How does that motivate your question?  
  > **username_0**: @username_1 I didn't know how to create a fitness function, so I was wondering if I could use an already existing loss function.  
  > **username_1**: So, how do you know that evolution is better than backpropagation, if you don't even know what a fitness function is? Evolution can also mean different things. Are you talking about biological evolution or evolutionary algorithms? There are also many evolutionary algorithms.  
  > **username_0**: @username_1 Backpropagation causes forgetting  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2024-05-18. Score: 0
  
  A loss function can be simply converted into a fitness function or a reward function by negating it.
  
  Or in evolutionary algorithms it's also easy to use the loss function as is, then when applying selection process, select the lowest scoring individuals values from the population instead of the highest.
  
  If the loss function has been defined to work with gradient-based methods on complex problems (e.g. image recognition), then those gradient based methods will usually significantly outperform evolution-inspired algorithms. From comments it appears you would like to explore this difference yourself.
  
  
  ---
  
  ### Answer by username_3 on 2024-05-18. Score: 0
  
  It definitely can. It took a bit but I found discussion on NEAT for supervised classification.
  
  But for the record, evolutionary algorithms are a lot more interesting on problems which are not differentiable. They tend to be computationally expensive if you already know a reasonable algorithm (backprop).
  
  
  ---
  
  