betaFeedback

WorksPhysics and Astronomy

A COMPASS to the Galaxy: Joint nucleosynthetic yield set comparison and parameter inference in Galactic chemical evolution

Abstract

Galactic Chemical Evolution (GCE) models connect stellar nucleosynthesis to observed abundance patterns, but their interpretation requires simultaneous parameter inference and comparison between competing stellar yield prescriptions. This remains challenging due to intractable likelihoods and growing dataset complexity. Using compass, a novel simulation-based inference framework, we perform, for the first time, amortized joint Bayesian model comparison and parameter inference for GCE models with intractable likelihoods within a unified architecture. Compass employs a conditional score-based diffusion model with a transformer architecture to learn both the posterior and likelihood directly from forward simulations, enabling efficient inference and likelihood-based ranking of competing nucleosynthetic yield sets. In controlled tests, compass identifies the generating yield set and recovers ground-truth parameters with accuracy comparable to existing simulation-based inference (SBI) methods, while reducing computational cost by orders of magnitude. Applied to Milky Way data, the framework favors a hybrid NuGrid + IllustrisTNG yield prescription, confirmed by an independent classifier, and infers an initial mass function slope of αIMF=−2.65±0.02α_{\rm IMF} = -2.65 \pm 0.02 and a SNIa_{\rm Ia} normalization of log⁡(NIa)=−2.81±0.02\log(N_{\rm Ia}) = -2.81 \pm 0.02, with a systematic spread of ≈0.3\approx 0.3 in αIMFα_{\rm IMF} between the best-ranked yield sets, consistent with independent constraints. The attention mechanism confirms that the inferred parameters are driven by physically meaningful abundance signatures. By unifying amortized parameter inference, Bayesian model comparison, and interpretability in a single probabilistic framework, compass provides a scalable approach for precision chemical evolution studies with current and forthcoming spectroscopic surveys.

Introduction

Understanding the chemical enrichment of galaxies is central to reconstructing their formation and evolution. Stellar abundance patterns encode information about key physical ingredients of Galactic Chemical Evolution (GCE), including the high-mass slope of the stellar initial mass function (IMF), the normalization and delay-time distribution of Type Ia supernovae (SNe Ia), and the nucleosynthetic yields of stars. These parameters regulate the production of heavy elements (e.g., [110, 126, 89]), stellar feedback (e.g. [2]), and the temporal build-up of chemical abundances (e.g. [68]), and are therefore essential inputs for hydrodynamical simulations of galaxy formation (e.g., [115, 60, 18, 20, 45, 3] (Pillepich et al. 2017)) and for Galactic Archaeology studies of the Milky Way to inform inferences of the time evolution of the chemical abundances across the Milky Way disk (e.g. [108, 107, 134]), of birth radii of stars in the Milky Way (e.g. Lu et al. 2022, 2024) or identification of accreted stars (e.g. [26, 24, 23]).

Despite decades of work, fundamental uncertainties remain. The shape and potential non-universality of the IMF ([15]), the relative contributions of different supernova channels and stellar winds ([87]), the progenitors and delay-time distributions of SNe Ia ([81]), and the choice of nucleosynthetic yield tables all introduce substantial degeneracies in GCE modeling. For instance, various studies have suggested that the high-mass slope of the IMF may be steeper than canonical values (e.g., [137, 112, 30]), and may itself vary as a function of metallicity, introducing further complexity (e.g. [54, 85]). Similarly, the normalization and delay-time distribution of SNe Ia, which are crucial for the enrichment of iron-peak elements, are still heavily debated [84, 82, 62, 22].

Furthermore, different stellar evolution calculations predict markedly different element production rates (e.g. [111, 68]), leading to systematic variations in predicted abundance patterns. Recent studies have shown that no single commonly adopted yield set can simultaneously reproduce the observed chemical abundances across different galactic environments (e.g. [68, 22, 74]). Hence, the dominant source of systematic uncertainty in GCE modeling is not only parameter values, but the choice of nucleosynthetic prescriptions themselves. This underscores the need for principled methods to discriminate between competing physical prescriptions.

At the same time, large spectroscopic surveys such as APOGEE ([1]) and GALAH ([27, 25]) now provide high-precision elemental abundances for hundreds of thousands of stars. In principle, these data contain sufficient information to tightly constrain GCE parameters and nucleosynthetic models. In practice, however, inference in GCE is computationally challenging. Chemical evolution models are typically implemented as forward simulators that generate synthetic abundance patterns for a given parameter set, but do not provide a tractable analytic likelihood function. Traditional Bayesian approaches such as Markov Chain Monte Carlo (MCMC) or Hamiltonian Monte Carlo (HMC) therefore become computationally expensive and difficult to scale, particularly when likelihood evaluation must be repeated for large datasets. Moreover, principled model comparison between competing yield prescriptions requires evaluation of marginal likelihoods or likelihood ratios, which is especially challenging in likelihood-free settings.

Simulation-Based Inference (SBI; Cranmer et al. 2020) provides a promising alternative by learning surrogate density estimators directly from simulations. In the context of GCE, recent work has demonstrated that SBI enables efficient parameter inference within a fixed physical model (e.g. [19]). However, existing approaches focus exclusively on parameter estimation and do not provide a unified framework for jointly performing parameter inference and Bayesian model comparison across competing nucleosynthetic yield sets.

In this work, we employ COMPASS [55], a novel simulation-based inference framework that enables, for the first time, joint parameter inference and model comparison in Galactic Chemical Evolution. COMPASS employs a conditional score-based diffusion model with a transformer architecture to learn both posterior and likelihood distributions from simulated data. This dual capability allows efficient amortized inference of galactic parameters while simultaneously enabling principled ranking of competing nucleosynthetic yield prescriptions.

We demonstrate the performance of COMPASS using the one-zone GCE model Chempy ([113]) and apply it to high-precision stellar abundance data from Nissen et al. (2020). By comparing 40 different combinations of asymptotic giant branch and core-collapse supernova yield tables, we identify the prescriptions most consistent with the chemical composition of the local Milky Way. Using these preferred models, we then infer constraints on the high-mass slope of the IMF and the normalization of SNe Ia.

This framework establishes a scalable and statistically principled approach to testing nucleosynthesis models and exploiting the full constraining power of next-generation spectroscopic surveys.

This paper is structured as follows. In § 2 we start by briefly summarizing GCE models and describing the machine learning and statistics methods used in this work. We describe in detail how COMPASS and its conditional score-based diffusion model with transformer architecture works and how we perform joint model comparison and inference. § 3 then discusses the simulated datasets used for model training and introduces the observed stellar abundances for the Milky Way which we use for inference. In § 4 we present our results, first for the model comparison part and then for the inference of IMF high mass slope and supernova Ia normalization. We discuss the implications and limitations of our work in § 5. Finally, § 6 presents our conclusions and the Data availability section provides the link to our Github repository for reproducibility.

Methods

Galactic chemical evolution

Galactic Chemical Evolution (GCE) describes the build-up of heavy elements as successive generations of stars form, evolve, and return nucleosynthetic products to the interstellar medium (ISM) ([86, 93, 68]). While Big Bang nucleosynthesis produced primarily hydrogen and helium, all heavier elements have been synthesized in stars and redistributed through stellar winds and supernova explosions. The resulting abundance patterns encode information about star formation histories, feedback processes, and stellar nucleosynthesis, forming the chemical foundation of Galactic Archaeology ([46]).

The enrichment history of a galaxy is governed by a small set of key ingredients: the star formation rate (SFR), which controls how rapidly gas is converted into stars; the stellar IMF, which specifies the relative number of stars of different masses; the rates of different supernova channels, and the nucleosynthetic yields of stars as functions of mass and metallicity, which quantify the mass of each element ejected over a star’s lifetime. Massive stars (M≳8 M⊙M \gtrsim8\,M_\odot) explode as core-collapse supernovae (CC-SNe) on short timescales and dominate the production of α\alpha-elements such as oxygen and magnesium. SNe Ia, originating from thermonuclear explosions of white dwarfs in binary systems, enrich the ISM primarily in iron-peak elements on delayed timescales ([83]). Low- and intermediate-mass stars contribute carbon, nitrogen, and ss-process elements during their asymptotic giant branch (AGB) phase ([66, 36]). The distinct timescales of these channels produce characteristic abundance–ratio patterns, such as the [α/Fe][\alpha/\mathrm{Fe}] plateau and its decline with increasing [Fe/H][\mathrm{Fe}/\mathrm{H}] (e.g. [57, 27, 25]) and encode a fossil record of past star formation, gas accretion, and feedback processes (e.g. [120, 127]).

Among the governing parameters, two play a particularly influential role in shaping these trends. The high-mass slope of the IMF (αIMF\alpha_{\mathrm{IMF}}) regulates the relative number of massive stars and thus the overall production of α\alpha-elements (e.g. [43, 41]). The normalization of the SNe Ia rate (log⁡10NIa\log_{10} N_{\mathrm{Ia}}) controls the integrated iron enrichment and the location of the [α/Fe][\alpha/\mathrm{Fe}] knee (e.g. [43, 22]). Variations in these parameters produce abundance signatures that are measurable with modern high-precision spectroscopic surveys and allow chemical tagging – the identification of stellar populations that share common formation sites or accretion origins (e.g. Ness et al. [91]; Griffith et al. [52, 51]; Ting & Weinberg [123]).

However, GCE predictions depend not only on these global parameters but also critically on the adopted nucleosynthetic yield tables (Côté et al. 2017; Weinberg et al. [135]; Buck et al. [22]; Liang et al. [74]; Philcox et al. [98]) and of nucleosynthetic physics, including metallicity-dependent yields (Kobayashi et al. [68]; Gronow et al. [53]), the relative contributions of sub-Chandrasekhar versus Chandrasekhar-mass Type Ia supernovae (Alexander & Vincenzo [7]), the type of SN Ia delay-time distribution (Dubay et al. [43]) or the slopes of the IMF (den Brok et al. [41]). Different stellar evolution calculations predict substantially different element production efficiencies across mass and metallicity, and these discrepancies propagate non-linearly into predicted abundance–ratio relations and can dominate the uncertainty budget of GCE inference. In many cases, systematic differences between yield sets rival or exceed the effects of varying αIMF\alpha_{\mathrm{IMF}} or NIaN_{\mathrm{Ia}}, making yield modeling one of the dominant uncertainties in chemical evolution studies.

In most existing GCE analyses, parameter inference is performed conditional on a fixed choice of yield prescriptions. Yet if the nucleosynthetic physics itself is uncertain, parameter constraints derived under a single yield model remain inherently conditional. Consequently, inferring galactic parameters without simultaneously accounting for yield-set uncertainty risks biased conclusions. A statistically principled framework must therefore enable both parameter inference within a given GCE model and quantitative comparison between competing nucleosynthetic prescriptions. Addressing this challenge requires inference methods capable of operating in likelihood-free, simulator-based settings while remaining computationally scalable.

In this work, we employ the open-source one-zone GCE model Chempy (Rybizki et al. [113]) as our forward simulator which provides a computationally efficient framework for exploring the impact of varying IMF slopes, SNe Ia rates, and stellar yield sets. By coupling Chempy with our SBI and model comparison framework, COMPASS (Günes et al. [55]), we jointly infer key chemical evolution parameters and assess the relative plausibility of competing enrichment models.

Simulation-based inference

Many astrophysical models are implemented as forward simulators that generate synthetic data x∼p(x∣θ)\mathbf{x} \sim p(\mathbf{x}|\theta) for a given parameter vector θ\theta, while the likelihood p(x∣θ)p(\mathbf{x}|\theta) itself remains analytically intractable. This renders traditional likelihood-based Bayesian inference infeasible or computationally prohibitive. SBI provides a principled alternative by learning surrogate density estimators directly from simulated data (Cranmer et al. 2020). In astronomy, SBI has recently been applied to a variety of problems ranging from galactic dynamics (Viterbo & Buck [131]; Viterbo et al. [129]) over galactic Archaeology (Viterbo & Buck [130]; Sante et al. [114]), gravitational-wave astronomy (Dax et al. [38]), galaxy evolution (Lovell et al. [76]), binary star inference (Knöll et al. [67]) up to model comparison in galaxy formation (Zhou et al. [140]).

In practice, GCE analyses typically adopt a fixed set of nucleosynthetic yields and perform parameter inference conditional on this choice. However, if the assumed yields are themselves uncertain, parameter constraints become conditional statements rather than robust inferences. A principled statistical framework must therefore allow joint parameter inference and model comparison across competing yield prescriptions. In this work we employ COMPASS – Comparison Of Models using Probabilistic Assessment in Simulation-based Settings — a Python framework1 designed for parameter inference and model comparison in simulator-based settings. Technical details are provided in Günes et al. [55]; here we summarize the methodological foundations with more details in appendix A.

Core principle. SBI methods train a neural density estimator on simulated pairs (θi,xi)(\theta_i, \mathbf{x}_i) drawn from the joint distribution p(θ,x)p(\theta,\mathbf{x}). Depending on the formulation, the estimator approximates the posterior p(θ∣x)p(\theta|\mathbf{x}) (Neural Posterior Estimation; Papamakarios & Murray [94]), the likelihood p(x∣θ)p(\mathbf{x}|\theta) (Neural Likelihood Estimation; Papamakarios et al. [95]), or the likelihood ratio p(x∣θ)/p(x)p(\mathbf{x}|\theta)/p(\mathbf{x}). Once trained, the surrogate enables fast amortized inference for new observations without rerunning the simulator.

Recent work has demonstrated that score-based diffusion models (Sec. A.1) can serve as powerful, flexible density estimators for SBI (Song et al. [119]; Gloeckler et al. [49]). These models learn the gradient of the data distribution’s log-density (the “score”) through a stochastic denoising process, enabling flexible modeling of complex, non-Gaussian distributions. In COMPASS, the score is parameterized by a transformer architecture (Sec. A.2) that captures non-linear dependencies between observables and model parameters via multi-head self-attention that additionally allows for physical interpretability through the learned attention structure.

A key feature of COMPASS is its dual-role density estimation. By applying an attention mask within the transformer, the same architecture can operate in: (i) Neural Posterior Estimation (NPE, see A.2) mode, learning p(θ∣x)p(\theta|\mathbf{x}), or (ii) Neural Likelihood Estimation (NLE) mode, learning p(x∣θ)p(\mathbf{x}|\theta). This dual capability enables both amortized parameter inference (Sec. 2.3) and likelihood-based model comparison. For each candidate model Mi\mathcal{M}_i, the learned likelihood allows evaluation of ln⁡P(x∣θ^,Mi)\ln P(\mathbf{x}|\hat{\theta}, \mathcal{M}_i), at the Maximum A Posteriori (MAP) parameters θ^\hat{\theta} facilitating a ranking of the models by relative weights P(Mi∣x)P(\mathcal{M}_i|\mathbf{x}) (see § 2.4).

Parameter inference with C

We now describe how COMPASS performs parameter inference. We first consider single-observation inference and then show how information from multiple observations is combined.

Single-observation posterior estimation

For an individual observation xi\mathbf{x}_i, COMPASS estimates the posterior P(θ∣xi)P(\theta|\mathbf{x}_i) using its conditional diffusion model in NPE mode (see Figure 1 and Sec. A.2 in the appendix). The observed data xi\mathbf{x}_i are specified via a condition mask MC\mathcal{M}_{C}: observed dimensions are set to 1, while parameters θ\theta are marked as latent (0). The reverse diffusion process is initialized at t=1t = 1 with xt\mathbf{x}_t drawn from the prior noise distribution. The reverse-time SDE (Eq. A.5) is then solved numerically down to t=0t = 0 over NtN_t timesteps (Sec. A.4). At each timestep, the transformer-based score network sϕ(xt,MC,t)s_{\phi}(\mathbf{x}_t,\mathcal{M}_{C},t) provides the conditional score estimate. The resulting samples at t=0t = 0 constitute draws from P(θ∣xi)P(\theta|\mathbf{x}_i).

The COMPASS model comparison workflow

Figure 1. The COMPASS model comparison workflow. Simulation data from model Mi\mathcal{M}_i train the ScoreBasedInferenceModel (SBIm). Then for some observations xobs\mathbf{x}_{\mathrm{obs}} SBIm estimates the posterior distribution P(θ∣xobs)P(\theta|\mathbf{x}_{\mathrm{obs}}) and then calculates its MAP θ^\hat{\theta}. SBIm then models the likelihood P(x∣θ^)P(\mathbf{x}|\hat{\theta}) to get the maximized likelihood for each model L(xobs∣θ^,Mi)\mathcal{L}(\mathbf{x}_{\mathrm{obs}}|\hat{\theta},\mathcal{M}_i), leading to the model posteriors P(Mi∣xobs)P(\mathcal{M}_i|\mathbf{x}_{\mathrm{obs}}). See subsection 2.2 and following for more details.

From these posterior samples, point estimates such as the Maximum A Posteriori (MAP) parameters θ^\hat{\theta} are obtained by fitting a multivariate Gaussian Kernel Density Estimator (KDE) and minimizing the negative density using scipy.optimize (Virtanen et al. [128]). The architecture naturally accommodates missing data. If certain components of xi\mathbf{x}_i are unobserved, their mask entries are set to 0, and the model jointly infers or marginalizes over them alongside θ\theta. This allows robust inference in incomplete or heterogeneous datasets and makes COMPASS a versatile tool for real-world inference scenarios where datasets are often incomplete.

