TensorNEAT: A GPU-accelerated Library for NeuroEvolution of Augmenting Topologies
Lishuang Wang, Mengfei Zhao, Enyu Liu, Kebin Sun, Ran Cheng
TL;DR
TensorNEAT addresses NEAT’s scalability bottlenecks by introducing a tensorization strategy that encodes heterogeneous networks as fixed-shape tensors and leverages JAX-based GPU/TPU acceleration to parallelize evolutionary operations across populations. The approach enables full GPU-accelerated NEAT (including CPPN and HyperNEAT) with seamless integration to Gym, Brax, and gymnax, yielding up to 500x speedups over NEAT-Python. Key contributions include the tensorized encoding/operations, two-stage tensorized inference, multi-GPU support, visualization tools, and a comprehensive benchmark suite. This work significantly improves the practicality of large-scale neuroevolution for robotics and control tasks, and outlines a path toward distributed deployment and incorporation of additional NEAT variants.
Abstract
The NeuroEvolution of Augmenting Topologies (NEAT) algorithm has received considerable recognition in the field of neuroevolution. Its effectiveness is derived from initiating with simple networks and incrementally evolving both their topologies and weights. Although its capability across various challenges is evident, the algorithm's computational efficiency remains an impediment, limiting its scalability potential. To address these limitations, this paper introduces TensorNEAT, a GPU-accelerated library that applies tensorization to the NEAT algorithm. Tensorization reformulates NEAT's diverse network topologies and operations into uniformly shaped tensors, enabling efficient parallel execution across entire populations. TensorNEAT is built upon JAX, leveraging automatic function vectorization and hardware acceleration to significantly enhance computational efficiency. In addition to NEAT, the library supports variants such as CPPN and HyperNEAT, and integrates with benchmark environments like Gym, Brax, and gymnax. Experimental evaluations across various robotic control environments in Brax demonstrate that TensorNEAT delivers up to 500x speedups compared to existing implementations, such as NEAT-Python. The source code for TensorNEAT is publicly available at: https://github.com/EMI-Group/tensorneat.
