ChromaX: a fast and scalable breeding program simulator

Omar G. Younis, Matteo Turchetta, Daniel Ariza Suarez, Steven Yates, Bruno Studer, Ioannis N. Athanasiadis, Andreas Krause, Joachim M. Buhmann, Luca Corinzia

Abstract

ChromaX is a Python library that enables the simulation of genetic recombination, genomic estimated breeding value calculations, and selection processes. By utilizing GPU processing, it can perform these simulations up to two orders of magnitude faster than existing tools with standard hardware. This offers breeders and scientists new opportunities to simulate genetic gain and optimize breeding schemes. The documentation is available at https://chromax.readthedocs.io and the code at https://github.com/kora-labs/chromax.

The Computational Bottleneck in Modern Breeding

Developing new plant and animal breeds is a slow, multi-year process. To accelerate this, breeders use simulations to predict "genetic gain"—the improvement of a population over generations. However, modern breeding often involves thousands of individuals and complex "diallel" crosses, leading to an exponential explosion in data.

Existing simulation tools, primarily written in R or Julia, are feature-rich but struggle to scale. They generally run on CPUs and do not exploit the massive parallelism offered by modern hardware like GPUs and TPUs. This creates a bottleneck: researchers often have to simplify their models or wait days for results, hindering the systematic exploration of optimal breeding strategies.

ChromaX: Leveraging JAX and GPU Acceleration

To address these limitations, the authors developed ChromaX, a library built on top of JAX, a high-performance numerical computing framework. Key technical innovations include:

  • XLA Compilation: ChromaX functions are compiled using Accelerated Linear Algebra (XLA), which optimizes code for specific hardware (CPU, GPU, or TPU).
  • Tensor Operations: Genetic data is represented as multi-dimensional arrays. Calculating Genomic Estimated Breeding Values (GEBV) is treated as a tensor contraction, an operation at which GPUs excel.
  • Stochastic Simulation: It models genetic recombination using the Poisson model for crossover interference and handles doubled haploid induction.
  • Differentiable Recombination: In a novel twist, the authors implemented a "differentiable" version of genetic recombination. By using JAX’s automatic differentiation, researchers can calculate the analytical gradient of a cross with respect to parental weights, enabling gradient-based optimization to find the "perfect" cross.

Performance Benchmarks and Validation

ChromaX was evaluated against AlphaSimR, the current industry standard. The benchmarks included simulating up to 100k biparental crosses and a full-scale breeding program based on a schema by Gaynor et al. (2020).

Comparison of genetic value distributions between ChromaX and AlphaSimR across breeding program phases.

As shown in the violin plots above, ChromaX produces genetic value distributions that are statistically consistent with AlphaSimR, validating its accuracy as a simulator while providing significant performance benefits.

Key Results

The performance gains are substantial, particularly as the complexity of the simulation increases:

  • Raw Speed: On a standard GPU (Quadro RTX 6000), ChromaX simulated 100,000 crosses in just 29 milliseconds. For comparison, AlphaSimR on a high-end CPU took 14.8 seconds for the same task.
  • System-wide Speedup: In a full breeding program simulation, ChromaX on a GPU achieved roughly a 500x speedup over AlphaSimR.
  • Sub-linear Scaling: On a GPU, the time taken to simulate crosses doesn't increase linearly. Simulating 100x more crosses only takes about 10x more time, making it ideal for large-scale breeding programs.
Execution time (ms) for varying numbers of crosses across different hardware configurations.

Limitations and Future Work

While powerful, ChromaX is currently in version 1.0 with some constraints. It requires users to provide an existing genetic linkage map and marker effects. Currently, it focuses on additive traits and does not yet model dominance or epistasis. Furthermore, it is optimized for self-pollinated or open-pollinated species, with support for hybrid breeding systems planned for future releases. Addressing these biological complexities is the next step toward making ChromaX a universal tool for the breeding community.

Summary updated

BibTeX
@article{younis2023chromax,
  author = {Omar G. Younis and Matteo Turchetta and Daniel Ariza Suarez and Steven Yates and Bruno Studer and Ioannis N. Athanasiadis and Andreas Krause and Joachim M. Buhmann and Luca Corinzia},
  title = {{ChromaX: a fast and scalable breeding program simulator}},
  journal = {Bioinformatics},
  year = {2023},
  doi = {10.1093/bioinformatics/btad691},
}
Figure