Multi-observation posterior estimation

For multiple observations x={x1,…,xN}\mathbf{x} = \{x_1,\ldots,x_N\} generated under common parameters θ\theta, COMPASS is capable of combining information via posterior factorization to significantly increasing the certainty and precision of the inferred parameters θ\theta. To derive the joint posterior distribution P(θ∣x)P(\theta|\mathbf{x}), the individual posterior distributions obtained for each event are factorized by applying Bayes rule twice, as formulated by Geffner et al. [48]. Each single-observation posterior is learned from simulations drawn from the training proposal π(θ)\pi(\theta) (§ 3.2), i.e. P~(θ∣xi)∝P(xi∣θ) π(θ)\tilde{P}(\theta|x_i) \propto P(x_i|\theta)\,\pi(\theta). The joint posterior under the prior P(θ)P(\theta) is therefore

P(θ∣x)∝P(θ)P(x∣θ)=P(θ)∏i=1NP(xi∣θ)(1)P(\theta|\mathbf{x}) \propto P(\theta)P(\mathbf{x}|\theta) = P(\theta)\prod_{i=1}^{N} P(x_i|\theta) \tag*{(1)}
∝P(θ)∏i=1NP~(θ∣xi)π(θ)\propto P(\theta)\prod_{i=1}^{N}\frac{\tilde{P}(\theta|x_i)}{\pi(\theta)}
∝P(θ)∏i=1NP~(θ∣xi),(2)\propto P(\theta)\prod_{i=1}^{N}\tilde{P}(\theta|x_i), \tag*{(2)}

where the last step uses that π(θ)\pi(\theta) is uniform on its support. If the single-observation posteriors had instead been learned under P(θ)P(\theta) itself, the prior would enter as P(θ)1−NP(\theta)^{1-N} (Geffner et al. [48]). This factorization allows the principled combination of individually estimated posteriors P(θ∣xi)P(\theta|x_i) with the prior P(θ)P(\theta) to construct the joint multi-observation posterior.

For analytical tractability, within COMPASS each individual posterior P(θ∣xi)P(\theta|x_i) is approximated as a multivariate Gaussian with mean μi\mu_i and covariance Σi\Sigma_i, estimated from diffusion samples. The prior P(θ)P(\theta) on the global parameters αIMF\alpha_{\mathrm{IMF}} and log⁡10NIa\log_{10}N_{\mathrm{Ia}} is likewise modeled as Gaussian with mean μPrior\mu_{\mathrm{Prior}} and covariance ΣPrior\Sigma_{\mathrm{Prior}}. Under this approximation, the combined posterior remains Gaussian, with parameters:

ΣPosterior−1=ΣPrior−1+∑i=1NΣi−1(3)\Sigma_{\mathrm{Posterior}}^{-1}=\Sigma_{\mathrm{Prior}}^{-1}+\sum_{i=1}^{N}\Sigma_i^{-1} \tag*{(3)}
μPosterior=ΣPosterior[ΣPrior−1μPrior+∑i=1NΣi−1μi](4)\mu_{\mathrm{Posterior}}=\Sigma_{\mathrm{Posterior}}\left[\Sigma_{\mathrm{Prior}}^{-1}\mu_{\mathrm{Prior}}+\sum_{i=1}^{N}\Sigma_i^{-1}\mu_i\right] \tag*{(4)}

This formulation enables efficient aggregation of information from many stars, yielding increasingly precise parameter constraints without retraining the network. Because the combined covariance shrinks as 1/N1/N, any systematic error shared by the single-star posteriors (e.g. a small bias of the network) does not average out, and its significance in units of the combined uncertainty grows with NN. We quantify this on mock data in § 4.3.1 (right panels of Figure 5, D.1 and D.2). We note that combination rules that are more robust to imperfect single-observation posteriors, such as compositional score modeling (Geffner et al. [48]), are left for future work.

Figure 5. Parameter inference with matched TNG yields. Comparison of inference results for the global galactic parameters – the initial mass function’s high-mass slope αIMF\alpha_{\mathrm{IMF}} and the Type Ia supernova normalization log⁡10NIa\log_{10} N_{\mathrm{Ia}} – using COMPASS (red), SBI (blue) and HMC (gray) on mock data generated with TNG yields. (Left) Joint posterior distribution inferred from 200 stars with contours showing 1σ1\sigma and 2σ2\sigma ellipses. For COMPASS and SBI we show combined single-star posteriors (Eqs. (2)–(4)). For HMC we show results of the hierarchical HMC of Philcox & Rybizki [99] on the same stars, using their original emulator, which was trained on a different TNG yield compilation (§ 4.3.1). (Right) Convergence of the inferred parameters as a function of NstarsN_{\mathrm{stars}}, with 1σ1\sigma and 2σ2\sigma bands. Open diamonds show HMC results with the emulator of Buck et al. [19], which is trained on the same yields as SBI and COMPASS, and are only shown where its chains converged.

The assumption of Gaussianity for individual posteriors is a practical approximation. While true posteriors can be complex, a Gaussian fit often adequately captures the central tendency and dispersion for well-behaved, unimodal posteriors, or when the primary goal is to combine information for parameters that are expected to be reasonably constrained by the data. We test the resulting combined posteriors against known ground truth on mock data in § 4.3.1 and Appendix § 11. Future extensions of COMPASS may explore more expressive distributional forms for P(θ∣xi)P(\theta|x_i) to relax this Gaussian assumption.

Handling observational uncertainties

A fundamental challenge in applying any inference framework to real-world data is the proper treatment of observational uncertainties. Real observational data are subject to measurement noise and are therefore more accurately described by a probability distribution than by a single point estimate. A measurement xobs\mathbf{x}_{\mathrm{obs}} with uncertainty Σobs\Sigma_{\mathrm{obs}} defines the measurement model p(xobs∣x)=N(xobs;x,Σobs)p(\mathbf{x}_{\mathrm{obs}}\mid x)=\mathcal{N}(\mathbf{x}_{\mathrm{obs}};x,\Sigma_{\mathrm{obs}}). The distribution of the true value given the measurement then follows from Bayes’ theorem, p(x∣xobs,Σobs)∝N(x;xobs,Σobs) p(x)p(x\mid\mathbf{x}_{\mathrm{obs}},\Sigma_{\mathrm{obs}})\propto\mathcal{N}(x;\mathbf{x}_{\mathrm{obs}},\Sigma_{\mathrm{obs}})\,p(x), where p(x)p(x) is the distribution of abundances predicted by the simulator.

A statistically consistent parameter posterior must therefore marginalize over this measurement distribution rather than condition solely on the central value. The desired posterior is therefore given by the integral2:

p(θ∣xobs,σobs)=∫p(θ∣x)⋅p(x∣xobs,σobs) dx(5)p(\theta\mid x_{\mathrm{obs}}, \sigma_{\mathrm{obs}}) = \int p(\theta\mid x) \cdot p(x \mid x_{\mathrm{obs}}, \sigma_{\mathrm{obs}})\,\mathrm{d}x \tag*{(5)}

Although COMPASS provides an accurate approximation to p(θ∣x)p(\theta\mid x), direct evaluation of this integral would require nested inference within the diffusion process and is computationally impractical. Instead, COMPASS employs a Monte Carlo approximation to perform the marginalization.

For each observation, NN realizations are drawn from the measurement distribution, xi∼N(xobs,Σobs)x_i \sim\mathcal{N}(x_{\mathrm{obs}}, \Sigma_{\mathrm{obs}}), and the posterior is evaluated for each realization, θi∼p(θ∣xi)\theta_i \sim p(\theta\mid x_i). The aggregated set of samples {θ1,…,θN}\{\theta_1, \ldots, \theta_N\} constitutes a Monte Carlo approximation to the marginalized posterior p(θ∣xobs,Σobs)p(\theta\mid x_{\mathrm{obs}}, \Sigma_{\mathrm{obs}}). Drawing xi∼N(xobs,Σobs)x_i \sim\mathcal{N}(x_{\mathrm{obs}}, \Sigma_{\mathrm{obs}}) neglects the factor p(x)p(x) in p(x∣xobs,Σobs)p(x \mid x_{\mathrm{obs}}, \Sigma_{\mathrm{obs}}), which is only accurate when p(x)p(x) is flat on the scale of the measurement errors. This holds for our data: the Nissen et al. [92] uncertainties (median 0.007–0.03 dex per element) are small compared with the spread of the simulated abundances (0.22–0.73 dex), and evaluating dln⁡p(x)/dx\mathrm{d}\ln p(x)/\mathrm{d}x from the simulations at each measurement, the implied shift of the noise draws, σobs2 dln⁡p/dx\sigma_{\mathrm{obs}}^2\,\mathrm{d}\ln p/\mathrm{d}x, is below 5% of σobs\sigma_{\mathrm{obs}} for all stars and elements. Note that the training simulations already include Gaussian noise of 0.05 dex (§ 3.2), so the network itself conditions on noisy data. Eq. (5) propagates the star-specific errors on top of this, which enlarges the effective noise by a factor 1+σobs2/(0.05 dex)2=1.01\sqrt{1+\sigma_{\mathrm{obs}}^2/(0.05\,\mathrm{dex})^2}=1.01–1.171.17. This is a small and conservative double counting; conditioning the training on star-specific errors is left for future work.

By default, COMPASS uses N=1000N = 1000 realizations per observation. This procedure propagates measurement uncertainties from data space into parameter space, so that inferred credible intervals reflect both model uncertainty and observational noise.

Finally, we assess the inference quality using established simulation-based validation methods. Simulation-Based Calibration (SBC; Talts et al. [121]) tests the self-consistency of inferred marginal posteriors by comparing the rank statistics of true parameters under repeated simulations. Complementarily, Tests of Accuracy with Random Points (TARP; Lemos et al. [72]) evaluate the joint posterior coverage, ensuring that nominal credible intervals correspond to empirical frequencies. We use these diagnostics to assess the calibration of COMPASS. For more details see appendix B.

Bayesian model comparison

In many astrophysical applications, one must evaluate a set of competing models {Mi}\{\mathcal{M}_i\} that differ in their underlying physical assumptions – for example, alternative nucleosynthetic yield prescriptions. The goal of Bayesian model comparison is to quantify the relative plausibility of these models given observed data x\mathbf{x}. A distinguishing capability of COMPASS is that it provides a likelihood-based ranking of competing models in addition to parameter inference. The central question COMPASS addresses in this context is: "Which model Mi\mathcal{M}_i is most strongly supported by the observed data xobs\mathbf{x}_{\mathrm{obs}}?"

Bayesian evidence and practical approximation

In the fully Bayesian framework, models are compared via their marginal likelihood or model evidence,

p(x∣Mi)=∫p(x∣θ,Mi) p(θ∣Mi) dθ.(6)p(\mathbf{x} \mid\mathcal{M}_i) = \int p(\mathbf{x} \mid\theta, \mathcal{M}_i)\,p(\theta\mid\mathcal{M}_i)\,\mathrm{d}\theta. \tag*{(6)}

This integral averages the likelihood over the parameter prior and automatically penalizes model complexity. However, in simulator-based settings, the likelihood p(x∣θ,Mi)p(\mathbf{x} \mid\theta, \mathcal{M}_i) is not available in analytic form, making direct evaluation of Eq. (6) computationally prohibitive.

To enable practical model comparison, we adopt an approximation based on maximized likelihoods and information criteria.

Model ranking via maximized likelihood For each candidate model Mi\mathcal{M}_i, we first perform parameter inference (Sec. 2.3) to obtain the Maximum A Posteriori (MAP) estimate θ^i\hat{\theta}_i. We then evaluate the likelihood at this parameter point,

Li=p(x∣θ^i,Mi).(7)\mathcal{L}_i = p(\mathbf{x} \mid\hat{\theta}_i, \mathcal{M}_i). \tag*{(7)}

To account for model complexity and approximate predictive performance, we use the Akaike Information Criterion (AIC) [4, 28],

AICi=−2ln⁡Li+2ki,(8)\mathrm{AIC}_i = -2\ln\mathcal{L}_i + 2k_i, \tag*{(8)}

where kik_i denotes the number of free parameters in model Mi\mathcal{M}_i. The AIC provides an asymptotic approximation to out-of-sample predictive performance under regularity conditions and large-sample limits. While it does not yield the full marginal likelihood, it offers a computationally efficient surrogate that is particularly attractive in simulation-based settings where exact evidence evaluation is infeasible. It allows us to estimate the relative quality of models based on their maximized log-likelihood and is suitable for non-nested models derived from simulators.

Differences in AIC values, Δi(AIC)=AICi−AICmin⁡\Delta_i(\mathrm{AIC}) = \mathrm{AIC}_i - \mathrm{AIC}_{\min}, where AICmin⁡\mathrm{AIC}_{\min} is the minimum AIC value among the models, can be converted into relative model weights,

wi∝exp⁡(−12Δi(AIC)),(9)w_i \propto\exp\left(-\frac{1}{2}\Delta_i(\mathrm{AIC})\right), \tag*{(9)}

which approximate the probability that model Mi\mathcal{M}_i minimizes information loss within the candidate set. The normalized model posterior weights [132, 5, 17] are therefore

P(Mi∣x)=exp⁡(−12Δi)∑jexp⁡(−12Δj).(10)\mathcal{P}(\mathcal{M}_i \mid\mathbf{x}) = \frac{\exp\left(-\frac{1}{2}\Delta_i\right)}{\sum_j \exp\left(-\frac{1}{2}\Delta_j\right)}. \tag*{(10)}

The resulting model weights therefore quantify relative predictive adequacy within the candidate set, rather than exact posterior model probabilities derived from full marginal likelihood integration. Given the computational constraints of simulator-based inference, this approximation provides a principled and scalable compromise between statistical rigor and feasibility. For brevity we denote these normalized Akaike weights by P(Mi∣x)\mathcal{P}(\mathcal{M}_i \mid\mathbf{x}); they do not account for the prior volume of each model and are in general more extreme than Bayes factors.

Equal-complexity simplification In the present study, all competing GCE models share identical parameter dimensionality (ki=kk_i = k for all ii). Under this condition, the complexity penalty cancels in the relative comparison, and Eq. (10) reduces to a softmax over maximized log-likelihoods (see Appendix § 10),

P(Mi∣x)=exp⁡(ln⁡Li)∑jexp⁡(ln⁡Lj).(11)\mathcal{P}(M_i \mid\mathbf{x}) = \frac{\exp(\ln\mathcal{L}_i)}{\sum_j \exp(\ln\mathcal{L}_j)}. \tag*{(11)}

Thus, model ranking is determined directly by relative predictive performance. Because all candidate models share the same kk and are evaluated on the same nn observations, the Bayesian Information Criterion, BICi=−2ln⁡Li+kln⁡n\mathrm{BIC}_i = -2\ln\mathcal{L}_i + k\ln n, differs from the AIC only by the model-independent constant k(ln⁡n−2)k(\ln n - 2). Both criteria therefore give identical rankings and identical weights and in this equal-kk setting the choice between them does not matter.

We emphasize that this simplification is specific to the equal-complexity case considered here. In future applications involving models with differing parameter dimensionality, the full information-criterion penalty term—or alternative approximations to the marginal likelihood—can be retained without modification of the COMPASS inference architecture.

Likelihood estimation with C

The likelihood Li=p(x∣θ^i,Mi)\mathcal{L}_i = p(\mathbf{x} \mid\hat{\boldsymbol{\theta}}_i, M_i) is estimated using the dual posterior/likelihood capability of the conditional diffusion model (red parts in Figure 1).

After obtaining θ^i\hat{\boldsymbol{\theta}}_i via posterior inference (see Sec. 2.3), the diffusion model is operated in likelihood-estimation mode (by inverting the condition mask MC\mathcal{M}_{\mathrm{C}} relative to the NPE mode, see also Algorithm 2 as detailed in the appendix) to generate samples xs∼p(x∣θ^i,Mi)\mathbf{x}_s \sim p(\mathbf{x} \mid\hat{\boldsymbol{\theta}}_i, M_i). A multivariate Gaussian KDE is fitted to these generated samples, and the observed data are evaluated under this density to obtain ln⁡Li\ln\mathcal{L}_i.

For multiple independent observations x={x1,…,xN}\mathbf{x} = \{x_1, \ldots, x_N\}, the total log-likelihood is simply given by

ln⁡Li=∑n=1Nln⁡p(xn∣θ^i,Mi).(12)\ln\mathcal{L}_i = \sum_{n=1}^{N} \ln p(x_n \mid\hat{\boldsymbol{\theta}}_i, M_i). \tag*{(12)}

This summed log-likelihood enters directly into the model ranking framework above (Eq. (10)).

Finally, we note that the procedure presented above approximates full Bayesian model comparison by evaluating predictive performance at the MAP parameter estimate rather than integrating over the full posterior. While it does not compute the exact marginal likelihood (Eq. (6)), it provides a scalable ranking criterion for simulator-based models. It does not include the Occam factor of the parameter prior, so the weights should be read as relative predictive support. In Appendix § 10.§ 1 we provide an independent check of the resulting ranking. Because all candidate models considered here have identical parameter dimensionality, the comparison isolates differences in predictive accuracy rather than model complexity.

