Enabling Population-Level Parallelism in Tree-Based Genetic Programming for GPU Acceleration

Lishuang Wang, Zhihong Wu, Kebin Sun, Zhuozhao Li, Ran Cheng · DOI

TL;DR

This paper introduces EvoGP, a novel framework that significantly accelerates Tree-based Genetic Programming (TGP) by leveraging GPU parallelism. EvoGP tackles the inherent complexity of TGP by using a tensorized representation for program structures and an adaptive parallelism strategy, achieving massive speedups and enabling TGP for larger, more complex problems.

What Problem Does This Paper Address?

Genetic Programming (GP), particularly Tree-based GP (TGP), is a powerful technique for evolving human-interpretable computer programs for tasks like symbolic regression, classification, and robotics. However, TGP is computationally intensive, making it slow for large datasets and complex problems. Existing GPU acceleration efforts face challenges due to the variable structure of TGP individuals, the difficulty of integrating different parallelism levels (intra-individual and inter-individual), and the friction between high-performance CUDA and flexible Python environments. This limits TGP's applicability to real-world, large-scale scenarios.

Methods

EvoGP addresses these challenges with three key innovations:

  1. Tensorized Representation: TGP individuals (trees) are converted into fixed-size, memory-aligned tensors. This "tensorization" allows for efficient, uniform memory access and parallel processing across an entire population of diverse trees, overcoming the structural heterogeneity issue.
  2. Adaptive Parallelism Strategy: EvoGP dynamically switches between two parallelism modes for fitness evaluation:
  3. Hybrid Parallelism: Combines data-level and population-level parallelism for smaller datasets to maximize GPU utilization.
  4. Data Parallelism: Uses pure data-level parallelism for larger datasets, leveraging constant memory for faster access. This switch is automated based on dataset size.
  5. Seamless Python Integration: Custom CUDA kernels are embedded directly into the PyTorch runtime. This allows EvoGP to integrate effortlessly with popular Python-based environments like Gym, MuJoCo, Brax, and Genesis, offering high performance without sacrificing development flexibility.

Datasets

The paper evaluates EvoGP on various datasets across different domains:

  • Symbolic Regression: Pagie polynomial (used for benchmarking against TensorGP), Daily Demand Forecasting, Auto MPG, California Housing, and Feynman I.9.18.
  • Classification: Wine, Chronic Kidney Disease, Breast Cancer Wisconsin, and Yeast datasets from the UCI repository.
  • Robotics Control: Swimmer, Hopper, Walker2d, and HalfCheetah environments from the Brax framework.

Key Insights and Ideas

  • Tensorization is Key: The core breakthrough is representing variable-sized TGP trees as uniform tensors. This is crucial for unlocking efficient GPU parallelism, as GPUs thrive on structured, contiguous data.
  • Adaptive Parallelism Pays Off: Dynamically choosing between hybrid and data parallelism based on dataset size is critical for maintaining high GPU utilization across a wide range of problem scales. This avoids under-utilization on small datasets and maximizes efficiency on large ones.
  • Python + CUDA = Power: Integrating custom CUDA kernels into PyTorch is a smart move, bridging the gap between high-performance computing and the ease of use of Python for researchers and developers.
  • Scalability is Not a Bottleneck: EvoGP's design allows for significantly larger populations without a proportional increase in computation time, leading to better solutions and demonstrating true scalability.

Key Results

  • Massive Speedups: EvoGP achieves a peak throughput exceeding $10^{11}$ GPops/s. It demonstrates speedups of up to 304x compared to existing GPU-based TGP implementations (like SRGPU) and 18x compared to state-of-the-art CPU-based libraries (like Operon).
  • Comparable Accuracy: Despite the significant performance gains, EvoGP maintains comparable accuracy to other methods across various tasks.
  • Improved Scalability: EvoGP shows excellent scalability with large population sizes, leading to better performance in symbolic regression, classification, and robotics control tasks. For instance, increasing population size in robotics control tasks led to significantly higher cumulative rewards.

Limitations and Future Work

  • Limitations: The paper notes that TensorGP's support for custom datasets was limited, which is why it wasn't included in the main comparisons. The adaptive parallelism threshold is determined empirically and could potentially be further optimized.
  • Future Work: The authors plan to extend EvoGP to support more complex and diverse applications. They aim to explore more advanced strategies for multi-output tasks to enhance expressiveness and generalizability, envisioning EvoGP as a robust framework for advancing interpretable and evolutionary AI.

Summary updated

Abstract

Tree-based Genetic Programming (TGP) is a widely used evolutionary algorithm for tasks such as symbolic regression, classification, and robotic control. Due to the intensive computational demands of running TGP, GPU acceleration is crucial for achieving scalable performance. However, efficient GPU-based execution of TGP remains challenging, primarily due to three core issues: (1) the structural heterogeneity of program individuals, (2) the complexity of integrating multiple levels of parallelism, and (3) the incompatibility between high-performance CUDA execution and flexible Python-based environments. To address these issues, we propose EvoGP, a high-performance framework tailored for GPU acceleration of TGP via population-level parallel execution. First, EvoGP introduces a tensorized representation that encodes variable-sized trees into fixed-shape, memory-aligned arrays, enabling uniform memory access and parallel computation across diverse individuals. Second, EvoGP adopts an adaptive parallelism strategy that dynamically combines intra- and inter-individual parallelism based on dataset size, ensuring high GPU utilization across a broad spectrum of tasks. Third, EvoGP embeds custom CUDA kernels into the PyTorch runtime, achieving seamless integration with Python-based environments such as Gym, MuJoCo, Brax, and Genesis. Experimental results demonstrate that EvoGP achieves a peak throughput exceeding $10^{11}$ GPops/s. Specifically, this performance represents a speedup of up to $304\times$ over existing GPU-based TGP implementations and $18\times$ over state-of-the-art CPU-based libraries. Furthermore, EvoGP maintains comparable accuracy and exhibits improved scalability across large population sizes. EvoGP is open source and accessible at: https://github.com/EMI-Group/evogp.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
HalfCheetahEvoGPCumulative Reward5781.2population_size=200
Source quote
L579: \quad Halfcheetah │ 5781.2 │ 11954.0 │ 13862.9
HalfCheetahEvoGPCumulative Reward13862.9population_size=5000
Source quote
L579: \quad Halfcheetah │ 5781.2 │ 11954.0 │ 13862.9
BibTeX
@misc{wang2025enabling,
  author = {Lishuang Wang and Zhihong Wu and Kebin Sun and Zhuozhao Li and Ran Cheng},
  title = {{Enabling Population-Level Parallelism in Tree-Based Genetic Programming for GPU Acceleration}},
  year = {2025},
  eprint = {2501.17168},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.17168},
}

Loading related content...

Figure