- Introduced by
- Kenneth Stanley & Risto Miikkulainen
- Year
- 2002
- Type
- Neuroevolutionary algorithm
- Family
- Neuroevolution
What does it do?
NEAT (NeuroEvolution of Augmenting Topologies) is a neuroevolution method introduced by Kenneth Stanley and Risto Miikkulainen in 2002.
Unlike methods that evolve only connection weights for a fixed network structure, NEAT evolves both the topology and the weights of neural networks. It uses a direct genome encoding with historical markings, which allow crossover between networks with different structures, and it begins from minimal networks that grow only when added structure is useful.
The intuition behind the method
Imagine starting with the simplest possible neural network, with a few inputs connected directly to outputs, and letting evolution add neurons and connections where they improve performance. Rather than searching over a fixed architecture, the network grows over generations. Speciation shields structurally new genomes from immediate competition with established topologies, so a new mutation has time to have its weights tuned before it is judged against more mature networks.
History
Stanley and Miikkulainen published NEAT in Evolutionary Computation in 2002. Earlier neuroevolution approaches typically fixed the network topology and evolved only the weights, and the 2002 paper reports that NEAT outperformed the best fixed-topology method on a challenging benchmark reinforcement learning task. The authors attribute this to principled crossover of different topologies, speciation, and incremental growth from minimal structure.
When to use it
NEAT is suited to problems where the network structure is not known in advance and where a fitness value can be obtained from simulation or interaction with an environment, as in reinforcement learning and sequential control. It does not require gradients of the fitness function. Its use is more questionable when the network architecture is already well understood, or when labelled data are abundant and gradient-based training of a fixed architecture is practical. Because its scalability to high-dimensional inputs is limited (see limitations), it is a weaker choice for problems with very large input spaces. Neural architecture search methods that rely on gradient-based optimisation may be preferable when such methods are feasible for the problem.
Limitations and considerations
- Each fitness evaluation may require a full environment rollout, so the total number of evaluations can be large; the sample cost should be compared with alternatives for the specific problem.
- Scalability declines as input dimensionality grows, since the number of possible connections grows quickly with the number of nodes.
- The compatibility threshold, mutation probabilities and species stagnation limit must be tuned for each problem, and the best values are problem-specific.
- Crossover between strongly diverged genomes can still produce non-functional offspring, because matching innovation numbers do not guarantee that the aligned structures are functionally compatible.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Evolves network topology and connection weights together, so the architecture does not have to be specified by hand.
- Historical markings give a principled way to cross over networks with different structures. The original paper identifies this crossover, speciation and incremental growth as three components, and its ablation studies show that each is necessary.
- Speciation protects structural innovation, giving new topologies time to develop before they compete with established ones.
- Starting from minimal structure and growing incrementally is one of the three components the original paper credits for its efficiency, and it keeps the early search in a small space.
Applications
- Evolving controllers for control tasks in reinforcement learning benchmarks, the setting in which the 2002 paper evaluates NEAT.
- Searching for small network architectures for control problems where gradient information is unavailable.
How it works
How it works
Each network is stored as a genome of node genes and connection genes. Each connection gene carries an innovation number, a global counter assigned when a given structural mutation first appears. Because genes are matched by these numbers during crossover, genomes with different topologies can be aligned, and offspring inherit corresponding structure from both parents instead of arbitrarily mismatched parts.
Formula
G = (N, C),\quad C = \{(i, o, w, e, \text{innov})\}Genomes are grouped into species using the compatibility distance δ = c₁E/N + c₂D/N + c₃W̄, where E is the number of excess genes, D the number of disjoint genes, W̄ the average weight difference of matching genes, and N a normalising gene count. Two genomes fall in the same species when δ is below the threshold δ_t. This grouping lets structurally novel genomes compete mainly with similar genomes, rather than with the whole population.
Formula
\delta = \frac{c_1 E}{N} + \frac{c_2 D}{N} + c_3 \overline{W}Fitness sharing is a general niching principle: a genome's raw fitness is discounted according to how many similar genomes are present, so genomes in crowded regions of the search space receive a lower shared fitness. In NEAT, the original paper attributes the protection of structural innovation to speciation, described above, which lets new topologies compete mainly with similar genomes. Offspring allocation to species is a separate step, in which a species that stagnates for a configurable number of generations can be removed.
Formula
f'_i = \frac{f_i}{\sum_{j=1}^{n} sh(\delta(i,j))},\quad sh(\delta) = \begin{cases} 1 & \delta < \delta_t \\ 0 & \text{otherwise} \end{cases}Two structural mutations extend the topology. An 'add node' mutation splits an existing connection: the incoming connection to the new node receives weight 1 and the outgoing connection inherits the original weight, which keeps the initial effect on the network's behaviour small. An 'add connection' mutation links two nodes that were not previously connected. The mutations occur with probabilities p_n and p_c. The initial weights of new connections are drawn at random; a uniform distribution over a fixed interval is a common implementation choice, and the interval from −1 to 1 is one such choice.
Formula
P(\text{add node}) = p_n,\quad P(\text{add connection}) = p_c,\quad w \sim \mathcal{U}(-1, 1)Common pitfalls
- Setting the compatibility threshold δ_t too loosely places nearly all genomes in one species, which removes the protective effect of speciation.
- Setting the stagnation limit too short can eliminate a species before its newly added structure has had time to be optimised.
- Using a population that is small relative to the search space reduces diversity, which can cause stagnation instead of gradual growth in complexity.
- NEAT optimises the supplied fitness function exactly. A poorly designed fitness signal can produce networks that are structurally complex but do not perform the intended behaviour.
Frequently asked questions
How does NEAT avoid the competing conventions problem in crossover?
NEAT assigns a unique global innovation number to each new structural gene the first time it appears. When crossing two genomes of different topology, genes with matching innovation numbers are aligned and exchanged, while non-matching genes are inherited from the more fit parent. This means that structures with a shared origin are generally crossed together rather than misaligned. The original paper presents this as a principled crossover method; it does not guarantee that every offspring is functional.
Why does NEAT start with minimal networks rather than random ones?
NEAT starts from minimal networks and adds nodes and connections over generations. The original paper credits incremental growth from minimal structure, together with speciation and principled crossover, for its efficiency, and its ablation studies show that each component is needed. Starting small also keeps the early search in a compact space, with additional structure entering the population only through mutation and retention by selection.
When should I prefer NEAT over a modern neural architecture search method?
NEAT is worth considering when task feedback is non-differentiable or available only as a scalar reward from environment interaction, and when a compact network is expected to suffice. Many modern NAS methods rely on differentiable relaxations or on substantial computation, which may not be available or applicable. Where gradient information is unavailable, as in black-box simulation or physical hardware rollouts, an evolutionary method such as NEAT is one option, although its sample cost should be assessed for the specific problem.
Related methods
Sources
Stanley, K. O., & Miikkulainen, R. (2002). Evolving neural networks through augmenting topologies. Evolutionary Computation, 10(2), 99–127.
Open DOI reference