NEAT, short for NeuroEvolution of Augmenting Topologies, is a genetic algorithm that evolves both the connection weights and the topology of artificial neural networks, starting from minimal networks and adding neurons and connections over generations. Introduced by Kenneth Stanley and Risto Miikkulainen in 2002, it is one of the landmark methods of neuroevolution within evolutionary computation.
NEAT solved three long-standing problems of evolving network structure: how to cross over networks with different shapes, how to protect new structural innovations before their weights are tuned, and how to keep networks as small as possible. Its answers, historical markings, speciation and complexification, remain influential in evolutionary computation and artificial intelligence research.
How NEAT encodes and grows networks
NEAT uses a direct encoding: each genome is a list of node genes and connection genes, and every connection gene stores its input node, output node, weight, an enabled flag and an innovation number. The genome maps one-to-one onto the phenotype network, so evaluating an individual means building that network and running it on the task.
Evolution starts from a uniform population of minimal networks, typically with inputs wired directly to outputs and no hidden neurons. Structure is added only through mutation, a principle called complexification. Because new structure must earn its place through fitness, NEAT tends to find compact solutions rather than oversized networks.
The table below lists the main genetic operators and what each one changes.
| Operator | What it changes | Typical probability |
|---|---|---|
| Weight mutation | Perturbs or replaces connection weights | About 80% of genomes |
| Add connection | Links two previously unconnected nodes | About 5% to 30% |
| Add node | Splits an existing connection with a new neuron | About 3% |
| Crossover | Combines aligned genes of two parents | About 75% of offspring |
| Re-enable gene | Restores a disabled connection | Small, often 25% when inherited disabled |
The add node mutation disables the old connection and inserts two new ones: the incoming link receives weight 1.0 and the outgoing link keeps the old weight. This design keeps the network behavior nearly unchanged at the moment of mutation, which lowers the immediate fitness cost of new structure.
Historical markings and crossover
Historical markings are global innovation numbers assigned whenever a new structural gene appears, and they solve the competing conventions problem. Two networks that compute the same function can have hidden neurons in different orders, so naive crossover between them often produces broken offspring.
During crossover, NEAT aligns genes by innovation number. Genes with the same number are matching genes and are inherited randomly from either parent. Genes that appear in only one parent are disjoint if they fall within the other parent’s range and excess if they lie beyond it; these are usually taken from the fitter parent. Alignment is cheap because no topological analysis is required.
Speciation and protection of innovation
NEAT divides the population into species of structurally similar genomes, so that new topologies compete mainly with each other rather than with mature, well-tuned networks. Without this protection, a freshly added neuron usually lowers fitness and is eliminated before its weights can be optimized.
Similarity is measured by a compatibility distance that combines the number of excess genes, the number of disjoint genes and the average weight difference of matching genes, each scaled by a coefficient. A genome joins the first species whose representative lies below a compatibility threshold. Explicit fitness sharing then divides each individual’s fitness by the size of its species, which prevents one species from taking over the population.
The following table shows parameter values commonly reported in the original experiments and in popular implementations.
| Parameter | Typical value | Effect when increased |
|---|---|---|
| Excess coefficient c1 | 1.0 | Structural differences separate species more |
| Disjoint coefficient c2 | 1.0 | Structural differences separate species more |
| Weight coefficient c3 | 0.4 to 3.0 | Weight differences matter more |
| Compatibility threshold | 3.0 to 4.0 | Fewer, larger species |
| Population size | 150 to several hundred | More diversity, slower generations |
| Stagnation limit | 15 to 20 generations | Stalled species survive longer |
How NEAT compares with related neuroevolution methods
NEAT belongs to the TWEANN family, short for topology and weight evolving artificial neural networks, and it inspired many successors. Choosing among them depends mainly on network size, task structure and whether the problem has geometric regularities.
| Method | What evolves | Best suited for |
|---|---|---|
| NEAT | Weights and topology, direct encoding | Small control and decision networks |
| Fixed-topology neuroevolution | Weights only | Problems with a known suitable architecture |
| HyperNEAT | A pattern generator that paints weights | Large networks with geometric regularity |
| rtNEAT | Weights and topology in real time | Agents evolving during a running simulation |
| CoDeepNEAT | Modules and blueprints of deep networks | Neural architecture search |
Compared with gradient-based training, NEAT does not need differentiable objectives and works well with sparse or delayed rewards, as in reinforcement learning. Its weakness is scale: direct encoding becomes inefficient for networks with millions of weights.
Practical use and known limitations
NEAT performs best on low-dimensional control tasks, such as pole balancing, simple robot locomotion, game agents and evolved controllers for embedded devices. It famously solved the double pole balancing task without velocity information faster than earlier neuroevolution methods. Open-source libraries in Python, C++ and other languages make it easy to apply.
- High-dimensional inputs such as raw images overwhelm direct encoding without feature extraction.
- Parameter sensitivity is real: the compatibility threshold and mutation rates need tuning.
- Deceptive fitness functions can still trap search, which motivated novelty search.
- Evaluation cost dominates runtime, because every genome must be simulated.
Explained without jargon
NEAT is a way to breed small artificial brains instead of designing them by hand. It starts with very simple networks. The best ones get to have offspring. Sometimes an offspring gains a new connection or a new neuron.
New ideas get a fair chance. Networks that look alike are grouped together, so a newcomer competes with similar newcomers first. The key takeaway: NEAT grows complexity only when it helps, so it often finds simple, working solutions.
A typical use case
A small robotics team wants a controller for a two-wheeled balancing robot but has no accurate model of its dynamics. They build a physics simulation, define fitness as the number of seconds the robot stays upright while following a target speed, and run NEAT with a population of 200 and a compatibility threshold of 3.0.
The networks receive four inputs: tilt angle, tilt rate, wheel speed and target speed, and they produce one motor command. After about 120 generations, the best genome balances for the full 60-second trial. It contains only three hidden neurons and 14 active connections, far smaller than the fixed network the team had first tried to train.
The compact network runs comfortably on a microcontroller. The team later adds sensor noise to the simulation and evolves again, which yields a controller that transfers to the physical robot with only minor gain adjustments.