MACE: A Machine learning Approach to Chemistry Emulation

S. Maes,F. De Ceuster,M. Van de Sande,L. Decin
2024-05-06
Abstract:The chemistry of an astrophysical environment is closely coupled to its dynamics, the latter often found to be complex. Hence, to properly model these environments a 3D context is necessary. However, solving chemical kinetics within a 3D hydro simulation is computationally infeasible for a even a modest parameter study. In order to develop a feasible 3D hydro-chemical simulation, the classical chemical approach needs to be replaced by a faster alternative. We present mace, a Machine learning Approach to Chemistry Emulation, as a proof-of-concept work on emulating chemistry in a dynamical environment. Using the context of AGB outflows, we have developed an architecture that combines the use of an autoencoder (to reduce the dimensionality of the chemical network) and a set of latent ordinary differential equations (that are solved to perform the temporal evolution of the reduced features). Training this architecture with an integrated scheme makes it possible to successfully reproduce a full chemical pathway in a dynamical environment. mace outperforms its classical analogue on average by a factor 26. Furthermore, its efficient implementation in PyTorch results in a sub-linear scaling with respect to the number of hydrodynamical simulation particles.
Computational Physics,Astrophysics of Galaxies,Instrumentation and Methods for Astrophysics,Solar and Stellar Astrophysics
What problem does this paper attempt to address?
This paper explores a key issue in astrochemistry, which is how to efficiently simulate chemical reactions in a three-dimensional dynamic environment. Traditional chemical kinetics models are computationally expensive in three-dimensional fluid dynamics simulations, limiting the range of parameter studies. To address this problem, the paper proposes a method called MACE (Machine learning Approach to Chemistry Emulation), which is a machine learning-driven strategy for chemical simulation. MACE combines autoencoders and a set of latent variable ordinary differential equations (ODEs) to reduce the dimensionality of chemical networks and track their evolution over time. Through a training ensemble approach, MACE is able to successfully reproduce chemical pathways in dynamic environments with an average performance 26 times faster than traditional methods. Furthermore, the efficient implementation of MACE in PyTorch enables sublinear growth in the number of particles for fluid dynamic simulations. The paper focuses on the circumstellar envelopes (CSEs) of asymptotic giant branch (AGB) stars as the research environment, where chemical reactions are rich and dynamics are complex. The authors point out that due to the expansion of CSEs, the chemical composition never reaches an equilibrium state, so a chemical kinetics model is needed to describe the time-varying abundance of species. The goal of MACE is to create an alternative model that can handle the chemical evolution under dynamic physical conditions. By reducing computational cost and utilizing machine learning techniques, MACE aims to accelerate computation while maintaining predictive accuracy. Although the current work primarily focuses on simulating chemical evolution in static physical environments, the design of MACE allows it to adapt to time-varying physical parameters, making it more applicable to realistic astrophysical environments. The structure of the paper includes an introduction to the basic concepts of chemical kinetics, the architecture of MACE, training methods, result analysis, and a discussion on future improvements. Through comparisons with existing methods and applications in AGB star CSEs, MACE demonstrates a promising approach to overcome the computational challenges of three-dimensional chemical-fluid dynamics simulations.