Data

Our analysis relies on two data sources: (i) simulated abundance data generated from a suite of GCE models for training and benchmarking COMPASS, and (ii) high-precision stellar abundance observations used for scientific application. We describe both, simulated and observational data, in detail below.

Nucleosynthetic yield sets for model comparison

Following Buck et al. [19], we employ the one-zone GCE model Chempy (Rybizki et al. [113]) to generate a large suite of chemical evolution simulations. For fixed galactic parameters θ\boldsymbol{\theta}, Chempy predicts abundance tracks as functions of time.

Because this study focuses on model comparison, we construct competing GCE models with varying the adopted nucleosynthetic yield tables. Each candidate model Mi\mathcal{M}_i corresponds to a unique combination of AGB and CC-SN yield prescriptions. We consider four AGB yield sets and ten CC-SN yield sets, resulting in 4×10=404 \times10 = 40 distinct models. Type Ia supernova yields are fixed to Seitenzahl et al. [117]. All yield configurations are listed in Table 2.

AGB YieldsCore-Collapse Supernovae (CC-SN) Yields
ChieffiᵃNomotoᵇPortinariᶜChieffi NetNomoto NetNuGridᵈWestᵉTNGᶠCL18ᵍFrischknechtʰ
NuGridᵈ162945221903036
Karakasi218311421262393539
Venturaj1016341317272033238
TNGᶠ715281112252483337

Table 2. Ranking of the nucleosynthetic yield-set combinations for the Nissen et al. [92] data.

For the TNG configuration [101], we adopt the composite prescription described in their Table 2: CC-SN yields from Kobayashi et al. (2006); Portinari et al. [105] and AGB yields from Karakas [64]; Doherty et al. [42]; Fishlock et al. [44]. The SN II yields are renormalized such that IMF-weighted yield ratios at fixed metallicity match those from Kobayashi et al. (2006). We assume a maximum SN II progenitor mass of 100 M⊙100\,M_\odot, adopt stellar lifetimes from Portinari et al. [105], and exclude hypernova channels (in contrast to Philcox et al. 2018).

Chemical elements: Our simulations track nine elements: H, He, C, N, O, Ne, Mg, Si, Fe since these are the only elements traced by the TNG simulations. We principally compare the logarithmic abundances [X/Fe] and [Fe/H] defined by [X/Y] = log⁡10(NX/NY)star−log⁡10(NX/NY)⊙\log_{10}(N_X/N_Y)_{\mathrm{star}} - \log_{10}(N_X/N_Y)_\odot where NXN_X denotes the number fraction of element X and solar abundances are taken from Asplund et al. [12]. Using hydrogen for normalization leaves nel=8n_{\mathrm{el}} = 8 independent abundance dimensions3^3. Although Chempy tracks additional elements, our observational application (§ 3.3) uses only the subset common to both simulations and data.

Training and inference setup

For each of the 40 competing yield configurations, a dedicated COMPASS model is trained. The six Chempy parameters and their priors are listed in Table 1: two global parameters shared by all stars, the high-mass IMF slope αIMF\alpha_{\mathrm{IMF}} and the SNIa normalization log⁡10NIa\log_{10} N_{\mathrm{Ia}}; three local ISM parameters specific to each star’s birth environment, the star formation efficiency log⁡10(SFE)\log_{10}(\mathrm{SFE}), the peak of the star formation rate log⁡10(SFRpeak)\log_{10}(\mathrm{SFR}_{\mathrm{peak}}) and the outflow fraction xoutx_{\mathrm{out}}; and the stellar birth time TT. Each training dataset consists of 10610^6 simulated pairs (θ,x)(\boldsymbol{\theta}, \mathbf{x}), with an additional 10510^5 pairs reserved for validation. Parameters are drawn from uniform priors spanning ±5\pm5 times the Gaussian prior widths reported in Table 1 of Buck et al. [19]. This broad sampling ensures coverage well beyond the prior mean and mitigates training bias. Note, this uniform distribution is the training proposal; the Gaussian priors of Table 1 are the inference priors and enter only when single-star posteriors are combined (Eqs. (2)–(4)).

ParameterDescriptionθˉprior±σprior\bar{\theta}_{\mathrm{prior}} \pm\sigma_{\mathrm{prior}}Prior from:Training proposal
Λ\Lambda: Global stellar (SSP) parameters
αIMF\alpha_{\mathrm{IMF}}High-mass slope of the [29] IMF−2.3±0.3-2.3 \pm0.3[29 Tab. 1]U(−3.8,−0.8)\mathcal{U}(-3.8, -0.8)
log⁡10(NIa)\log_{10}(N_{\mathrm{Ia}})Number of SN Ia per M⊙M_\odot over 15 Gyr−2.89±0.3-2.89 \pm0.3[81 Tab. 1]U(−4.39,−1.39)\mathcal{U}(-4.39, -1.39)
Θi\Theta_i: Local ISM parameters
log⁡10(SFE)\log_{10}(\mathrm{SFE})Star formation efficiency governing gas infall−0.3±0.3-0.3 \pm0.3[16]U(−1.8,1.2)\mathcal{U}(-1.8, 1.2)
log⁡10(SFRpeak)\log_{10}(\mathrm{SFR}_{\mathrm{peak}})SFR peak in Gyr (scale of k=2k=2 Γ\Gamma-distribution)0.55±0.10.55 \pm0.1[124 fig. 4b]U(0.05,1.05)\mathcal{U}(0.05, 1.05)
xoutx_{\mathrm{out}}Stellar feedback fraction0.5±0.10.5 \pm0.1[113 Tab. 1]U(0,1)\mathcal{U}(0, 1)
TiT_i: Timescale
TiT_iTime of stellar birth in Gyr[1,13.8][1,13.8]ObservationsU(1,13.8)\mathcal{U}(1, 13.8)

Table 1. Free parameters of the Chempy simulator.

To increase robustness against measurement uncertainties, simulated abundances are perturbed with Gaussian noise of standard deviation 0.05 dex in every abundance. This exceeds the formal precision of the observational dataset (typically 0.01–

Notes. Gaussian priors and uniform training proposal (±5σprior\pm5\sigma_{\mathrm{prior}} around the prior mean, § 3.2) of each parameter. The global parameters (αIMF\alpha_{\mathrm{IMF}}, log⁡10(NIa)\log_{10}(N_{\mathrm{Ia}})) are assumed to be shared across all stars in a given dataset. The local parameters and the stellar birth time TT are specific to each individual star’s formation environment. For the Nissen et al. [92] stars, TT is observed via the stellar age and hence fixed.

0.03 dex, § 3.3), ensuring that the learned density estimator remains stable across a realistic error regime.

Hyperparameters of the neural architecture were optimized using an optuna study (Trial 275; Table B.1; Appendix B.§ 1). The inference settings for the reverse SDE solver were adapted to the specific task to balance accuracy and computational cost (see appendix B.§ 2 for more details). For large-scale model comparison, 50 diffusion steps are used, yielding ∼0.1\sim0.1 s per likelihood evaluation (in the controlled comparison of § 4.1, 50 steps suffice to identify the generating model in all three cases). For the final parameter inference on the Nissen et al. [92] dataset using the best-performing models, the number of diffusion steps was increased to 1000. Given the relatively small sample size (69 stars), this maximized the accuracy of the final parameter constraints. For all benchmark tests on mock data shown in Figure 5, D.1 and D.2, the default configuration of 500 diffusion steps was used to ensure a consistent and fair comparison with the default settings of the baseline methods. All inference employs the first-order DPM-Solver unless otherwise stated.

Observational data

For the scientific application, we use the high-precision stellar abundance dataset of Nissen et al. [92]. The sample comprises 69 nearby solar-type stars4 observed with the HARPS spectrograph, providing some of the most precise abundance measurements available for Milky Way disk stars.

The stars have solar-like atmospheric parameters (Teff=5777±180T_{\mathrm{eff}} = 5777 \pm180 K, log⁡g>4.15\log g > 4.15) and metallicities in the range −0.3≲[Fe/H]≲0.3-0.3 \lesssim[\mathrm{Fe}/\mathrm{H}] \lesssim0.3. They span ages from 0 to 11.3 Gyr with typical uncertainties of 0.5–1.3 Gyr (approximately 8–10%). These stars are well-sampled from both the thin and thick (or young and low-α\alpha as well as old and high-α\alpha) stellar disk of the Milky Way in terms of age and metallicity.

The defining strength of this dataset is its abundance precision. For elements such as C, O, Mg, Si, and Fe, quoted 1σ\sigma uncertainties are typically ∼0.01\sim0.01 dex and always below 0.03 dex. This precision enables sensitivity to subtle abundance differences induced by variations in nucleosynthetic yields or global galactic parameters, making the sample well-suited for discriminating between competing enrichment models.

Matching observables to model outputs Although Chempy tracks nine elements, not all are measured in Nissen et al. [92]. We therefore restrict the analysis to the subset common to both simulations and observations: C, O, Mg, Si, and Fe. Elements tracked in simulations but absent in the observational dataset are treated as latent variables within the COMPASS framework. The transformer-based architecture naturally handles such missing dimensions via its attention masking mechanism (Sec. 2.3), enabling consistent inference without retraining for each observational subset. In addition to abundances, stellar ages are incorporated as conditioning variables, i.e. the stellar age fixes each star’s birth time TT, which would otherwise be an additional nuisance parameter.

The Nissen et al. [92] sample serves as a high-quality testbed to demonstrate joint parameter inference and model comparison in a realistic astrophysical setting. While the sample size of 69 stars does not permit definitive constraints on global Milky Way parameters, its exceptional abundance precision and well-characterized uncertainties provide a stringent proof-of-concept benchmark. In the next § 4, we first rank the 40 competing yield combinations using Bayesian model comparison. The best-performing prescriptions are then used to infer the high-mass IMF slope and Type Ia supernova normalization.

Results

Our results are structured in three main parts progressing from model validation and astrophysical inference to an investigation of the model’s internal reasoning process. First, we validate the ability of COMPASS to discriminate between competing nucleosynthetic yield prescriptions (§ 4.1) using controlled mock experiments. Second, we apply the framework to high-precision stellar abundance data from Nissen et al. [92] to identify the yield sets most consistent with Milky Way disk stars. These preferred prescriptions are then used for subsequent inference of global galactic parameters (§ 4.3). Finally, we examine the internal attention patterns of the model to assess interpretability (§ 4.4). This final section details the patterns of information flow learned by the model, providing the basis for a deeper physical interpretation.

Bayesian Comparison of Nucleosynthetic Yield Sets

As demonstrated by e.g. Buck et al. [22], the choice of nucleosynthetic yield sets has a significant impact on the chemical abundance patterns of simulated galaxies, making it a critical axis of uncertainty in GCE modeling. Because different prescriptions imprint distinct abundance patterns, yield comparison provides a stringent test of simulation-based model selection. We first assess the robustness of the comparison pipeline on mock data, where the ground truth is known, before applying it to real stellar abundances.

Chempy mock data

To validate model identification, we construct a controlled experiment using three CC-SN yield prescriptions: Chieffi & Limongi [32] (Chieffi), Limongi & Chieffi [75] (Limongi), and Austin et al. [14] (West), as these sets exhibit significant variations in their predicted yields. SN,Ia and AGB yields are fixed to Seitenzahl et al. [117] and Karakas & Lugaro [65], respectively. Each CC-SN prescription is used in turn to generate an independent mock dataset. COMPASS is then tasked with identifying the true generating model among the three competitors.

Single-observation posteriors Figure 2 shows the distribution of single-star model posteriors P(Mk∣xi)P(M_k \mid x_i) for individual mock observations xix_i, where MkM_k represents one of the three competing CC-SN yield models. The left panel shows the relative model weight P(M∣xi)P(M|x_i) for data created with the Chieffi & Limongi [32] CC-SN yields. The middle panel shows P(M∣xi)P(M|x_i) for data created with the Limongi & Chieffi [75] CC-SN yields. And the right panel shows P(M∣xi)P(M|x_i) for data created with the Austin et al. [14] CC-SN yields. For all three ground-truth cases, the correct model is assigned the highest weight for the vast majority of mock observations. Importantly, these probabilities are normalized across the candidate model set via Eq. (10) and therefore lie in [0,1][0,1].

Combined evidence While individual observations already favor the correct prescription, combining evidence across stars (see § 2.4) rapidly increases confidence. Figure 3 shows the cumulated relative model posterior after combining ii observations P(Mk∣x1,…,xi)P(M_k \mid x_1,\ldots,x_i), obtained by multiplying individual likelihood contributions (Eq. (12)).

Cumulative relative model weight as a function of the number of observations

Figure 3. Cumulative relative model weight P(Mk∣x0,…,xi)P(M_k|x_0,\ldots,x_i) as a function of the number of combined observations ii. This example illustrates the case where the mock data was generated using the Limongi & Chieffi [75] CC-SN yields corresponding to the middle panel of Figure 2. The probability rapidly converges to 100% for the correct model (Limongi) after only 10 observations, demonstrating the increased confidence gained by combining evidence from multiple data points.

Figure 3 shows an example for the inference results from the middle panel of Figure 2, where the model posterior for data generated with CC-SN yields from Limongi & Chieffi [75] are inferred. For this mock example, the correct model reaches a near-unity weight after only ∼10\sim10 observations. This experiment demonstrates that (i) in this controlled setting the likelihood estimator is accurate enough to identify the generating model, and (ii) model identification is data-efficient.

Violin plots of model weights for three competing CC-SN yield models

Figure 2. Violin plots of model weights. Violin plots show the distribution of single-observation relative model weights (Eq. (10)) P(Mk∣xi)P(M_k|x_i) for three competing CC-SN yield models (Chieffi, Limongi and West; see text for more details), when tested on mock Chempy data. Each panel corresponds to a different ground-truth model used to generate the mock observations: (Left) Data generated with Chieffi & Limongi [32] yields; (Middle) Limongi & Chieffi [75] yields and (Right) Austin et al. [14] yields. The framework correctly identifies the true generating model with high probability in most individual observations, even with only 50 diffusion timesteps (see Sec. B.2 for more details).

Nissen Milky Way Data

Having validated the methodology, we apply COMPASS to the 69 high-precision solar-type stars from Nissen et al. [92]. The objective is to determine which combination(s) of theoretical yields best reproduce the observed abundance patterns in the Nissen et al. [92] sample, according to the relative model posterior P(Mk∣x)P(M_k|x). All 40 combinations of AGB and CC-SN yield prescriptions are evaluated.

Star-by-star preferences The top panel of Figure 4 displays single-star posteriors for all 40 yield combinations, ranked by their median posterior probability (see Table 2 for all combinations and their numbering). The middle panel highlights the six most competitive models. Here we find that individual stars exhibit moderate discrimination power: several yield combinations receive non-negligible posterior support, reflecting intrinsic degeneracies in abundance space.

Observational yield-set inference

Figure 4. Observational yield-set inference. Bayesian comparison of 40 nucleosynthetic yield set combinations using observational data from Nissen et al. [92]. (Top) Single-star relative model weights for all 40 tested combinations. (Middle) Top six single-star model weights P(Mk∣xi)P(\mathcal{M}_k|x_i). (Bottom) Cumulative model weight P(Mk∣x0,…,xi)P(\mathcal{M}_k|x_0,\ldots,x_i).

Combined constraints The bottom panel of Figure 4 shows the cumulative model posterior as stars are sequentially combined. Note, the individual stars are not ordered in any particular way.

Notes. Results of the Bayesian model comparison (§ 4.1.2). Lower ranks indicate higher relative model weight and correspond to the numbers in Figure 4. (ᵃ) Chieffi & Limongi [32]; (ᵇ) Nomoto et al. [93]; (ᶜ) Portinari et al. [104]; (ᵈ) Ritter et al. [109]; (ᵉ) Austin et al. [14]; (ᶠ) Pillepich et al. [101]; (ᵍ) Limongi & Chieffi [75]; (ʰ) Frischknecht et al. [47]; (ⁱ) Karakas & Lugaro [65]; (ʲ) Ventura et al. [125].

We randomly combine the model posteriors according to Equ. 2. Hence, the probability is not increasing monotonically but can also go down if we add in a star that shows an abundance pattern that is less likely to originate from this yield set combination. As expected from Bayesian updating, evidence strengthens with increasing sample size.

From Figure 4 a clear preference emerges: The combination of NuGrid AGB yields [109] and the TNG CC-SN prescription (Pillepich et al. 2017a; Kobayashi et al. 2006; Portinari et al. 1997) attains the highest cumulative posterior probability, approaching unity when all 69 stars are included. Other combinations that perform competitively on individual stars are strongly disfavored once the full dataset is considered. Table 2 summarizes the ranking of all 40 prescriptions. As an independent check that does not use the COMPASS likelihood, we trained a neural classifier to identify the generating yield set from the same observables (Appendix § 10.§ 1). It also prefers the NuGrid + TNG combination by a large margin, and its ranking correlates with Table 2 (Spearman ρ=0.89\rho= 0.89; 7 of the top 10 in common). The ordering below the top few models is therefore less robust than the identification of the preferred yield set. In particular, the classifier ranks the TNG CC-SN combinations higher than Table 2 does.

