Carbox: an end-to-end differentiable astrochemical simulation framework
Gijs Vermariën, Tommaso Grassi, Marie Van de Sande, Serena Viti, Stefano Bovino, Alessandro Lupi, Alexander Ruf, Lorenzo Branca, Catherine Walsh
TL;DR
The paper addresses the challenge of modeling complex astrochemical reaction networks with uncertain parameters in the era of JWST/ALMA. It introduces Carbox, an end-to-end differentiable astrochemical simulation framework built on the Jax ecosystem, enabling GPU acceleration and automatic differentiation to facilitate forward and inverse analyses. Key contributions include network parsing with an incidence matrix, a Network/JNetwork abstraction, a Diffrax-based stiff integrator with tight tolerances $a_{tol}=10^{-9}$ and $r_{tol}=10^{-30}$, and benchmarking against the UCLCHEM code on both minimal and extended gas-phase networks. The framework enables uncertainty quantification and sensitivity analysis with respect to rate coefficients $k$ and environmental parameters $oldsymbol{\varphi}$, and demonstrates how varying the cosmic-ray ionization rate $\zeta$ propagates through the chemistry, highlighting nonlinearity and scale when comparing atomic (31 species, 380 reactions) and molecular (161 species, 2227 reactions) networks.
Abstract
Since the first observations of interstellar molecules, astrochemical simulations have been employed to model and understand its formation and destruction path- ways. With the advent of high-resolution telescopes such as JWST and ALMA, the number of detected molecules has increased significantly, thereby creating a need for increasingly complex chemical reaction networks. To model such complex systems, we have developed Carbox, a new astrochemical simulation code that leverages the modern high-performance transformation framework Jax. With Jax enabling computational efficiency and differentiability, Carbox can easily utilize GPU acceleration, be used to study sensitivity and uncertainty, and interface with advances in Scientific Machine Learning. All of these features are crucial for modeling the molecules observed by current and next-generation telescopes.
