MACE

Welcome to the documentation of MACE!

About

MACE, a Machine-learning Approach to Chemistry Emulation, by Maes et al. (2024), is a surrogate model for chemical kinetics. It is developed in the contexts of circumstellar envelopes (CSEs) of asymptotic giant branch (AGB) stars, i.e. evolved low-mass stars.

During development, the chemical models of Maes et al. (2023) are used. In this paper you can also find more details about the astrochemical environment used.

MACE is implemented in Python and uses PyTorch, together with torchode (Lienen & Gunnemann, 2022), to be trained.

The architecture of MACE is schematically given as

_images/MACE.png

MACE offers a surrogate model that emulates the evolution of chemical abundances over time in a dynamical physical environment. As the name states, it makes use of machine learning techniques. More specifically, combining an autoencoder (blue) and a trainable ordinary differential equation (ODE) (red) allows to accurately emulate a chemical kinetics model.

In formula, MACE is stated as

\[{\hat{\boldsymbol{n}}}(t) = \mathcal{D}\Big( G \big( \mathcal{E} ({\boldsymbol{n}}, {\boldsymbol{p}}),t \big) \Big).\]

Here, \({\hat{\boldsymbol{n}}}(t)\) are the predicted chemical abundances at a time $t$ later dan the initial state \({\boldsymbol{n}}\). \(\mathcal{E}\) and \(\mathcal{D}\) represent the autoecoder, with the encoder and decoder, respectively. The autoencoder maps the chemical space \({\boldsymbol{n}}\) together with the physical space \({\boldsymbol{p}}\) to a lower dimensional representation \(\boldsymbol{z}\), called the latent space. The function $G$ describes the evolution in latent space such that \(\boldsymbol{z}(\Delta t) = G(\boldsymbol{z}, \Delta t)=\int_0^{\Delta t} g(\boldsymbol{z}){\rm d}t\).

For more details, check out our paper: Maes et al. (2024).

Note

Required packages:

  • torch

  • torchode

  • numpy

  • matplotlib

  • natsort

  • tqdm

  • scipy

Developers & contributions

Developers:

  • Silke Maes

  • Frederik De Ceuster

Scientific & technical advisors:

  • Marie Van de Sande

  • Leen Decin

Contributors:

  • Steven Rieder

> Feel free to contribute to MACE via pull requests and discussions!

Acknowledgements

The MACE architecture is free to use. Please cite our paper Maes et al. (2024).

Contact

If any comments or issues come up, please contact Silke Maes, or set up an issue on GitHub.