Interpretation

Our findings highlight three things: (i) High-precision abundance data contain sufficient information to discriminate between nucleosynthetic yield models. (ii) The ranking obtained with simulation-based likelihood estimation identifies a preferred yield set that is confirmed by an independent classifier (Appendix § 10.§ 1). (iii) The Nissen et al. [92] sample strongly favors a specific combination of AGB and CC-SN yields that is consistent with the chemical makeup of the observed stellar populations. The preferred yield sets identified here will be used for the subsequent parameter inference in § 4.3.

Inferring Galactic Parameters

Having identified the yield prescriptions most consistent with the data (§ 4.1) and assessed the calibration of the score model (Appendix B), we now turn to the primary scientific objective: inferring the global galactic parameters governing chemical enrichment. We focus on two key quantities: (i) the high-mass slope of the IMF, αIMF\alpha_{\mathrm{IMF}}, and (ii) the normalization of the SN Ia rate, log⁡10NIa\log_{10} N_{\mathrm{Ia}}.

The following subsections we first benchmark COMPASS against established inference pipelines from our previous work [19] and traditional Hamiltonian Monte Carlo (HMC) methods from Philcox & Rybizki [99] using controlled Chempy mock data. This validation includes tests with matched yield sets and evaluations under conditions of model misspecification, such as using alternative yield sets or data from the more complex IllustrisTNG cosmological simulation [101] and tests how accurately COMPASS recovers known ground-truth parameters. We then apply the validated COMPASS framework to the Nissen et al. [92] dataset employing the optimal yield set combinations identified in § 4.1.2, to derive constraints (conditional on the yield set) on αIMF\alpha_{\mathrm{IMF}} and log⁡10NIa\log_{10} N_{\mathrm{Ia}} for the local Milky Way.

Validation on Chempy mock data

Matched yield configuration For the initial validation, mock data are generated with Chempy using the IllustrisTNG yield tables matching the training setup. The ground-truth parameters are set to αIMF=−2.3\alpha_{\mathrm{IMF}} = -2.3 and log⁡10NIa=−2.89\log_{10} N_{\mathrm{Ia}} = -2.89. Figure 5 compares the inference results obtained with COMPASS against those from Buck et al. [19] (hereafter "SBI") and a reimplementation of the hierarchical HMC model of Philcox & Rybizki [99] applied to the same mock stars (hereafter "HMC"), when applied to this mock dataset.

Figure 5 shows that both COMPASS and SBI recover the ground-truth parameters, with posteriors that contract as NstarsN_{\mathrm{stars}} increases. With 200 stars, COMPASS gives αIMF=−2.290±0.008\alpha_{\mathrm{IMF}} = -2.290 \pm0.008 and log⁡10NIa=−2.876±0.011\log_{10} N_{\mathrm{Ia}} = -2.876 \pm0.011 (relative deviations ≤0.5%\le0.5\%). The truth lies 1.3σ1.3\sigma from the mean in each parameter, with a Mahalanobis distance of 1.4 (a multivariate measure of separation accounting for parameter uncertainties and correlations), comparable to SBI (1.1σ1.1\sigma; 1.2). The COMPASS posterior is 1.4–1.6 times wider than the SBI posterior. Given the calibration diagnostics in Appendix B.§ 3, which show mildly under-confident COMPASS posteriors for the global parameters, we interpret the larger width as conservative rather than as a more accurate uncertainty estimate.

The right-hand panel shows the combined estimates as a function of the number of stars. For matched yields, both SBI methods remain consistent with the truth while their uncertainties shrink, i.e. no significant bias accumulates up to 200 stars (cf. § 2.3.2).

As a sampling-based reference we use the hierarchical HMC model of Philcox & Rybizki [99], re-implemented in NumPyro (Phan et al. [97]) with the No-U-Turn sampler (Hoffman & Gelman [59]). It samples the joint posterior of the global parameters, all per-star parameters and a per-element model-error term, and we apply it to exactly the same mock observations. With the original emulator of Philcox & Rybizki [99], which was trained on their TNG yield compilation including hypernova channels and is used with their priors (prior mean of log⁡10NIa\log_{10} N_{\mathrm{Ia}} at −2.75-2.75), all chains converge (R^≤1.01\hat{R} \le1.01). This is shown as the HMC results in Figure 5, D.1 and D.2. Because that yield compilation differs from the one used to generate our mocks, HMC with this emulator is itself misspecified on the matched-yield mock and gives αIMF=−2.340±0.006\alpha_{\mathrm{IMF}} = -2.340 \pm0.006. With the emulator of Buck et al. [19], which is trained on the exact same yields as SBI and COMPASS, HMC runs recover the truth (N=10N = 10: αIMF=−2.29±0.03\alpha_{\mathrm{IMF}} = -2.29 \pm0.03, log⁡10NIa=−2.89±0.04\log_{10} N_{\mathrm{Ia}} = -2.89 \pm0.04). However, we note that those chains, are metastable for N≳100N \gtrsim100 on this mock, so we show only converged runs (open diamonds). In contrast, SBI uses the same simulator, yields, training proposal and mock data as COMPASS.

Due to their amortized nature, COMPASS and the previous SBI implementation can readily scale to larger numbers of observed stars with minimal additional computational overhead while HMC becomes computationally prohibitive for large datasets. This scalability is particularly crucial when analysing large datasets, where sample variances with small numbers of stars can otherwise dominate the uncertainty. This confirms that COMPASS is not only effective for model selection (as shown in the previous subsection 4.1.2) but also an accurate tool for parameter inference when the model is well-specified.

Robustness to model misspecification Given that all tabulated yield sets likely deviate from astrophysical reality to some extent, and clarity on the optimal set is often lacking, it is crucial to test the inference method’s performance under model misspecification. In particular, in Appendix § 11 we investigate the sensitivity of COMPASS to such misspecification by using mock data generated with yield sets different from those used for training (see Appendix § 11.§ 1) and more severe misspecifications through using a completely different simulator model, i.e. a full hydrodynamical model from IllustrisTNG (see Appendix § 11.§ 2).

Under misspecification all methods are biased by several posterior standard deviations (Appendix § 11). COMPASS is less biased than the NPE baseline in both tests, but its credible regions are not reliable in this regime. Since all tabulated yield sets are approximations, this motivates the explicit comparison of yield sets in § 4.1 and caution in interpreting the absolute values of the inferred parameters.

Inference from the Nissen2020 data

Having validated the accuracy of the COMPASS framework in inferring galactic parameters in the previous subsection 4.2.1, we now apply it to the 69 high-precision solar-type stars from Nissen et al. [92], adopting the six highest-ranked yield combinations from § 4.1.2 (see Figure 4). To maximize accuracy given the modest sample size of only 69 stars, 1,000 diffusion steps are used (acknowledging the findings from Figure B.1 that inference accuracy still improves with more diffusion timesteps).

A crucial aspect of this analysis is COMPASS’s ability to handle observational data limitations. The COMPASS framework naturally accommodates missing elements (He, N, Ne) via attention masking and stellar age information as an additional conditioning variable. Nissen et al. [92] only measured abundances for C, Fe, Mg, O and Si while our Chempy runs additionally modeled He, N and Ne (upon which the SBI models were trained). COMPASS’s architecture (as described in Sec. 2.3) allows it to process data with missing elements and still provide robust parameter inference for the observed set. The observed stellar ages (TiT_i) are used as conditioning variables, fixing the birth time of each star.

Figure 6 visualizes the joint posterior distributions for αIMF\alpha_{\mathrm{IMF}} and log⁡10(NIa)\log_{10}(N_{\mathrm{Ia}}) for the top six yield set combinations. The corresponding mean parameter values and their uncertainties are numerically summarized in Table 3.

NuGrid Ritter et al. [109]NuGrid Ritter et al. [109]Karakas Karakas & Lugaro [65]Ventura Ventura et al. [125]NuGrid Ritter et al. [109]NuGrid Ritter et al. [109]
AGBTNG Pillepich et al. [101]Chieffi Chieffi & Limongi [32]Chieffi Chieffi & Limongi [32]TNG Pillepich et al. [102]Chieffi NetNomoto Net Nomoto et al. [93]
αIMF\alpha_{\mathrm{IMF}}−2.65±0.02-2.65 \pm0.02−2.52±0.02-2.52 \pm0.02−2.62±0.02-2.62 \pm0.02−2.80±0.02-2.80 \pm0.02−2.54±0.02-2.54 \pm0.02−2.75±0.01-2.75 \pm0.01
log⁡10NIa\log_{10} N_{\mathrm{Ia}}−2.81±0.02-2.81 \pm0.02−2.68±0.02-2.68 \pm0.02−2.88±0.03-2.88 \pm0.03−3.10±0.02-3.10 \pm0.02−2.70±0.02-2.70 \pm0.02−2.88±0.02-2.88 \pm0.02

Table 3. Inferred global parameters from the Nissen et al. [92] data for the top six yield sets. Notes. Mean values and ±1σ\pm1\sigma uncertainties of αIMF\alpha_{\mathrm{IMF}} and log⁡10(NIa)\log_{10}(N_{\mathrm{Ia}}) for the top six yield-set combinations identified in Sec. 4.1.2.

Figure 6. Inferred galactic parameters from observational data. Joint posterior distributions (1σ1\sigma and 2σ2\sigma contours) for the IMF high-mass slope αIMF\alpha_{\mathrm{IMF}} and SN Ia normalization log⁡10NIa\log_{10} N_{\mathrm{Ia}}, inferred using COMPASS from the Nissen et al. [92] data. Each colored contour set corresponds to one of the top six yield set combinations identified in Section 4.1.2 (see legend in figure and also Tab. 3). The black ’x’ marks the mean of the Chempy prior distributions and the dashed line illustrates the 1σ1\sigma standard deviation of this prior.

Fig. 6 and Tab. 3 show that the inferred global parameters depend strongly on the adopted yield set: the posteriors of the six highest-ranked combinations are mutually inconsistent at several σ\sigma, with αIMF\alpha_{\mathrm{IMF}} ranging from −2.52-2.52 to −2.80-2.80 and log⁡10NIa\log_{10} N_{\mathrm{Ia}} from −2.68-2.68 to −3.10-3.10, while the statistical uncertainties are ≈0.02\approx0.02. The choice of yield set is thus the dominant source of uncertainty on these parameters. The highest-ranked combination, featuring Ritter et al. [109] (NuGrid) AGB yields in combination with the CC-SN yields used in the IllustrisTNG simulation Pillepich et al. [102] (Kobayashi et al. (2006); Portinari et al. [104]; represented by blue contours in Fig. 6), results in αIMF=−2.65±0.02\alpha_{\mathrm{IMF}} = -2.65 \pm0.02 and log⁡10NIa=−2.81±0.02\log_{10} N_{\mathrm{Ia}} = -2.81 \pm0.02.

