CAX: Cellular Automata Accelerated in JAX
Maxence Faldor, Antoine Cully
TL;DR
CAX addresses the need for a hardware-accelerated, flexible CA framework by delivering a JAX-based library that unifies discrete, continuous, and neural CA across dimensions. Its modular architecture (Perceive/Update) enables rapid experimentation and seamless integration of external inputs, while achieving substantial speedups (up to ~$2{,}000\times$) over prior implementations. The work demonstrates broad applicability through classic models (Elementary CA, Life), continuous CA (Lenia), and neural CA tasks, including three novel experiments and a GPT-4 comparison on 1D-ARC, underscoring the potential for large-scale, reproducible CA research. By coupling high performance with rich documentation and tutorials, CAX lowers barriers to exploration and accelerates advancement in emergent computation and neural CA research.
Abstract
Cellular automata have become a cornerstone for investigating emergence and self-organization across diverse scientific disciplines. However, the absence of a hardware-accelerated cellular automata library limits the exploration of new research directions, hinders collaboration, and impedes reproducibility. In this work, we introduce CAX (Cellular Automata Accelerated in JAX), a high-performance and flexible open-source library designed to accelerate cellular automata research. CAX delivers cutting-edge performance through hardware acceleration while maintaining flexibility through its modular architecture, intuitive API, and support for both discrete and continuous cellular automata in arbitrary dimensions. We demonstrate CAX's performance and flexibility through a wide range of benchmarks and applications. From classic models like elementary cellular automata and Conway's Game of Life to advanced applications such as growing neural cellular automata and self-classifying MNIST digits, CAX speeds up simulations up to 2,000 times faster. Furthermore, we demonstrate CAX's potential to accelerate research by presenting a collection of three novel cellular automata experiments, each implemented in just a few lines of code thanks to the library's modular architecture. Notably, we show that a simple one-dimensional cellular automaton can outperform GPT-4 on the 1D-ARC challenge.
