HyperNEAT

On this page 7

HyperNEAT, short for Hypercube-based NeuroEvolution of Augmenting Topologies, is a neuroevolution method in evolutionary computation that evolves a small network called a compositional pattern producing network (CPPN) and uses it to generate the connection weights of a much larger neural network. Introduced in 2009 by Kenneth Stanley, David D’Ambrosio and Jason Gauci, it extends NEAT from a direct encoding to an indirect, geometry-aware encoding.

The key insight is that neurons can be given coordinates in space, so connectivity becomes a function of geometry. Because one compact CPPN describes millions of potential connections, HyperNEAT can produce large networks with symmetry, repetition and regularity that resemble the organized connectivity of biological brains, while the evolutionary search stays in a small genotype space.

How HyperNEAT generates a network

HyperNEAT separates the evolved genome from the network that solves the task. The genome is a CPPN evolved by standard NEAT, while the task network, called the substrate, is a fixed arrangement of neurons placed at coordinates chosen by the designer.

  1. The designer places input, hidden and output neurons on a geometric substrate, for example a two-dimensional grid.
  2. For every candidate connection, the CPPN receives the coordinates of both endpoints, such as (x1, y1, x2, y2).
  3. The CPPN output becomes the connection weight; outputs below a magnitude threshold, often around 0.2, mean no connection.
  4. The resulting substrate network is evaluated on the task, and its score becomes the fitness of the CPPN.

The name comes from this querying step: a connection between two points in a two-dimensional plane is a point in a four-dimensional hypercube, and the CPPN paints a pattern of weights across that hypercube.

Weights that pass the threshold are usually rescaled to a fixed range, for example from 0.2 to 3.0 in magnitude, while the sign of the CPPN output keeps the connection excitatory or inhibitory. Because the substrate is rebuilt from the CPPN for every evaluation, the genotype-phenotype mapping is deterministic: the same CPPN always yields the same network, which keeps fitness comparisons fair across the population.

This mapping also explains why HyperNEAT copes with high-dimensional inputs such as raw pixel grids. A direct encoding would need one gene per link, whereas the CPPN may contain only a few dozen nodes and links even when the substrate holds hundreds of thousands of connections.

The CPPN and its activation functions

A CPPN resembles a neural network but uses a diverse set of activation functions, each of which contributes a particular kind of regularity to the weight pattern. NEAT adds nodes and links to the CPPN over generations, a process known as complexification, so patterns begin simple and gain detail.

FunctionRegularity producedTypical effect on the substrate
GaussianSymmetryMirror-image connectivity around an axis
SineRepetitionPeriodic motifs, useful for repeated legs or segments
SigmoidSmooth gradientsGradual weight change across space
Absolute valueSymmetry with sharp foldsPatterns reflected about a boundary
LinearSimple trendsBias by distance or position
Common CPPN activation functions and their effect

CPPNs often receive extra inputs such as the distance between endpoints or a bias term. These inputs make locality easy to express, so nearby neurons can be connected more strongly than distant ones.

HyperNEAT sits within a family of methods that evolve neural networks, and its main distinction is the indirect encoding with geometry. The following table contrasts it with its parent algorithm and its best-known extension.

MethodEncodingNetwork sizeWho defines hidden neurons
NEATDirect: one gene per connectionSmall to mediumEvolution adds them
HyperNEATIndirect: CPPN paints weightsLarge, thousands to millions of linksThe designer fixes the substrate
ES-HyperNEATIndirect with evolvable substrateLarge and adaptiveDerived from CPPN information density
Comparison of NEAT, HyperNEAT and ES-HyperNEAT

ES-HyperNEAT, proposed in 2012, uses a quadtree search over the CPPN output to place hidden neurons where the weight pattern contains the most information. Another variant, HyperNEAT-LEO, adds a separate link expression output so that the CPPN decides whether a connection exists independently of its weight.

Designing the substrate

Substrate design is where domain knowledge enters HyperNEAT, and it has a decisive effect on performance. Inputs should be placed so that spatially related sensors are geometrically close, which lets the CPPN exploit the task’s geometry.

ConfigurationBest suited toReason
Two-layer gridReactive visual or board tasksMaps sensor layout directly to actions
Three-layer gridTasks needing intermediate featuresHidden plane learns local feature detectors
Circular layoutRobots with radial sensorsPreserves angular relationships
Multi-sheet substrateMultiple input types or legsSeparate planes per module, shared pattern
Substrate configurations and when to use them

A practical rule is to match substrate geometry to the problem: a checkers board maps to an 8 by 8 grid and a quadruped maps to four leg modules. A poorly chosen layout removes the very regularities that make HyperNEAT effective.

Strengths and limitations

HyperNEAT excels on problems with strong geometric regularity, such as legged locomotion, board games and visual discrimination, and it can scale a trained solution by querying the same CPPN at a higher substrate resolution without further evolution.

  • Bias toward regularity: irregular, fine-grained exceptions are hard to express, so performance can drop on tasks that need them.
  • Manual substrate design: neuron placement must be chosen by hand unless ES-HyperNEAT is used.
  • Evaluation cost: every fitness evaluation requires building and running a large network.
  • Competition from gradient methods: for many supervised tasks, backpropagation trains comparable networks far faster.

Researchers addressed the regularity bias with hybrids such as HybrID, which switches from indirect to direct encoding late in evolution to refine individual weights.

Explained without jargon

Imagine building a huge brain-like network by hand. Setting every connection one by one would take forever. HyperNEAT takes a shortcut. It evolves a small recipe instead of the whole network.

The recipe is a tiny network that looks at where two neurons sit and says how strongly they should connect. Because it works from positions in space, it naturally creates patterns, like a left side that mirrors the right side. The main idea is that a short recipe can describe a large, orderly network, much like a knitting pattern describes a whole sweater.

A typical use case

A robotics research group wants a four-legged walking robot to learn a stable gait in simulation. Instead of evolving every weight of a controller with several thousand connections, the team arranges the controller as four leg modules on a shared substrate, with joint angle sensors as inputs and motor commands as outputs.

HyperNEAT evolves a CPPN over about 1,000 generations with a population of 150. Because a sine function enters the CPPN early, the controller develops coordinated, rhythmic leg movements, and the Gaussian nodes keep the left and right sides symmetric. Fitness is the distance traveled in 15 simulated seconds without falling.

The final gait walks noticeably farther and more smoothly than a controller evolved with direct encoding under the same evaluation budget. The team also reuses the CPPN on a robot with denser sensors simply by querying it at higher resolution.