All six yield sets favor an IMF slope steeper than the canonical Salpeter value (−2.35-2.35) and the Chabrier-like prior mean (−2.3-2.3), consistent with earlier studies of the solar neighborhood (e.g., [112]. The SN Ia normalization, in contrast, scatters around the prior mean of −2.89-2.89 across yield sets.

This comprehensive analysis of the Nissen et al. [92] data, leveraging the optimal yield sets identified through Bayesian model comparison and the advanced capabilities of COMPASS to incorporate stellar age constraints and handle incomplete elemental data, thus constrains the IMF slope and SN Ia normalization conditional on the yield set, with the yield-set choice dominating the uncertainty.

Model interpretability

Having demonstrated the accuracy and robustness of the COMPASS framework for both model comparison and parameter inference, we now address a crucial question: does the model base its conclusions on physically meaningful relationships, or does it exploit spurious correlations in the simulator output?

The transformer architecture underlying COMPASS provides a natural avenue for interpretability through its self-attention mechanism. Attention weights quantify how strongly each parameter query attends to individual observational features during inference. By analysing these attention patterns, we can trace the flow of information between elemental abundances and inferred parameters, thereby probing the model’s internal reasoning process to ensure that the results are not merely the product of a "black box" correlating simulator artifacts, but are grounded in physically meaningful relationships. Our analysis follows recent visualization approaches developed for diffusion transformers (e.g., [138]).

Since attention patterns evolve throughout the denoising trajectory, we inspect them at an intermediate diffusion time (t=0.5t = 0.5), where internal representations are known to be particularly structured and informative [58]. Figure 7 and B.5 in the Appendix present attention weights averaged over the full Nissen et al. [92] dataset for the preferred yield-set combination identified in Section 4.1.2.

Overall layer-averaged attention map

Figure 7. Overall layer-averaged attention map. This figure summarizes the model’s strategy by averaging the attention weights from Figure B.5 across all five layers. It highlights the most dominant information pathways integrated over the model’s full depth.

Global information pathways. The layer-averaged attention map (Fig. 7) reveals clear and physically interpretable dependencies. The high-mass IMF slope αIMF\alpha_{\mathrm{IMF}} predominantly attends to α\alpha-elements such as Oxygen (O) and Magnesium (Mg), with additional contributions from Carbon (C) and Iron (Fe). This behavior is physically expected: massive stars, whose abundance is governed by αIMF\alpha_{\mathrm{IMF}}, are the primary production sites of α\alpha-elements via core-collapse supernovae. A steeper IMF reduces the number of massive stars, directly lowering O and Mg yields. The model therefore correctly identifies α\alpha-element abundances as the dominant constraints on αIMF\alpha_{\mathrm{IMF}}.

The normalization of Type Ia supernovae, log⁡10(NIa)\log_{10}(N_{\mathrm{Ia}}), shows its strongest average attention towards Carbon abundance ratios. This dependence is astrophysically meaningful: increasing the SN Ia rate enhances iron production, thereby altering relative abundance ratios such as [C/Fe]. Carbon thus acts as an indirect tracer of delayed iron enrichment, making it a sensitive diagnostic of SN Ia normalization.

Local ISM parameters exhibit a different pattern. Their attention is dominated by the learned bias term, with secondary contributions from Iron (Fe). This suggests that these parameters primarily affect the overall normalization and metal-retention efficiency of the system rather than imprinting sharp element-specific signatures. The sensitivity of xoutx_{\mathrm{out}} to Fe is physically plausible, as iron abundances respond strongly to the ISM’s ability to retain or lose enriched material.

Stellar age (T) exhibits only weak attention weights (see Fig. B.5), primarily in early layers and mainly for local ISM parameters. This is consistent with the training setup: in Chempy global parameters such as αIMF\alpha_{\mathrm{IMF}} and log⁡10(NIa)\log_{10}(N_{\mathrm{Ia}}) are fixed in time and do not explicitly depend on cosmic epoch. The model therefore correctly refrains from attributing spurious predictive power to stellar age. This behavior provides additional evidence that COMPASS captures genuine physical correlations rather than overfitting temporal structure absent from the simulator.

Overall, the attention analysis demonstrates that COMPASS bases its inferences on physically interpretable relationships between nucleosynthetic channels and elemental abundance patterns. Rather than acting as a ‘black box’, the model reproduces established chemical evolution reasoning within its learned internal representations. Hence, the alignment between learned attention pathways and established nucleosynthetic channels provides independent validation of the physical consistency of the inference framework.

Discussion

This work establishes conditional score-based diffusion models as a unified and scalable framework for simulation-based inference in GCE. By combining neural posterior estimation and neural likelihood estimation within a single amortized architecture, COMPASS enables simultaneous parameter inference and Bayesian model comparison. Such capability has typically required separate and computationally intensive procedures. COMPASS ’s ability to simultaneously perform Bayesian model comparison and parameter inference represents a significant methodological advance over previous approaches in GCE modeling.

Our results demonstrate that diffusion-based SBI can deliver conservative posteriors, competitive accuracy, and physically interpretable reasoning within a single coherent framework.

Comparison to previous inference frameworks

Traditional inference approaches in GCE, including Hamiltonian Monte Carlo ([98, 99]) and likelihood-free neural posterior estimation ([19]), have successfully constrained parameters such as the IMF slope and SN Ia normalization. However, these techniques are often computationally demanding and limited in scalability when confronted with the large stellar samples of modern surveys.

In contrast, COMPASS performs fully amortized inference: once trained, it evaluates posteriors and likelihoods at negligible additional computational cost. This makes it particularly well-suited for modern spectroscopic surveys containing large stellar samples and extended chemical abundance spaces.

Within the broader simulation-based inference literature ([72] (Cranmer et al. 2020)), COMPASS extends recent diffusion-based approaches ([119, 49]) to astrophysical applications. Score-based generative models have been shown to provide improved stability and calibration relative to likelihood-ratio or density-ratio estimators. Importantly, the joint NPE/NLE functionality of COMPASS allows direct model ranking without resorting to expensive nested sampling of evidences, which has limited earlier cosmological SBI studies (e.g. [8, 56]), at the price that the resulting weights are relative predictive weights rather than evidence ratios (see § 2.4).

Physical implications and consistency with literature

Using high-precision elemental abundances from Nissen et al. [92], COMPASS favors a yield combination consisting of NuGrid AGB yields ([109]) and the CCSN yields adopted in IllustrisTNG ([101]). This preference aligns with previous studies indicating that hybrid prescriptions combining Portinari et al. [104] and Kobayashi et al. (2006) best reproduce Galactic α\alpha-element trends (e.g. [99, 19, 55]).

The inferred IMF slope, αIMF=−2.65±0.02\alpha_{\mathrm{IMF}} = -2.65 \pm0.02 for the preferred yield set (−2.52-2.52 to −2.80-2.80 across the best-ranked sets), is steeper than the canonical Salpeter value. Such a mildly bottom-heavy IMF is consistent with recent Galactic Archaeology analyses in the solar neighborhood ([113, 19] (Li et al. 2023)) and with evidence for IMF variations in external galaxies ([85, 41, 133]). Similarly, the inferred SN Ia normalization (log⁡NIa≈−2.81\log N_{\mathrm{Ia}} \approx-2.81 for the preferred yield set) is consistent with relatively efficient delayed iron enrichment, in agreement with the higher SN Ia rates proposed by Rybizki & Just [112]. Together, these findings reinforce a coherent picture in which efficient iron production and a moderately bottom-heavy IMF are required to reproduce the observed [α\alpha/Fe]–[Fe/H] trends in the local Galactic disk.

Current limitations and avenues for improvement

Despite its strengths, several limitations highlight directions for future development. First, the underlying Chempy one-zone model neglects radial migration and time-dependent star-formation efficiencies. Such effects become increasingly important when analysing spatially resolved or cosmological datasets (e.g. Andrews et al. [10]). Extending COMPASS to multi-zone frameworks (e.g. VICE; Johnson et al. [63]) or hydrodynamical simulations (e.g. Buck et al. [22, 20]) will enable more realistic modeling of chemo-dynamical evolution.

Second, stellar yields are treated as discrete table choices. In reality, yields depend continuously on stellar physics such as rotation, mass loss, explosion energy, and metallicity ([53] (Côté et al. 2017)). Future extensions could interpolate across yield grids or introduce parametric yield uncertainties, potentially enabling direct inference of nucleosynthetic yields within the SBI framework.

Third, the IMF and SN Ia delay-time distribution are fixed to specific parametric forms. Alternative functional shapes or break points (e.g. [43, 7]) could introduce degeneracies with the inferred parameters. Joint marginalization over these functional degrees of freedom will be essential in follow-up studies.

Finally, the Nissen et al. [92] dataset contains only 69 solar-type stars with 13 elemental abundances measured (C, O, Na, Mg, Al, Si, Ca, Ti, Cr, Fe, Ni, Sr, and Y). However, for this study we focus on Fe and four alpha elements (C, O, Mg, and Si). Applying COMPASS to large spectroscopic surveys such as GALAH (Buder et al. [25]), APOGEE (Abdurro’uf et al. [1]), LAMOST (Zhao et al. [139]), and forthcoming SDSS-V (Kollmeier et al. [71]), WEAVE (Dalton et al. [37]) or 4MOST (de Jong et al. [39]) observations will allow spatially resolved and statistically more stringent constraints.

Beyond these physical limitations, our statistical treatment has limitations that we quantify in this work. (i) The model weights are Akaike weights at the MAP, not evidence ratios. However, the preferred yield set is confirmed by an independent classifier (Appendix § 10.§ 1), but Bayes factors, unlike these weights, depend on the parameter priors, notably those of the local ISM parameters, and a full evidence computation is left for future work. (ii) Single-star posteriors are combined under a Gaussian approximation, which lets shared systematic errors grow in significance with the number of stars. (iii) The COMPASS posteriors are mildly under-confident (Appendix B.§ 3). (iv) Under model misspecification all tested methods are biased by several σ\sigma (Appendix § 11).

Interpretability and physical transparency

A key advantage of COMPASS lies in its attention-based interpretability. The model associates α\alpha-elements such as oxygen and magnesium with the inference of the IMF slope, while abundance ratios sensitive to iron enrichment dominate the determination of the SN Ia normalization. This alignment between learned attention pathways and established nucleosynthetic channels provides internal validation that the model’s conclusions are physically grounded rather than driven by spurious correlations. In this sense, interpretability is not merely diagnostic but forms an integral part of the statistical validation of diffusion-based inference in astrophysics.

Conclusions and outlook

In this work we have introduced COMPASS, a unified framework for joint parameter inference and Bayesian model comparison in Galactic Chemical Evolution based on conditional score-based diffusion models and transformer architectures. By combining neural posterior and likelihood estimation within a single amortized architecture, COMPASS enables scalable and physically interpretable simulation-based inference in complex likelihood-free settings.

Our main findings can be summarized as follows:

  • In controlled mock experiments, COMPASS recovers ground-truth parameters with accuracy comparable to existing SBI approaches, with conservative (1.4–1.6 times wider) posteriors, while reducing computational cost by orders of magnitude compared to traditional HMC-based techniques.

  • COMPASS ranks competing yield sets without requiring explicit evidence sampling, correctly identifying the true generative model in mock tests and favoring a hybrid NuGrid + TNG yield prescription when applied to Milky Way abundance data, a preference confirmed by an independent neural classifier.

  • Applied to high-precision Milky Way abundance data, COMPASS infers αIMF=−2.65±0.02\alpha_{\mathrm{IMF}}=-2.65 \pm0.02 and log⁡(NIa)=−2.81±0.02\log(\mathrm{N}_{\mathrm{Ia}})=-2.81 \pm0.02 for the preferred yield set, with a larger systematic spread between the best-ranked yield sets, consistent with independent studies and supporting a moderately bottom-heavy IMF together with efficient delayed iron enrichment in the solar neighborhood.

  • The transformer attention analysis demonstrates that the model’s inferences are anchored in physically meaningful abundance signatures, linking α\alpha-elements to the IMF slope and iron-sensitive ratios to the SN Ia normalization. This internal consistency mitigates concerns about ‘black-box’ behavior and establishes interpretability as a core strength of the framework.

Beyond these specific results, COMPASS illustrates the broader potential of diffusion-based simulation-based inference for data-driven model testing in astrophysics. Its amortized nature makes it particularly well suited for the data volume and dimensionality of current and upcoming spectroscopic surveys (e.g., SDSS-V, WEAVE, 4MOST), while its modular design enables integration with multi-zone GCE models, cosmological hydrodynamical simulations, and hierarchical population-level inference.

Future work will extend the framework to more flexible IMF and SN Ia delay-time parameterizations, continuous yield modeling, and spatially resolved Galactic datasets. By unifying model comparison, parameter inference, and interpretability within a single probabilistic architecture, COMPASS provides a scalable pathway towards statistically rigorous and physically transparent constraints on galactic enrichment.

In this sense, diffusion-based SBI does not merely offer a computational improvement, but represents a conceptual step towards closing the loop between stellar nucleosynthesis theory, galaxy formation modeling, and precision chemical-abundance observations.

Data availability

We publicly release our code via Github: https://github.com/bGünes/COMPASS. Our trained model weights can be found on zenodo: https://zenodo.org/records/18718146

Acknowledgements. This project was made possible by funding from the Carl-Zeiss-Stiftung. This work was supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)—573580088. We acknowledge the usage of the AI clusters Tom and Jerry, funded by Field of Focus 2 of Heidelberg University. This work benefited from discussions at the Lorentz Center workshop “Machine Learning in Astrochemistry”.

AI Disclosure

We used Anthropic’s Claude, Google’s Gemini and OpenAI’s ChatGPT to aid in code development and to proof-read text and formulae. The authors reviewed and edited all generated text and take full responsibility for the final content. All AI-generated code was independently tested, verified, and supervised by the authors.

The COMPASS engine

At the heart of COMPASS lies the ScoreBasedInferenceModel (SBIm), an implementation built upon the principles of stochastic differential equations (SDEs) for generative modeling. This section details the forward and reverse diffusion process, the architecture of the score-predicting ConditionTransformer, and its training and sampling procedures.

The diffusion process

The foundation of the generative model is a forward diffusion process that gradually perturbs input data z0z_0 (representing the joint vector (θ,x)(\theta, x)) into a simple noise distribution over a continuous time variable t∈[0,1]t \in[0, 1]. This process is defined by the stochastic differential equation (SDE):

dz=f(z,t)dt+g(t)dw(13)d z = f(z,t)dt + g(t)dw \tag*{(13)}

where f(⋅,t):RD→RDf(\cdot,t): \mathbb{R}^{D} \to\mathbb{R}^{D} is the drift coefficient, g(t)∈Rg(t) \in\mathbb{R} is the diffusion coefficient, and ww represents standard Brownian motion. COMPASS employs a Variance Exploding SDE (VESDE) Song & Ermon [118], where the drift and diffusion coefficients are specifically:

f(z,t)=0andg(t)=σt(14)f(z,t)=0 \quad\mathrm{and} \quad g(t)=\sigma^{t} \tag*{(14)}

Here, σ>1\sigma> 1 is a hyperparameter controlling the diffusion scale. The perturbed data distribution p0t(zt∣z0)p_{0t}(z_t|z_0) at time tt, given an initial state z0z_0, is a Gaussian:

p0t(zt∣z0)=N(zt∣z0,σ2t−12ln⁡σ)(15)p_{0t}(z_t|z_0) = \mathcal{N}\left(z_t|z_0,\frac{\sigma^{2t}-1}{2\ln\sigma}\right) \tag*{(15)}

Thus, the variance of the added noise at time tt is σt2=σ2t−12ln⁡σ\sigma_t^2 = \frac{\sigma^{2t}-1}{2\ln\sigma}, which grows exponentially in the diffusion process.

The generative process involves reversing this diffusion guided by the corresponding reverse-time SDE Anderson [9]:

dz=[f(z,t)−g2(t)∇zlog⁡pt(z)]dt+g(t)dwˉ(16)d z = \left[f(z,t)-g^2(t)\nabla_z\log p_t(z)\right]dt + g(t)d\bar{w} \tag*{(16)}

where wˉ\bar{w} is Brownian motion in reverse time, and dtdt is an infinitesimal negative time step. For the chosen VESDE (f(z,t)=0f(z,t)=0, g(t)=σtg(t)=\sigma^t), this simplifies to:

dz=[−σ2t∇ztlog⁡pt(zt)]dt+σtdwˉ(17)d z = \left[-\sigma^{2t}\nabla_{z_t}\log p_t(z_t)\right]dt + \sigma^t d\bar{w} \tag*{(17)}

Generation of samples from the target data distribution p0(z)p_0(z) starting from a simple Gaussian prior p1(z)p_1(z) (conventionally T=1T=1) requires estimating the score function, ∇ztlog⁡pt(zt)\nabla_{z_t}\log p_t(z_t), at each time tt.

Conditional transformer architecture

The ConditionTransformer in COMPASS approximates the time-dependent conditional score function in Equation A.5 using a neural network with parameters ϕ\phi.

∇ztlog⁡pt(zt)≈sϕ(zt,MC,t)(18)\nabla_{z_t}\log p_t(z_t) \approx s_\phi(z_t,\mathcal{M}_C,t) \tag*{(18)}

The architecture is inspired by recent advancements in generative modeling [96, 49], introducing key modifications for flexible and accurate conditional density estimation. COMPASS employs a transformer architecture based on the Diffusion Transformer (DiT).

Condition transformer architecture

Figure A.1. Condition transformer architecture. The network, built upon a transformer model, is designed to predict the conditional score. The joint data (θ,x)(\theta, x) are provided as input tokens. Conditioning is achieved in two ways: the diffusion timestep tt is incorporated via adaptive layer normalization (Scale & Shift), and the condition mask MC\mathcal{M}_C generates a self-attention mask to govern the information flow between tokens.

Peebles & Xie [96], specifically utilizing adaptive layer normalization initialized at zero (adaLN-Zero) and incorporating the timestep tt as additional condition context.

The input to the COMPASS transformer is a joint vector z=(θ,x)\mathbf{z}=(\theta,x), where θ∈RDθ\theta\in\mathbb{R}^{D_\theta} are the model parameters and x∈RDxx \in\mathbb{R}^{D_x} are the corresponding observations. The total dimensionality of the input is D=Dθ+DxD=D_\theta+D_x. Crucially, a binary condition mask MC∈{0,1}D\mathcal{M}_C \in\{0,1\}^{D} is also provided as input. This mask dictates the role of each element in z\mathbf{z}:

  • MC(j)=1\mathcal{M}_C^{(j)}=1: The jj-th element z(j)z^{(j)} is an observed or conditional value.

  • MC(j)=0\mathcal{M}_C^{(j)}=0: The jj-th element z(j)z^{(j)} is a latent value to be inferred or generated.

The input data z\mathbf{z} are first projected into a high-dimensional embedding space and the diffusion timestep tt is embedded using a sinusoidal timestep embedding. These embeddings, along with the condition mask MC\mathcal{M}_{\mathrm{C}}, are processed by a series of transformer blocks, as illustrated in Figure A.1. The Multi-Head Self-Attention layers within these blocks are modified with a custom attention mask derived from MC\mathcal{M}_{\mathrm{C}}. This attention mask ensures that latent tokens (where MC(j)=0\mathcal{M}_{\mathrm{C}}^{(j)} = 0) can only attend to observed/conditional tokens (where MC(k)=1\mathcal{M}_{\mathrm{C}}^{(k)} = 1), but not to other latent tokens. This focused attention mechanism allows the model to effectively learn the conditional score function.

This conditional architecture allows COMPASS to serve dual roles:

  • Neural Posterior Estimator (NPE): To estimate P(θ∣xobs)P(\theta\mid\mathbf{x}_{\mathrm{obs}}), xobs\mathbf{x}_{\mathrm{obs}} is set as the condition (MC\mathcal{M}_{\mathrm{C}} elements for x\mathbf{x} are 1, for θ\theta are 0). The model then learns to denoise and generate samples of θ\theta.

  • Neural Likelihood Estimator (NLE): To estimate P(x∣θcond)P(\mathbf{x} \mid\theta_{\mathrm{cond}}), θcond\theta_{\mathrm{cond}} is set as the condition (MC\mathcal{M}_{\mathrm{C}} elements for θ\theta are 1, for x\mathbf{x} are 0). The model learns to denoise and generate samples of x\mathbf{x}.

Training C

Algorithm 1 Training COMPASS

Require: z0=(θ,x)\mathbf{z}_0 = (\theta, \mathbf{x})

Sample: ϵ∼N(0,I)\epsilon\sim\mathcal{N}(0, \mathbf{I})

Sample: t∼Uniform⁡(0,1)t \sim\operatorname{Uniform}(0, 1)

Sample: MC∼Bernoulli⁡(1/3)\mathcal{M}_{\mathrm{C}} \sim\operatorname{Bernoulli}(1/3)

σt←σ2t−12ln⁡σ\sigma_t \leftarrow\sqrt{\frac{\sigma^{2t}-1}{2\ln\sigma}}
zt←MC⋅z0+(1−MC)⋅σtϵ\mathbf{z}_t \leftarrow\mathcal{M}_{\mathrm{C}} \cdot\mathbf{z}_0 + (1-\mathcal{M}_{\mathrm{C}})\cdot\sigma_t\epsilon
s^←sϕ(zt,MC,t)\hat{\mathbf{s}} \leftarrow s_\phi(\mathbf{z}_t,\mathcal{M}_{\mathrm{C}},t)
L(ϕ)←σt2∥(1−MC)⋅(ϵ−σts^)∥2\mathcal{L}(\phi) \leftarrow\sigma_t^2\lVert(1-\mathcal{M}_{\mathrm{C}})\cdot(\epsilon-\sigma_t\hat{\mathbf{s}})\rVert^2

Update: ϕ←ϕ−η∇ϕLavg\phi\leftarrow\phi-\eta\nabla_\phi\mathcal{L}_{\mathrm{avg}}

The ScoreBasedInferenceModel sϕ(zt,MC,t)s_\phi(\mathbf{z}_t,\mathcal{M}_{\mathrm{C}},t) is trained by minimizing a weighted sum of denoising score matching objectives. Specifically, the objective is to learn the score of the data distribution conditioned on the observed values specified by MC\mathcal{M}_{\mathrm{C}}. During the training process, the condition mask MC\mathcal{M}_{\mathrm{C}} is sampled randomly at every training batch from a Bernoulli distribution, as proposed by Gloeckler et al. [49], to learn the correlation between all tokens.

COMPASS is implemented in PyTorch and designed for efficient training on multiple GPUs. The AdamWScheduleFree optimizer from the schedulefree package (Defazio et al. [40]) is employed, which replaces the momentum of an underlying optimizer (AdamW) with a combination of interpolation and averaging. This approach eliminates the need for manual learning rate schedule tuning while maintaining state-of-the-art performance. The training routine of a batch is detailed in Algorithm 1.

Sampling with C

Algorithm 2 Sampling COMPASS

Require: z0;θ=θ\mathbf{z}_{0;\theta}=\theta or z0;x=x\mathbf{z}_{0;\mathbf{x}}=\mathbf{x}

