BK

Neuroevolution: networks that grow instead of learn

No gradient. No teacher. Just mutation and whatever survives.

By Bhargavaram Krishnapur4 min readMachine learning

Painting: John Martin, Ruins of an Ancient City, c. 1810–20. Cleveland Museum of Art, CC0.

When people talk about training a neural network, they nearly always mean one thing. The network makes a guess, you measure how wrong it was, and then you work backwards through the network to find out how each individual number contributed to that error. Then you nudge every number slightly in the direction that would have been less wrong. Repeat a few million times.

That is backpropagation, and it works extraordinarily well. It is why modern machine learning exists.

It also has a requirement that is easy to miss: everything has to be differentiable. You need to be able to calculate, for every part of the network, which direction reduces the error. That constraint quietly decides a lot. It is why network shapes are usually fixed before training starts, and why the menu of activation functions is short.

Neuroevolution throws that requirement away.

The other approach

The idea is closer to breeding than to teaching. You make a network. You measure how good it is at the task, which is called its fitness. Then you make changed copies of it, keep the ones that score better, and do it again.

There is no gradient, and nothing works backwards. The network is never told which of its parts was responsible for a mistake. It is only ever told whether the whole thing did better or worse.

That sounds hopelessly inefficient, and for many problems it is. But it buys something significant: because nothing has to be differentiable, anything at all can be changed. Not just the weights, but the shape of the network, how many layers it has, how they connect, and which activation function each part uses. In backpropagation those are decisions a human makes in advance. Here they can evolve.

That is what Quantum Neural Horror does. It mutates its own topology, its activation functions and its weights, all at once, using evolutionary operators and simulated annealing rather than gradients.

Quantum Neural Horror during a run: the current topology, the mutation log and the fitness curve, live.

What simulated annealing is doing here

The name comes from metalwork. You heat metal so its atoms move freely, then cool it slowly so they settle into a strong arrangement. Cool it too fast and it locks into a bad one.

The search does the same thing. Early on it is willing to accept changes that make things worse, which sounds counterproductive and is the entire point. A search that only ever accepts improvements walks uphill until it reaches the top of the nearest small hill and then stops, with no way of knowing there is a mountain behind it. Accepting the occasional bad move is how it gets back down and goes looking.

As the run goes on, that willingness shrinks. The search becomes fussier and settles. Broad exploration early, careful refinement late.

Why watching it matters

The project shows fitness and complexity changing live, and this is more than decoration.

Numbers in a log tell you a run went well or badly. Watching it tells you what kind of badly. You see fitness climb quickly and then flatten, and you can see whether the network is still changing shape underneath while the score stands still. You see complexity grow, and you get to ask the useful question: is it getting better because it is getting smarter, or just because it is getting bigger?

Fitness and complexity over time. Watching both together shows whether improvement is real or just extra size.

That question, whether improvement is real or just extra capacity, is one of the recurring problems in machine learning, and here it is visible rather than inferred.

When this is actually the right tool

It would be dishonest to present this as a competitor to gradient descent for ordinary work. If your problem is differentiable and you have data, backpropagation will beat this comfortably, and it will not be close.

Evolution earns its place where gradients are unavailable. When you cannot compute a derivative at all. When the thing you want to optimise is the architecture rather than the weights. When your measure of success is a single score from a simulation with no smooth path back through it.

And it is an unusually good way to learn. Backpropagation hides the search behind calculus, which is efficient and rather opaque. Evolution puts the search in front of you: try things, keep what works, occasionally accept something worse so you do not get stuck. Watching a network rewrite itself makes the whole business of optimisation feel less like magic and more like something you could have thought of.

The work this is about

  • Quantum Neural HorrorA neuro-evolution sandbox. The network changes its own topology, activations and weights with simulated annealing, not backprop.
Bhargavaram Krishnapur
Bhargavaram Krishnapur

Computer science student at Vijaybhoomi University and founder of The Pulse Engine. I build local-first, open-source tools. See the portfolio or GitHub.