Skip to content

Commit

Permalink
Changing latex
Browse files Browse the repository at this point in the history
  • Loading branch information
silkemaes committed Jun 10, 2024
1 parent e2015fa commit 09f74cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions paper.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: 'MACE: a Machine learning Approach to Chemistry Emulation'
title: 'MACE: a Machine-learning Approach to Chemistry Emulation'
tags:
- Python
- astrophysics
Expand Down Expand Up @@ -41,7 +41,7 @@ aas-journal: Astrophysical Journal
# Summary
Astrochemistry is the study of chemical species in astrophysical objects. By combining observations and theoretical predictions, the physical conditions of the object can be analysed as well as its chemical composition and yields, since chemistry is closely coupled to the dynamics of the environment. Most often, such astrophysical environments are known to be complex and out of thermodynamic equilibrium. For that reason, the chemical evolution is usually modelled using the chemical kinetics approach, in which a set of non-linear coupled ordinary different equations (ODEs) is solved for a given network of chemical species and reactions. For large chemical networks, however, this method is computationally slow. Therefore, we developed MACE, *a Machine-learning Approach to Chemistry Emulation*, inspired on similar work in the literature (e.g., @Holdship2021; @Grassi2022; @Sulzer2023). MACE is a PyTorch module that offers a trainable surrogate model that is able to emulate chemical kinetics in a shorter computation time than its classical analogue. More specifically, it provides a machine learning architecture, consisting of an autoencoder and a trainable ODE, implemented in PyTorch and [torchode](https://github.com/martenlienen/torchode) [@torchode]. Mathematically, MACE is give by

$$ \hat{\textit{\textbf{n}}}(t) = \mathcal{D}\Big( G \big( \mathcal{E} (\boldsymbol{n}, \boldsymbol{p}),t \big) \Big), $$
$$ \hat{\textbf{\textit{n}}}(t) = \mathcal{D}\Big( G \big( \mathcal{E} (\\textit{\textbf{n}}, \\textit{\textbf{p}}),t \big) \Big), $$

where $\hat{\boldsymbol{n}}(t)$ represents the predicted chemical abundances at time $t$. A schematic representation of the architecture and flow of the emulator is shown in Fig. \ref{fig:MACE}. MACE is developed in the context of circumstellar envelopes (CSEs) of evolved stars, but is flexible to be retrained on data of other astrophysical environments.

Expand All @@ -62,7 +62,7 @@ $$ {\rm error} = \frac{\log_{10}\boldsymbol{n}-\log_{10}\hat{\boldsymbol{n}}}{\l
which is executed element-wise and subsequently summed over the different chemical species. More details on the accuracy of the MACE models can be found in @Maes2024. Fig. \ref{fig:int4} shows the abundance profiles of seven chemical species, where the full curves indicate the MACE test of model *int4* from @Maes2024, and the dashed curves give the result for the classical model. On average, the MACE routine provides a speed-up of a factor 26, not taking into account the potential extra speed-up factor due to efficient vectorisation when coupling MACE with an SPH hydrodynamical model.


![Chemical abundance profiles from a test of trained MACE model model *int4* (full curves), compared to the classical model (dashed curves). More details in @Maes2024. \label{fig:int4}](int4_example.png){ width=60% }
![Chemical abundance profiles from a test of trained MACE model model *int4* (full curves), compared to the classical model (dashed curves). More details in @Maes2024. \label{fig:int4}](int4_example.png){ width=7x0% }

# Code availability
The code of MACE is publicly available in a GitHub repository: [https://github.com/silkemaes/MACE](https://github.com/silkemaes/MACE).
Expand Down

0 comments on commit 09f74cf

Please sign in to comment.