if z0;θ\mathbf{z}_{0;\theta} then MC←({1}Dθ,{0}Dx)\mathcal{M}_{\mathrm{C}}\leftarrow(\{1\}^{D_\theta},\{0\}^{D_\mathbf{x}})

if z0;x\mathbf{z}_{0;\mathbf{x}} then MC←({0}Dθ,{1}Dx)\mathcal{M}_{\mathrm{C}}\leftarrow(\{0\}^{D_\theta},\{1\}^{D_\mathbf{x}})

Sample: ϵ∼N(0,I)\epsilon\sim\mathcal{N}(0,\mathbf{I})

z1←(1−MC)⋅ϵ+MC⋅z0;{θ or x}\mathbf{z}_1\leftarrow(1-\mathcal{M}_{\mathrm{C}})\cdot\epsilon+\mathcal{M}_{\mathrm{C}}\cdot\mathbf{z}_{0;\{\theta\ \mathrm{or}\ \mathbf{x}\}}

for t=1t=1 to 00

zt′←zt+(1−MC)σtsϕ(zt,MC,t) dt\mathbf{z}_{t'}\leftarrow\mathbf{z}_t+(1-\mathcal{M}_{\mathrm{C}})\sigma_t s_\phi(\mathbf{z}_t,\mathcal{M}_{\mathrm{C}},t)\,dt

if Corrector Step then

n∼N(0,I)\mathbf{n}\sim\mathcal{N}(0,\mathbf{I})
zt′←zt′+(1−MC)⋅(δLσt′2sϕ(zt′,MC,t′)+2δLσt′2⋅n)\mathbf{z}_{t'}\leftarrow\mathbf{z}_{t'}+(1-\mathcal{M}_{\mathrm{C}})\cdot\left(\delta_L\sigma_{t'}^2s_\phi(\mathbf{z}_{t'},\mathcal{M}_{\mathrm{C}},t')+\sqrt{2\delta_L\sigma_{t'}^2}\cdot\mathbf{n}\right)

Once the score model sϕs_\phi is trained, samples can be generated from the target conditional distribution p0(zlatent∣zobserved)p_0(\mathbf{z}_{\mathrm{latent}}\mid\mathbf{z}_{\mathrm{observed}}) by numerically solving the reverse SDE (see Sec. A.1).

COMPASS primarily utilizes the DPM-Solver proposed in Lu et al. (2022), a family of high-order solvers that generally offers better accuracy and efficiency compared to the simpler Euler-Maruyama method for a given number of function evaluations. The DPM-Solver leverages the semi-linearity of diffusion ODEs and it directly approximates a simplified formulation of the exact solution, which consists of an exponentially weighted integral of the noise prediction model Lu et al. (2022). The deterministic part of the reverse SDE for the employed VESDE is −σt2sϕ(z,MC,t)-\sigma_t^2s_\phi(\mathbf{z},\mathcal{M}_{\mathrm{C}},t). The DPM-Solver integrates this term, often by leveraging the corresponding probability flow ODE Song et al. [119]. For a time step form tt to t′t' (where dt=t−t′>0dt=t-t'>0) with the condition mask MC\mathcal{M}_{\mathrm{C}}, the first order DPM-Solver update in the SBIm is:

zt′=zt−(1−MC)σtsϕ(zt,MC,t) dt(19)\mathbf{z}_{t'}=\mathbf{z}_t-(1-\mathcal{M}_{\mathrm{C}})\sigma_t s_\phi(\mathbf{z}_t,\mathcal{M}_{\mathrm{C}},t)\,dt \tag*{(19)}

Higher-order versions (2nd and 3rd), also implemented in COMPASS , utilize intermediate evaluations of the score function and weighted averages to achieve greater accuracy per step.

To further enhance sample quality, COMPASS’s implementation incorporates optional Langevin corrector steps. Following a predictor step a few corrector steps can be applied:

zt′=zt′+(1−MC)⋅(δLσt′2sϕ(zt′,MC,t′)+2δLσt′2⋅n)(20)\mathbf{z}_{t'}=\mathbf{z}_{t'}+(1-\mathcal{M}_{\mathrm{C}})\cdot\left(\delta_L\sigma_{t'}^2s_\phi(\mathbf{z}_{t'},\mathcal{M}_{\mathrm{C}},t')+\sqrt{2\delta_L\sigma_{t'}^2}\cdot\mathbf{n}\right) \tag*{(20)}

where n∼N(0,I)\mathbf{n}\sim\mathcal{N}(0,\mathbf{I}), t′t' is the next timestep after the last predictor step, and δL\delta_L is the signal-to-noise ratio. These corrector steps inject appropriately scaled noise and re-apply a score-based update, helping to refine samples, improve adherence to the data manifold, and prevent potential mode collapse. In COMPASS , these Langevin corrector steps are applied periodically (e.g., every 5 main diffusion timesteps by default) and for a fixed number of iterations (e.g., 5 corrector steps) each time they are triggered.

The combination of the DPM-Solver (predictor) with periodic Langevin correction allows for a more accurate and robust evolution of the diffusion process. The ODE solver efficiently traverses the probability space, while the stochastic Langevin refinement helps to explore it more thoroughly. Algorithm 2 details the sampling procedure for generating conditional samples using a first order DPM-Solver coupled with Langevin corrector steps.

Calibration

The performance of score-based inference models is highly sensitive to their hyperparameter configurations. This part presents a systematic evaluation of two key components that govern the accuracy and computational efficiency of the model: the architecture of the neural network used for score estimation and the temporal discretization of the reverse diffusion process. Both aspects were optimized independently to balance inference quality against resource demands.

Network architecture & hyperparameter selection

The network architecture defines the inductive bias and capacity of the model used to approximate the score function in the reverse diffusion process. The performance of the score-based inference model is highly sensitive to the architectural choices that define its inductive bias and capacity. To identify a robust and high-performing configuration, we conducted a comprehensive hyperparameter optimization study using the optuna framework (Akiba et al. [6]). The optimization trials were targeting the predictive accuracy and the posterior calibration. The accuracy is measured by the negative log-posterior (−log⁡P(θ∣x)-\log P(\theta|x)), evaluated at the ground-truth parameters for a set of mock observations. Lower values indicate that the true parameters fall in regions of higher posterior probability, signifying a more accurate model. The calibration of the posterior is measured by the maximum deviation of the TARP diagnostic (Δmax⁡TARP\Delta_{\max\mathrm{TARP}}) from the ideal diagonal line (Lemos et al. [72]). Lower values indicate better statistical coverage and more reliable uncertainty estimates. The key architectural hyperparameters explored in this study were the number of transformer blocks (depth), the dimensionality of the token embeddings (hidden size), the expansion factor for the hidden layers in the MLP blocks (mlp ratio), the number of attention heads in the Multi-Head Self-Attention mechanism (num heads), the batch size (batch size) and the maximum noise level in the VESDE schedule (sigma).

Table B.1 summarizes the top-performing configurations for each of the two objectives on the GCE example from § 4.1. Trial 275 emerged as a uniquely strong candidate, as it was the only hyperparameter combination to appear in the top-10 list for both predictive accuracy and posterior calibration. This configuration strikes an excellent balance between generating sharp, accurate posteriors and achieving good calibration on the optimization set (see Appendix B.§ 3 for the per-parameter assessment). We therefore selected the architecture from Trial 275 as the default for the GCE experiments.

A crucial insight from the optuna study was the overwhelming importance of the diffusion noise schedule parameter, sigma (σ\sigma). The choice of σ\sigma defines the variance of the terminal noise distribution, pT(z)=N(0,σ2)p_T(z) = \mathcal{N}(0,\sigma^2), into which all data points are perturbed during the forward process. For the reverse generative process to be effective, this terminal distribution must fully contain the support of the initial data distribution p0(z)p_0(z). If the initial data contains values that fall outside the typical range of the noise distribution (i.e., if the data variance is larger than the noise variance), the model will fail to generate them accurately. Optuna’s internal feature importance analysis confirmed this theoretical sensitivity, identifying sigma as the most influential hyperparameter. This highlights that ensuring the validity of the diffusion process’s core assumption is more critical to performance than the specific architectural details of the denoiser network.

Trial−log⁡P(θ∣x)-\log P(\theta|x)Δmax⁡TARP\Delta_{\max}\mathrm{TARP}Batch SizeSigmaDepthHeadsHidden SizeMLP Ratio
113-1.760.088622.551363
174-1.600.098622.551363
215-1.900.108622.5111653
223-1.970.103752.551361
260-1.940.101252.551341
242-1.760.108422.551283
249-1.870.108622.551343
275†-2.200.101252.551653
287-1.920.106082.551653
277-1.740.118422.561283
193-2.260.1512522.2111653
233-2.220.1612523.0316510
213-2.220.124852.5511671
275†-2.200.101252.551653
272-2.170.124852.5311672
263-2.160.1620327.0111343
256-2.150.111252.571651
290-2.150.1616123.041659
284-2.140.131253.83110610
195-2.100.1620320.1111278

Table B.1. Top-performing hyperparameter configurations of the optuna study.

Notes. Results of a 1000-trial optuna study on the GCE task, minimizing both the negative predictive accuracy (−log⁡P(θ∣x)-\log P(\theta|x)) and the maximal deviation of the TARP diagnostic (Δmax⁡TARP\Delta_{\max}\mathrm{TARP}). The upper section lists the top 10 trials ranked by the Δmax⁡TARP\Delta_{\max}\mathrm{TARP} objective, the lower section the top 10 trials ranked by the −log⁡P(θ∣x)-\log P(\theta|x) objective. Trial 275 (marked with †) is the only configuration to appear in both lists and was selected as the default architecture.

Diffusion time

The accuracy and efficiency of sampling in score-based diffusion models critically depend on the choice of time discretization. Selecting appropriate time steps is essential to faithfully approximate the reverse SDE and avoid numerical artifacts. This part aims to find the best trade-off between accuracy and inference speed, as well as compare the Euler-Maruyama scheme to the DPM-Solver (see Appendix A.§ 4).

Figure B.1 shows the accuracy of the solver over the inference time per sample. The predictive accuracy of the network is measured by inferring 1000 samples from a test set observation xx, over which a Gaussian kernel density estimator fits the posterior function, which is then evaluated at the parameters θ\theta of the test set. For this test a total of 1000 mock observations have been evaluated and the figure shows the average inference time and accuracy per sample. Each stochastic differential equation (SDE) solver is tested on 15 different diffusion timesteps and the inference time is averaged over the samples. The evaluation has been conducted on 8 Nvidia RTX 2080 Ti GPUs in parallel.

The dashed horizontal line in Figure B.1 is set at −log⁡P(θ∣x)≈0.693-\log P(\theta|x) \approx0.693, corresponding to a posterior probability density value of P(θ∣x)=0.5P(\theta|x) = 0.5 evaluated at the true parameter θ\theta. This threshold serves as a practical benchmark: values below this line indicate that the true parameter falls within a region of relatively high posterior density, suggesting a reasonably well-concentrated and informative posterior. Based on the results in figure B.1, it can be deduced that the DPM-Solver, across all tested orders (1st, 2nd and 3rd), consistently achieves significantly higher accuracy (lower −log⁡P(θ∣x)-\log P(\theta|x) values) compared to the Euler-Maruyama scheme for any given inference time or number of steps. This makes DPM-Solvers the unequivocally preferred choice for this application. While higher-order DPM-Solvers can offer marginal accuracy improvements, these often come with increased computational demands. The first order DPM-Solver demonstrates a robust balance, achieving accuracy comparable to its higher-order counterparts but with greater computational efficiency within the targeted accuracy regime. With 500 diffusion timesteps, the first order DPM-Solver yields an average −log⁡P(θ∣x)-\log P(\theta|x) value comfortably below the P(θ∣x)=0.5P(\theta|x) = 0.5 (i.e., −log⁡P(θ∣x)≈0.693-\log P(\theta|x) \approx0.693) acceptability threshold, indicating that the resulting posteriors are well-concentrated around the true parameter values. The trajectory of the DPM-Solver curves in Figure B.1 show that increasing the number of timesteps beyond approximately 500 results in progressively smaller gains in accuracy. The curve begins to flatten, signifying that the additional computational expense of more steps yields diminishing returns in terms of reducing −log⁡P(θ∣x)-\log P(\theta|x). An average inference time of approximately 1 second per sample, as achieved with the first order DPM-Solver and 500 steps, is deemed a practical and efficient duration for the scope of this work. This allows for extensive model testing and application without prohibitive computational overhead. Therefore, the first order DPM-Solver configured with 500 diffusion timesteps is selected as the default for subsequent inference experiments. This configuration offers a compelling balance, delivering high inference accuracy that meets practical acceptability criteria, while maintaining reasonable computational efficiency and avoiding the diminishing returns associated with a significantly larger number of timesteps.

Accuracy of SDE solvers

Figure B.1. Accuracy of SDE solvers. Comparison of SDE solver performance in terms of predictive accuracy (−log⁡P(θ∣x)-\log P(\theta|x)) versus inference time per sample. Euler-Maruyama and DPM-Solvers (1st, 2nd, and 3rd order) were tested with varying numbers of diffusion steps (indicated by colored points, ranging from 5 to 5000 steps). Accuracy is averaged over 1000 mock observations. The dashed horizontal line at −log⁡P(θ∣x)≈0.693-\log P(\theta|x) \approx0.693 represents a posterior probability of P(θ∣x)=0.5P(\theta|x) = 0.5 for the true parameter. Lower −log⁡P(θ∣x)-\log P(\theta|x) values indicate higher accuracy. The DPM-Solver (1st order) with 500 steps offers a good balance of accuracy and computational efficiency.

However, for the Bayesian model comparison process we relax this timestep choice a little to reduce computational cost. Bayesian model comparison requires estimating the model posterior P(M∣x)P(\mathcal{M}|x). This typically involves inferring the parameters θ\theta for each model M\mathcal{M} and then evaluating the likelihood P(x∣θ,M)P(x|\theta,\mathcal{M}), which can be computationally intensive if full parameter inference is performed for every comparison. For model comparison we therefore reduced the number of diffusion steps to 50, which lowers the inference time roughly tenfold, to ≈0.1\approx0.1 s per sample (Fig. B.1). In the controlled comparison (§ 4.1) this setting identifies the generating model in all three cases, and on the Nissen et al. [92] data the resulting preferred yield set is confirmed independently (Appendix § 10.§ 1).

Posterior calibration

Following the optimization of the network architecture and the selection of an efficient SDE-solver and diffusion timestep configuration, it is crucial to verify that the resulting inference

TARP plot

Figure B.2. TARP plot. The TARP plot shows the expected coverage probability vs. the ground truth parameters under the inferred posterior samples credibility level α\alpha.

pipeline produces well-calibrated posterior distributions. A calibrated posterior accurately reflects the true uncertainty: an X%X\% credibility interval should contain the true parameter value X%X\% of the time over many different observations. This part evaluates the calibration using diagnostic plots, primarily TARP [72] and true-versus-predicted parameter plots.

Figure B.2 presents an aggregate TARP plot, which assesses the overall calibration of the inference procedure across all parameters and test samples. The expected coverage is plotted against the credibility level. The aggregate curve lies close to the diagonal, i.e. on average the coverage of the credible regions is approximately correct.

Figure B.3 provides more detailed information on the posterior calibration for each of the six Chempy parameters: the high-mass slope of the IMF αIMF\alpha_{\mathrm{IMF}}, the normalization of SN Type Ia log⁡10(NIa)\log_{10}(N_{\mathrm{Ia}}), the star formation efficiency log⁡10(SFE)\log_{10}(\mathrm{SFE}), the peak of the star formation rate log⁡10(SFRpeak)\log_{10}(\mathrm{SFR}_{\mathrm{peak}}), the stellar feedback fraction xoutx_{\mathrm{out}}, and the stellar birth time TT. For a perfectly calibrated model, these plots should align closely with the y=xy=x diagonal.

The per-parameter TARP curves (Fig. B.3, top) reveal deviations that the aggregate curve averages out. For αIMF\alpha_{\mathrm{IMF}}, log⁡10(NIa)\log_{10}(N_{\mathrm{Ia}}) and log⁡10(SFRpeak)\log_{10}(\mathrm{SFR}_{\mathrm{peak}}) the curves deviate from the diagonal in the direction of under-confidence: the credible regions contain the true value more often than their nominal level, i.e. the posteriors are over-dispersed. We traced part of this over-dispersion to how our first-order solver implementation parameterizes its steps (uniformly in diffusion time rather than in noise scale), which inflates posterior widths. The posterior means of the global parameters, which are of primary interest for this work, correlate tightly with the true values (Fig. B.3, bottom). In contrast, the local ISM parameters (log⁡10(SFE)\log_{10}(\mathrm{SFE}), log⁡10(SFRpeak)\log_{10}(\mathrm{SFR}_{\mathrm{peak}}), xoutx_{\mathrm{out}}) and the stellar birth time (TT) show considerably more scatter and wider posterior distributions relative to the true values. While the posteriors for these parameters still generally encompass the true values, the precision is lower. This difference in calibration quality is anticipated, as the observational data used are expected to provide stronger constraints on the global parameters that dictate the overall chemical evolution trends, rather than on the specifics of individual star-forming regions or individual stellar ages which have more localized effects or degeneracies.

