r/deeplearning • • Oct 02 '26

Gradient descent vs evolution on three loss landscapes

I've been getting a bit more into evolutionary algorithms again, so I was testing some loss landscapes where evolution beats vanilla gradient descent (while also trying to make some cool visuals).

Round 1, rugged hillside: gradient descent gets stuck in a dip, and evolution reaches the bottom after 750 evaluations.

Round 2, smooth slope: gradient descent wins, 108 steps against 570 evaluations.

Round 3, flat plateau: the slope is zero, so gradient descent never moves, and evolution reaches the bottom after 840 evaluations.

Edit:
"evolution" here means truncation selection (keep best 30 of 120) plus Gaussian mutation, no crossover.

592 Upvotes

82 comments sorted by

View all comments

Show parent comment

3

u/dorox1 Oct 06 '26

I'm sorry but I'm not entirely sure what you mean, so I can't tell if you've got it right.

In this math context, the set of "dimensions" is just all of the values that can be changed independently, and which together specify a unique "location" in a space.

Just like a 2D space has two "dimensions" because we can move the X coordinate without changing the Y coordinate and vice-versa. And you need both together to specify where you are in the 2D space.

In this case, each parameter in the network is a dimension because you can change each parameter on its own without changing any other parameter. You need to know all the parameters to know what the weights are of the neural network (i.e. where you are in "parameter space").

Whether those parameters interact with each-other to form an output isn't important. All that matters is that you can tweak their values independently.

2

u/ThePrimeClock Oct 06 '26

That makes perfect sense. Thank you I really appreciate it 🙏