Posterior calibration diagnostics

Figure B.3. Posterior calibration. Posterior calibration diagnostics for 1000 inferred parameters from a set of test observations. (Top) The individual TARP plots for each parameter. (Bottom) True parameter values against the mean of their inferred posterior distributions.

In summary, the inference is approximately calibrated in aggregate but mildly under-confident for the global parameters. The resulting credible regions are therefore conservative, which should be kept in mind when comparing posterior widths with other methods (§ 4.3.1). The lower precision for local parameters is acknowledged as a characteristic of the inference problem given the available data constraints.

Figure B.4 shows the single-star posteriors of the local ISM parameters for the preferred yield set and the Nissen et al. [92] stars. Their median widths are 1.7 (log⁡10(SFE)\log_{10}(\mathrm{SFE})), 2.8 (log⁡10(SFRpeak)\log_{10}(\mathrm{SFR}_{\mathrm{peak}})) and 2.6 (xoutx_{\mathrm{out}}) times the corresponding prior widths, so individual stars constrain them only weakly. This is why we focus on the global parameters, which are shared by all stars and are constrained by combining them.

Layer-wise attention masks

Figure B.5 reveals a clear and dynamic evolution of the model’s reasoning through its five layers. In the early layers (1-2), attention from all parameter queries is broadly distributed across multiple observational features and the learned bias term (bias kv). A key initial finding is the heavy reliance of local ISM parameters, particularly log⁡(SFE)\log(\mathrm{SFE}), on the learned bias term with slight reliance on stellar age. A significant shift occurs in layer 3, where attention for αIMF\alpha_{\mathrm{IMF}} sharpens to a value of 0.56 on Oxygen ([O/Fe]), and attention for local ISM parameters further concentrate on the bias. In the final layers (4 & 5), the model builds upon this foundation to form a more sophisticated, multi-variate understanding. For αIMF\alpha_{\mathrm{IMF}}, the attention remains focused on key alpha-elements like Magnesium ([Mg/Fe]) and Oxygen ([O/Fe]), but also incorporates Carbon ([C/Fe]) and Iron ([Fe/H]). The log⁡10(NIa)\log_{10}(N_{\mathrm{Ia}}) query develops an interestingly dominant and persistent focus on [C/Fe], reaching a peak attention weight of 0.66 in Layer 4. This progression from broad feature aggregation to targeted, physically meaningful associations suggests that the model constructs hierarchical representations rather than relying on single-element shortcuts.

Derivation of model posterior

Model comparison typically relies on model evidence. However, in simulator-based settings where the likelihood function is often intractable, calculating model evidence directly is not feasible. An alternative approach for model comparison, particularly suitable for non-nested models, is to use the Akaike Information Criterion (AIC) Akaike [4]. AIC estimates the prediction error and thereby the relative quality of statistical models for a given set of data.

Given the maximized log-likelihood for model Mi\mathcal{M}_i, denoted as ln⁡L(x∣θ^i,Mi)\ln\mathcal{L}(\mathbf{x}|\hat{\theta}_i,\mathcal{M}_i) (where θ^i\hat{\theta}_i are the parameter values that maximize the likelihood for model Mi\mathcal{M}_i), the AIC is defined as:

AICi=−2ln⁡L(x∣θ^i,Mi)+2ki(21)\mathrm{AIC}_i = -2\ln\mathcal{L}(\mathbf{x}|\hat{\theta}_i,\mathcal{M}_i) + 2k_i \tag*{(21)}

where kik_i is the number of estimable parameters in model Mi\mathcal{M}_i. The model with the lowest AIC is generally preferred.

To compare a set of NN models, we first calculate the AIC difference for each model Mi\mathcal{M}_i relative to the model with the minimum AIC in the set (AICmin⁡_{\min}): Wagenmakers & Farrell [132]; Akaike [4]; AKAIKE [5]; Bozdogan [17]:

Δi(AIC)=AICi−AICmin⁡(22)\Delta_i(\mathrm{AIC}) = \mathrm{AIC}_i - \mathrm{AIC}_{\min} \tag*{(22)}

The likelihood of model Mi\mathcal{M}_i being the best model (in the Kullback-Leibler information sense), given the data x\mathbf{x}, can be estimated relative to the other models using these AIC differences. The relative likelihood of model Mi\mathcal{M}_i, sometimes called an "Akaike weight", is given by Wagenmakers & Farrell [132]; Burnham & Anderson [28]:

Lrel(Mi∣x)∝exp⁡(−12Δi(AIC))(23)\mathcal{L}_{\mathrm{rel}}(\mathcal{M}_i|\mathbf{x}) \propto\exp\left(-\frac{1}{2}\Delta_i(\mathrm{AIC})\right) \tag*{(23)}

To obtain normalized model weights (Akaike weights) for each model, P(Mi∣x)\mathcal{P}(\mathcal{M}_i|\mathbf{x}), these relative likelihoods are normalized by summing over all models in the candidate set:

P(Mi∣x)=exp⁡(−12Δi(AIC))∑j=1Nexp⁡(−12Δj(AIC))(24)\mathcal{P}(\mathcal{M}_i|\mathbf{x}) = \frac{\exp\left(-\frac{1}{2}\Delta_i(\mathrm{AIC})\right)}{\sum_{j=1}^{N}\exp\left(-\frac{1}{2}\Delta_j(\mathrm{AIC})\right)} \tag*{(24)}

Figure B.4. Local ISM parameters. Single-star posteriors (mean ±1σ\pm1\sigma) of log⁡10(SFE)\log_{10}(\mathrm{SFE}), log⁡10(SFRpeak)\log_{10}(\mathrm{SFR}_{\mathrm{peak}}) and xoutx_{\mathrm{out}} against stellar age for the 69 Nissen et al. [92] stars, for the preferred NuGrid + TNG yield set. The gray band shows the prior mean ±1σ\pm1\sigma (Table 1).

Evolution of mean attention across transformer layers

Figure B.5. Evolution of mean attention across transformer layers. Mean attention weights of the COMPASS transformer, visualized for each of its five layers. The weights are averaged over all stars in the observational sample at a fixed diffusion timestep of t=0.5t = 0.5. The x-axis represents the information sources (keys), including stellar age (TT), elemental abundances, and a learned bias term. The y-axis represents the parameters being inferred (queries) which contain the global parameters αIMF\alpha_{\mathrm{IMF}} and log⁡10(NIa)\log_{10}(N_{\mathrm{Ia}}) as well as local ISM parameters (log⁡(SFE)\log(\mathrm{SFE}), log⁡(SFRpeak)\log(\mathrm{SFR}_{\mathrm{peak}}), and xoutx_{\mathrm{out}}).

Substituting Eq. (C.2) into Eq. (C.4):

P(Mi∣x)=exp⁡(−12(AICi−AICmin⁡))∑j=1Nexp⁡(−12(AICj−AICmin⁡))(25)\mathcal{P}(M_i\mid x)=\frac{\exp\left(-\frac{1}{2}(\mathrm{AIC}_i-\mathrm{AIC}_{\min})\right)}{\sum_{j=1}^{N}\exp\left(-\frac{1}{2}(\mathrm{AIC}_j-\mathrm{AIC}_{\min})\right)} \tag*{(25)}
=exp⁡(−12AICi)∑j=1Nexp⁡(−12AICj)(26)=\frac{\exp\left(-\frac{1}{2}\mathrm{AIC}_i\right)}{\sum_{j=1}^{N}\exp\left(-\frac{1}{2}\mathrm{AIC}_j\right)} \tag*{(26)}

Now, substituting the definition of AICi\mathrm{AIC}_i from Eq. (C.1) and under consideration that all models in COMPASS under comparison have the same number of parameters, i.e., ki=kj=kk_i = k_j = k for all i,ji,j, then the additional parameter term is common to the numerator and all terms in the sum in the denominator, and thus cancels out. In this specific scenario, the posterior model probability simplifies to a direct ratio of the maximized likelihoods of the data given each model:

P(Mi∣x)=L(x∣θ^i,Mi)∑j=1NL(x∣θ^j,Mj)(if ki=kj for all i,j)(27)\mathcal{P}(M_i\mid x)=\frac{\mathcal{L}(x\mid\hat{\theta}_i,M_i)}{\sum_{j=1}^{N}\mathcal{L}(x\mid\hat{\theta}_j,M_j)} \qquad\text{(if } k_i=k_j\text{ for all }i,j\text{)} \tag*{(27)}

The model with the highest weight P(Mi∣x)\mathcal{P}(M_i\mid x) is then considered the best-supported model by the data, according to this criterion. For equal kik_i, the same holds for the BIC (§ 2.4).

Independent check with a neural classifier

To test the yield-set ranking independently of the COMPASS likelihood estimate, the MAP and the AIC, we trained a neural classifier to identify which of the 40 yield sets generated a star [cf. 61]. The classifier is a four-layer multilayer perceptron (256 units per layer, GELU activations, dropout 0.1) trained on 2×1052 \times10^{5} Chempy simulations per yield set. Its inputs are the observables available for the Nissen et al. [92] stars (age and the C, Fe, Mg, O and Si abundances), with the same 0.05 dex Gaussian noise as used for COMPASS. For balanced classes, its softmax output estimates P(Mi∣x)\mathcal{P}(M_i \mid x) under equal model priors and the simulation prior. On 8×1058 \times10^{5} simulations from the validation split, which were not used in training, the classifier is well calibrated (Fig. C.1), i.e. the expected calibration error of the top-ranked class is 0.005, and predicted probabilities match empirical frequencies across the range 10−410^{-4}–0.25. Its accuracy is 23.7%, against a chance level of 2.5%, reflecting that many yield sets predict similar abundance patterns for individual stars.

For the 69 Nissen et al. [92] stars we marginalize the observational errors of each star with 300 Monte Carlo realizations and combine the stars as in Eq. (12). We find that the classifier prefers the NuGrid + TNG combination with the next best model (TNG + TNG) being lower by Δln⁡P=−109\Delta\ln P=-109. Its ranking correlates with Table 2 (Spearman ρ=0.89\rho=0.89; 7 of the top 10 models in common).

Figure C.1. Calibration of the yield-set classifier on 8×1058 \times10^{5} validation simulations. (Left) Accuracy against confidence of the top-ranked class. (Right) Predicted class probabilities P(Mk∣x)P(\mathcal{M}_k|x) against the empirical frequency of the true class, in quantile bins over all classes. The dashed lines show perfect calibration.

Model misspecification tests

Here we investigate the sensitivity of COMPASS to misspecification by using mock data generated with yield sets different from those used for training.

Mock Chempy data

The mock data generation follows the same procedure as previously described, using Chempy with an alternative yield set combination consisting of SN Ia yields taken from Thielemann et al. [122], CC-SN yields from Nomoto et al. [93] and AGB yields from Karakas & Lugaro [65]. The global parameters are fixed again at αIMF=−2.3\alpha_{\mathrm{IMF}} = -2.3 and log⁡10NIa=−2.89\log_{10} N_{\mathrm{Ia}} = -2.89 while local ISM parameters were drawn from their priors (see Table 1 in Buck et al. [19]) effectively leading to a multi-zone model. The chosen alternative yield sets ensure that the contributions from SN Ia, CC-SN and AGB nucleosynthesis differ by approximately O(10%)O(10\%) from the training yields, providing a significant test of robustness.

Figure D.1 presents the parameter inference results under these misspecified yield sets conditions. Model misspecification biases all methods. With 200 stars, COMPASS gives αIMF=−2.323±0.008\alpha_{\mathrm{IMF}} = -2.323 \pm0.008 and log⁡10NIa=−2.947±0.011\log_{10} N_{\mathrm{Ia}} = -2.947 \pm0.011, i.e. biases of −2.9σ-2.9\sigma and −5.1σ-5.1\sigma (Mahalanobis distance 5.1; 1.0% and 2.0%). SBI is biased by −13σ-13\sigma and −14σ-14\sigma (2.9% and 3.7%), and HMC with the Philcox & Rybizki [99] emulator by −7.4σ-7.4\sigma and −7.0σ-7.0\sigma. HMC with the same emulator as SBI is less biased (N=100N = 100: −0.5σ-0.5\sigma and −2.3σ-2.3\sigma, against −2.0σ-2.0\sigma and −3.8σ-3.8\sigma for COMPASS at N=100N = 100), because its per-element model-error term widens its posterior. COMPASS is thus considerably less biased than the NPE baseline, but its posterior does not cover the truth. This means inferences under misspecified yields must not be interpreted at face value, which underscores the importance of selecting the yield set first. The right-hand panel shows that the bias in units of σ\sigma grows as the posterior contracts with NstarsN_{\mathrm{stars}}.

IllustrisTNG hydrodynamical simulation

The one-zone GCE model Chempy inherently simplifies complex ISM physics, such as star formation, feedback and metal mixing or even radial migration of stars between different zones. While Chempy allows for star-specific ISM environments effectively creating multi-zone models, it does not model gas or star exchange between these environments or episodic events like sudden star formation bursts. Hence this section investigates the potential biases introduced by these simplifications when inferring SSP parameters from more realistic hydrodynamical galaxy simulations. In order to explore these effects, we analyze a more complex model of the formation and chemical enrichment of a Milky Way type galaxy taken from the IllustrisTNG simulations. Unlike Chempy, IllustrisTNG includes spatially resolved star formation, feedback and metal mixing and mergers and radial migration.

In detail, we use a galaxy with subhalo ID 523071 and mass close to 1012M⊙10^{12}M_{\odot} from the z=0z = 0 snapshot of highest-resolution TNG100-1 simulation5{}^{5}. From approximately 40,000 stellar particles in this subhalo, 1,000 are randomly selected. Each particle, with a mass of ∼1.4×106M⊙\sim1.4 \times10^{6}M_{\odot} (Nelson et al. [90]), serves as a proxy for a mass distinct stellar environment, providing elemental mass fractions {dij}\{d_i^j\} and a cosmological scale factor aia_i at its formation time. These are converted to [X/Fe] abundance ratios and stellar birth times TiT_i using Asplund et al. [12] solar abundances and astropy (Astropy Collaboration et al. [13]; Price-Whelan et al. [106]) with a Λ\LambdaCDM cosmology (Planck Collaboration et al. [103] parameters), consistent with TNG (Pillepich et al. [100]). Observational errors (5% Gaussian) are added to mimic the Chempy mock data. As in Philcox & Rybizki [99], particles with Ti∉[2,12.8]T_i \notin[2, 12.8] Gyr (approx. 5% of stars) are excluded to avoid neural network extrapolation errors near training age boundaries.

For the IllustrisTNG galaxy (Fig. D.2), all methods recover log⁡10(NIa)\log_{10}(N_{\mathrm{Ia}}) reasonably well (COMPASS −0.1σ-0.1\sigma, SBI +3.2σ+3.2\sigma, HMC +0.3σ+0.3\sigma), while αIMF\alpha_{\mathrm{IMF}} is biased high: COMPASS gives αIMF=−2.262±0.008\alpha_{\mathrm{IMF}} = -2.262 \pm0.008 (+4.6σ+4.6\sigma) and SBI is biased by +7.2σ+7.2\sigma. HMC with the Philcox & Rybizki [99] emulator gives +2.7σ+2.7\sigma. We note that this HMC run uses the Philcox & Rybizki [99] noise realization, per-star errors and stellar ages of these stars, whereas COMPASS and SBI use 5% noise and no ages. With the same emulator as SBI, HMC shows the same bias as COMPASS and SBI (N=100N = 100: +5.1σ+5.1\sigma, against +4.7σ+4.7\sigma for COMPASS and +5.9σ+5.9\sigma

Figure D.1. Parameter inference for alternative yields. Comparison of inference results for the global galactic parameters using COMPASS (red), SBI (blue) and HMC (gray) on mock data generated with alternative yield sets that do not match the yields used for training. (Left) Joint posterior distribution of αIMF\alpha_{\mathrm{IMF}} and log⁡10NIa\log_{10}N_{\mathrm{Ia}} inferred from 200 stars; methods and contours as in Figure 5. (Right) Convergence of the inferred parameters as a function of NstarsN_{\mathrm{stars}}; open diamonds as in Figure 5.

Parameter inference from an IllustrisTNG Milky Way simulation

Figure D.2. Parameter inference from an IllustrisTNG Milky Way simulation. Comparison of inference results for the global galactic parameters using COMPASS (red), SBI (blue) and HMC (gray) on stellar abundances from a Milky Way like galaxies taken from the IllustrisTNG simulation. (Left) Joint posterior distribution inferred from 200 stars; methods and contours as in Figure 5. The HMC runs use the Philcox & Rybizki (2019) noise realization, per-star errors and stellar ages of the same stars. (Right) Convergence of the inferred parameters as a function of NstarsN_{\mathrm{stars}}; open diamonds as in Figure 5.

for SBI at N=100N = 100. The bias is therefore common to the inference methods and suggests structural mismatch between the one-zone model and the hydrodynamical simulation potentially linked to differences in the detailed modeling approaches of one-zone models and full hydrodynamical models. We emphasize however that COMPASS reaches this accuracy at an order-of-magnitude lower computational cost than HMC.

References

  1. [1]Abdurrouf, A., Accetta, K., Aerts, C. et al. 2022, ApJS, 259, 35
  2. [2]Agertz, O., Kravtsov, A. V., Leitner, S. N., & Gnedin, N. Y. 2013, ApJ, 770, 25
  3. [3]Agertz, O., Renaud, F., Feltzing, S., et al. 2021, MNRAS, 503, 5826
  4. [4]Akaike, H. 1978, IFAC Proceedings Volumes, 11, 1877, 7th Triennial World Congress of the IFAC on A Link Between Science and Applications of Automatic Control, Helsinki, Finland, 12–16 June
  5. [5]AKAIKE, H. 1979, Biometrika, 66, 237
  6. [6]Akiba, T., Sano, S., Yanase, T., Ohta, T., & Koyama, M. 2019, Optuna: A Next-generation Hyperparameter Optimization Frameworkarxiv.org/abs/1907.10902
  7. [7]Alexander, R. K. & Vincenzo, F. 2025, MNRAS, 538, 1127
  8. [8]Alsing, J., Wandelt, B., & Feeney, S. 2018, MNRAS, 477, 2874
  9. [9]Anderson, B. D. 1982, Stochastic Processes and their Applications, 12, 313
  10. [10]Andrews, B. H., Weinberg, D. H., Schönrich, R., & Johnson, J. A. 2017a, ApJ, 835, 224
  11. [11]Andrews, B. H., Weinberg, D. H., Schönrich, R., & Johnson, J. A. 2017b, ApJ, 835, 224
  12. [12]Asplund, M., Grevesse, N., Sauval, A. J., & Scott, P. 2009, ARA&A, 47, 481
  13. [13]Astropy Collaboration, Robitaille, T. P., Tollerud, E. J., et al. 2013, A&A, 558, A33
  14. [14]Austin, S. M., West, C., & Heger, A. 2017, ApJ, 839, L9
  15. [15]Bastian, N., Covey, K. R., & Meyer, M. R. 2010, ARA&A, 48, 339
  16. [16]Bigiel, F., Leroy, A., Walter, F., et al. 2008, AJ, 136, 2846
  17. [17]Bozdogan, H. 1987, Psychometrika, 52, 353–356
  18. [18]Buck, T. 2020, MNRAS, 491, 5435
  19. [19]Buck, T., Günes, B., Viterbo, G., Oliver, W. H., & Buder, S. 2025, A&A, 702, A184
  20. [20]Buck, T., Obreja, A., Macciò, A. V., et al. 2020, MNRAS, 491, 3461
  21. [21]Buck, T., Obreja, A., Ratcliffe, B., et al. 2023, MNRAS, 523, 1565
  22. [22]Buck, T., Rybicki, J., Buder, S., et al. 2021, MNRAS, 508, 3365
  23. [23]Buder, S., Buck, T., Skúladóttir, Á., et al. 2025a, MNRAS, in press [arXiv:2510.20233]arxiv.org/abs/2510.20233
  24. [24]Buder, S., Buck, T., Skúladóttir, Á., et al. 2026, MNRAS, 549, stag1090
  25. [25]Buder, S., Kos, J., Wang, E. X., et al. 2025b, PASA, 42, e051
  26. [26]Buder, S., Mijnarends, L., & Buck, T. 2024, MNRAS, 532, 1010
  27. [27]Buder, S., Sharma, S., Kos, J., et al. 2021, MNRAS, 506, 150
  28. [28]Burnham, K. & Anderson, D. 2002, Model selection and multimodel inference: a practical information-theoretic approach (Springer Verlag)
  29. [29]Chabrier, G. 2003, PASP, 115, 763
  30. [30]Chabrier, G., Hennebelle, P., & Charlot, S. 2014, ApJ, 796, 75
  31. [31]Chiappini, C., Matteucci, F., & Gratton, R. 1997, ApJ, 477, 765
  32. [32]Chieffi, A. & Limongi, M. 2004, ApJ, 608, 405
  33. [33]Clarke, A. J., Debattista, V. P., Nidever, D. L., et al. 2019, MNRAS, 484, 3476
  34. [36]Cristallo, S., Straniero, O., Piersanti, L., & Gobrecht, D. 2015, ApJS, 219, 40
  35. [37]Dalton, G., Trager, S., Abrams, D. C., et al. 2018, SPIE, 10702, 1B
  36. [38]Dax, M., Green, S. R., Gair, J., et al. 2025, Nature, 639, 49
  37. [39]de Jong, R. S., Agertz, O., Berbel, A. A., et al. 2019, The Messenger, 175, 3
  38. [40]Defazio, A., Yang, X. A., Mehta, H., et al. 2024, in Advances in Neural Information Processing Systems (NeurIPS), Vol. 37
  39. [41]den Brok, M., Krajnović, D., Emsellem, E., et al. 2024, MNRAS, 530, 3278
  40. [42]Doherty, C. L., Gil-Pons, P., Lau, H. H. B., Lattanzio, J. C., & Siess, L. 2014, MNRAS, 437, 195
  41. [43]Dubay, L. O., Johnson, J. A., & Johnson, J. W. 2024, ApJ, 973, 55
  42. [44]Fishlock, C. K., Karakas, A. I., Lugaro, M., & Yong, D. 2014, ApJ, 797, 44
  43. [45]Font, A. S., McCarthy, I. G., Poole-McKenzie, R., et al. 2020, MNRAS, 498, 1765
  44. [46]Freeman, K. & Bland-Hawthorn, J. 2002, ARA&A, 40, 487
  45. [47]Frischknecht, U., Hirschi, R., Pignatari, M., et al. 2015, MNRAS, 456, 1803–1825
  46. [48]Geffner, T., Papamakarios, G., & Mnih, A. 2022, arXiv e-prints, arXiv:2209.12429
  47. [49]Gloeckler, M., Deistler, M., Weilbach, C., Wood, F., & Macke, J. H. 2024, in PMLR, Vol. 235, Proceedings of the 41st International Conference on Machine Learning (ICML)
  48. [50]Grand, R. J. J., Bustamante, S., Gómez, F. A., et al. 2018, MNRAS, 474, 3629
  49. [51]Griffith, E. J., Hogg, D. W., Hasselquist, S., et al. 2025, AJ, 169, 280
  50. [52]Griffith, E. J., Weinberg, D. H., Buder, S., et al. 2022, ApJ, 931, 23
  51. [53]Gronow, S., Côté, B., Lach, F., et al. 2021, A&A, 656, A94
  52. [54]Gutcke, T. A. & Springel, V. 2019, MNRAS, 482, 118
  53. [55]Günes, B., Buder, S., & Buck, T. 2025, Machine Learning for Astrophysics Workshop (ML4Astro 2025), Vancouver [arXiv:2507.05060]
  54. [56]Hahn, C. & Melchior, P. 2022, ApJ, 938, 11
  55. [57]Hayden, M. R., Bovy, J., Holtzman, J. A., et al. 2015, ApJ, 808, 132
  56. [58]Helbling, A., Meral, T. H. S., Hoover, B., Yanardag, P., & Chau, D. H. 2025, in PMLR, Vol. 267, Proceedings of the 42nd International Conference on Machine Learning (ICML)
  57. [59]Hoffman, M. D. & Gelman, A. 2014, Journal of Machine Learning Research, 15, 1593
  58. [60]Hopkins, P. F., Wetzel, A., Kereš, D., et al. 2018, MNRAS, 480, 800
  59. [61]Jeffrey, N. & Wandelt, B. D. 2024, Machine Learning: Science and Technology, 5, 015008
  60. [62]Jiménez, N., Tissera, P. B., & Matteucci, F. 2015, ApJ, 810, 137
  61. [63]Johnson, J. W., Weinberg, D. H., Vincenzo, F., et al. 2021, MNRAS, 508, 4484
  62. [64]Karakas, A. I. 2010, MNRAS, 403, 1413
  63. [65]Karakas, A. I. & Lugaro, M. 2016, ApJ, 825, 26
  64. [66]Karakas, A. I., Marino, A. F., & Nataf, D. M. 2014, ApJ, 784, 32
  65. [67]Knöll, N., Buck, T., Branca, L., & Viterbo, G. 2026, ICML 2026 Workshop AI4Physics, accepted [arXiv:2606.10762]arxiv.org/abs/2606.10762
  66. [68]Kobayashi, C., Karakas, A. I., & Lugaro, M. 2020, ApJ, 900, 179
  67. [71]Kollmeier, J. A., Zasowski, G., Rix, H.-W., et al. 2017, arXiv e-prints, arXiv:1711.03234arxiv.org/abs/1711.03234
  68. [72]Lemos, P., Coogan, A., Hezaveh, Y., & Perreault-Levasseur, L. 2023, Sampling-Based Accuracy Testing of Posterior Estimators for General Inferencearxiv.org/abs/2302.03026
  69. [74]Liang, J., Gjergo, E., & Fan, X. 2023, MNRAS, 522, 863
  70. [75]Limongi, M. & Chieffi, A. 2018, ApJS, 237, 13
  71. [76]Lovell, C. C., Starkenburg, T., Ho, M., et al. 2025, MNRAS, 544, 3949
  72. [80]Mackereth, J. T., Crain, R. A., Schiavon, R. P., et al. 2018, MNRAS, 477, 5072
  73. [81]Maoz, D. & Mannucci, F. 2012, PASA, 29, 447
  74. [82]Maoz, D., Mannucci, F., & Brandt, T. D. 2012, MNRAS, 426, 3282
  75. [83]Maoz, D., Mannucci, F., & Nelemans, G. 2014, ARA&A, 52, 107
  76. [84]Maoz, D., Sharon, K., & Gal-Yam, A. 2010, ApJ, 722, 1879
  77. [85]Martín-Navarro, I., Lyubenova, M., van de Ven, G., et al. 2019, A&A, 626, A124
  78. [86]Matteucci, F. 2016, Journal of Physics: Conference Series, 703, 012004
  79. [87]McWilliam, A. 1997, ARA&A, 35, 503
  80. [88]Minchev, I., Chiappini, C., & Martig, M. 2013, A&A, 558, A9
  81. [89]Mollá, M., Cavichia, O., Gavilán, M., & Gibson, B. K. 2015, MNRAS, 451, 3693
  82. [90]Nelson, D., Springel, V., Pillepich, A., et al. 2019, Computational Astrophysics and Cosmology, 6, 2
  83. [91]Ness, M., Rix, H. W., Hogg, D. W., et al. 2018, ApJ, 853, 198
  84. [92]Nissen, P. E., Christensen-Dalsgaard, J., Mosumgaard, J. R., et al. 2020, A&A, 640, A81
  85. [93]Nomoto, K., Kobayashi, C., & Tominaga, N. 2013, ARA&A, 51, 457
  86. [94]Papamakarios, G. & Murray, I. 2016, Fast ε-free Inference of Simulation Models with Bayesian Conditional Density Estimationarxiv.org/abs/1605.06376
  87. [95]Papamakarios, G., Sterratt, D., & Murray, I. 2019, in Proceedings of the 22nd International Conference on Artificial Intelligence and Statistics (AISTATS) 2019, Proceedings of Machine Learning Research (PMLR), 837–848, 22nd International Conference on Artificial Intelligence and Statistics, AISTATS 2019; Conference date: 16-04-2019 Through 18-04-2019
  88. [96]Peebles, W. & Xie, S. 2023, in Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 4195–4205
  89. [97]Phan, D., Pradhan, N., & Jankowiak, M. 2019, NeurIPS 2019 Workshop on Program Transformations for Machine Learning [1912.11554]
  90. [98]Philcox, O., Rybicki, J., & Gutcke, T. A. 2018, ApJ, 861, 40
  91. [99]Philcox, O. H. E. & Rybizki, J. 2019, ApJ, 887, 9
  92. [100]Pillepich, A., Nelson, D., Hernquist, L., et al. 2018, MNRAS, 475, 648
  93. [101]Pillepich, A., Springel, V., Nelson, D., et al. 2017a, MNRAS, 473, 4077
  94. [102]Pillepich, A., Springel, V., Nelson, D., et al. 2017b, MNRAS, 473, 4077
  95. [103]Planck Collaboration, Ade, P. A. R., Aghanim, N., et al. 2016, A&A, 594, A13
  96. [104]Portinari, L., Chiosi, C., & Bressan, A. 1997, Galactic chemical enrichment with new metallicity dependent yields
  97. [105]Portinari, L., Chiosi, C., & Bressan, A. 1998, A&A, 334, 505
  98. [106]Price-Whelan, A. M., Sip’ocz, B. M., G"unther, H. M., et al. 2018, AJ, 156, 123
  99. [107]Ratcliffe, B., Khoperskov, S., Minchev, I., et al. 2025, A&A, 698, A267
  100. [108]Ratcliffe, B., Minchev, I., Anders, F., et al. 2023, MNRAS, 525, 2208
  101. [109]Ritter, C., Herwig, F., Jones, S., et al. 2018, MNRAS, 480, 538–571
  102. [110]Romano, D., Chiappini, C., Matteucci, F., & Tosi, M. 2005, A&A, 430, 491
  103. [111]Romano, D., Karakas, A. I., Tosi, M., & Matteucci, F. 2010, A&A, 522, A32
  104. [112]Rybizki, J. & Just, A. 2015, MNRAS, 447, 3880
  105. [113]Rybizki, J., Just, A., & Rix, H.-W. 2017, A&A, 605, A59
  106. [114]Sante, A., Font, A. S., Kawata, D., Makinen, T. L., & Grand, R. J. J. 2026, MNRAS
  107. [115]Sawala, T., Frenk, C. S., Fattahi, A., et al. 2016, MNRAS, 457, 1931
  108. [116]Schönrich, R. & Binney, J. 2009, MNRAS, 396, 203
  109. [117]Seitenzahl, I. R., Ciaraldi-Schoolmann, F., Röpke, F. K., et al. 2012, MNRAS, 429, 1156
  110. [118]Song, Y. & Ermon, S. 2020, in Advances in Neural Information Processing Systems (NeurIPS), Vol. 33
  111. [119]Song, Y., Sohldickstein, J., Kingma, D. P., et al. 2020, arXiv e-prints, arXiv:2011.13456arxiv.org/abs/2011.13456
  112. [120]Spitoni, E., Aguirre Børsen-Koch, V., Verma, K., & Stokholm, A. 2022, A&A, 663, A174
  113. [121]Talts, S., Betancourt, M., Simpson, D., Vehtari, A., & Gelman, A. 2020, Validating Bayesian Inference Algorithms with Simulation-Based Calibration
  114. [122]Thielemann, F. K., Argast, D., Brachwitz, F., et al. 2003, Nucl. Phys. A, 718, 139
  115. [123]Ting, Y.-S. & Weinberg, D. H. 2022, ApJ, 927, 209
  116. [124]van Dokkum, P. G., Leja, J., Nelson, E. J., et al. 2013, ApJ, 771, L35
  117. [125]Ventura, P., Di Criscienzo, M., Carini, R., & D’Antona, F. 2013, MNRAS, 431, 3642
  118. [126]Vincenzo, F., Matteucci, F., Recchi, S., et al. 2015, MNRAS, 449, 1327
  119. [127]Vincenzo, F., Spitoni, E., Calura, F., et al. 2019, MNRAS, 487, L47
  120. [128]Virtanen, P., Gommers, R., Oliphant, T. E., et al. 2020, Nature Methods, 17, 261
  121. [129]Viterbo, G., Arruda, J., & Buck, T. 2026, arXiv e-prints, arXiv:2607.20725arxiv.org/abs/2607.20725
  122. [130]Viterbo, G. & Buck, T. 2024, arXiv e-prints, arXiv:2411.17269arxiv.org/abs/2411.17269
  123. [131]Viterbo, G. & Buck, T. 2026, A&A, 707, A363
  124. [132]Wagenmakers, E.-J. & Farell, S. 2004, Psychonomic Bulletin & Review, 11, 192
  125. [133]Wainer, T. M., Williams, B. F., Johnson, L. C., et al. 2024, AJ, 168, 86
  126. [134]Wang, K., Carrillo, A., Ness, M. K., & Buck, T. 2024, MNRAS, 527, 321
  127. [135]Weinberg, D. H., Griffith, E. J., Johnson, J. W., & Thompson, T. A. 2024, ApJ, 973, 122
  128. [136]Weinberg, D. H., Holtzman, J. A., Hasselquist, S., et al. 2019, ApJ, 874, 102
  129. [137]Weisz, D. R., Johnson, L. C., Foreman-Mackey, D., et al. 2015, ApJ, 806, 198
  130. [138]Yeh, C., Chen, Y., Wu, A., et al. 2024, IEEE Transactions on Visualization and Computer Graphics, 30, 262
  131. [139]Zhao, G., Zhao, Y.-H., Chu, Y.-Q., Jing, Y.-P., & Deng, L.-C. 2012, Research in Astronomy and Astrophysics, 12, 723
  132. [140]Zhou, L., Radev, S. T., Oliver, W. H., et al. 2025, A&A, 701, A44

Paper details

vlnc:W_5ysgzz5d
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 4

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Claude, Gemini (multiple versions), ChatGPT

View statement
Looking for related papers…
Contents