A COMPASS to the Galaxy: Joint nucleosynthetic yield set comparison and parameter inference in Galactic chemical evolution
Authors: Berkay Günes, Giuseppe Viterbo, Sven Buder, Tobias Buck
Organizations: Universität Heidelberg, Interdisziplinäres Zentrum für Wissenschaftliches Rechnen (IWR), Im Neuenheimer Feld 205, 69120 Heidelberg, Germany · Max Planck Institute for Polymer Research, Ackermannweg 10, 55128 Mainz, Germany · Universität Heidelberg, Zentrum für Astronomie, Institut für Theoretische Astrophysik, Albert-Ueberle-Straße 2, D-69120 Heidelberg, Germany · Research School of Astronomy and Astrophysics, Australian National University, Canberra, ACT 2611, Australia · ARC Centre of Excellence for All Sky Astrophysics in 3 Dimensions (ASTRO 3D), Australia
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 and a SNIa normalization of log(NIa)=−2.81±0.02, with a systematic spread of ≈0.3 in α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.
Figures & tables
Figure 1: The COMPASS model comparison workflow. Simulation data from model Mi train the ScoreBasedInferenceModel ( SBIm ). Then for some observations xobs SBIm estimates the posterior distribution P(θ∣xobs) and then calculates its MAP θ^ . SBIm then models the likelihood P(x∣θ^) to get the maximized likelihood for each model L(xobs∣θ^,Mi) , leading to the model posteriors P(Mi∣xobs) . See subsection 2.2 and following for more details.
Parameter
Description
θprior±σprior
Prior from:
Training proposal
Λ : Global stellar (SSP) parameters
αIMF
High-mass slope of the ( Chabrier, 2003 ) IMF
−2.3±0.3
( Chabrier, 2003 , Tab. 1)
U(−3.8,−0.8)
log10(NIa)
Number of SN Ia per M⊙ over 15 Gyr
−2.89±0.3
( Maoz & Mannucci, 2012 , Tab.1 )
U(−4.39,−1.39)
Θi : Local ISM parameters
log10(SFE)
Star formation efficiency governing gas infall
−0.3±0.3
( Bigiel et al., 2008 )
U(−1.8,1.2)
log10(SFRpeak)
SFR peak in Gyr (scale of k=2Γ -distribution)
0.55±0.1
( van Dokkum et al., 2013 , fig. 4b)
U(0.05,1.05)
Table 1: Free parameters of the Chempy simulator. 3 3 3 Notes. Gaussian priors and uniform training proposal ( ±5σprior around the prior mean, Sec. 3.2 ) of each parameter. The global parameters (αIMF,log10(NIa)) are assumed to be shared across all stars in a given dataset. The local parameters and the stellar birth time T are specific to each individual star’s formation environment. For the Nissen et al. (2020) stars, T is observed via the stellar age and hence fixed.
Figure 2: Violin plots of model weights. Violin plots show the distribution of single-observation relative model weights (Eq. 10 ) P(Mk∣xi) 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 (2004) yields; (Middle) Limongi & Chieffi (2018) yields and (Right) Austin et al. (2017) 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).
Figure 3: Cumulative relative model weight P(Mk∣x0,…,xi) as a function of the number of combined observations i . This example illustrates the case where the mock data was generated using the Limongi & Chieffi (2018) CC-SN yields corresponding to the middle panel of Fig. 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 4: Observational yield-set inference. Bayesian comparison of 40 nucleosynthetic yield set combinations using observational data from Nissen et al. (2020) . (Top) Single-star relative model weights for all 40 tested combinations. (Middle) Top six single-star model weights P(Mk∣xi) . (Bottom) Cumulative model weight P(Mk∣x0,…,xi) .
AGB Yields
Core-Collapse Supernovae (CC-SN) Yields
Chieffi a aa a aa a Chieffi & Limongi (2004)
Nomoto b bb b bb b Nomoto et al. (2013)
Portinari c cc c cc c Portinari et al. (1997)
Chieffi Net
Nomoto Net
NuGrid d dd d dd d Ritter et al. (2018)
West e ee e ee e Austin et al. (2017)
TNG f ff f ff f Pillepich et al. (2017a)
CL18 g gg g gg g Limongi & Chieffi (2018)
Frischknecht h hh h hh h Frischknecht et al. (2015)
NuGrid d dd d dd d Ritter et al. (2018)
1
6
29
4
5
22
19
0
30
36
Karakas i ii i ii i Karakas & Lugaro (2016)
2
18
31
14
21
26
23
9
35
39
Ventura j jj j jj j Ventura et al. (2013)
10
16
34
13
17
27
20
3
32
38
TNG f ff f ff f Pillepich et al. (2017a)
7
15
28
11
12
25
24
8
33
37
Table 2: Ranking of the nucleosynthetic yield-set combinations for the Nissen et al. (2020) data. 6 6 6 Notes. Results of the Bayesian model comparison (Sec. 4.1.2 ). Lower ranks indicate higher relative model weight and correspond to the numbers in Fig. 4 . ; ; ; ; ; ; ; ; ; .
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 and the Type Ia supernova normalization log10NIa – 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σ and 2σ 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 (2019) on the same stars, using their original emulator, which was trained on a different TNG yield compilation (Sec. 4.2.1 ). (Right) Convergence of the inferred parameters as a function of Nstars , with 1σ and 2σ bands. Open diamonds show HMC results with the emulator of Buck et al. (2025) , which is trained on the same yields as SBI and COMPASS , and are only shown where its chains converged.
AGB CC-SN
Nugrid Ritter et al. (2018) TNG Pillepich et al. (2017a)
Nugrid Ritter et al. (2018) Chieffi Chieffi & Limongi (2004)
Ventura Ventura et al. (2013) TNG Pillepich et al. (2017a)
Nugrid Ritter et al. (2018) Chieffi Net
Nugrid Ritter et al. (2018) Nomoto Net Nomoto et al. (2013)
αIMF
−2.65±0.02
−2.52±0.02
−2.62±0.02
−2.80±0.02
−2.54±0.02
−2.75±0.01
log10NIa
−2.81±0.02
−2.68±0.02
−2.88±0.03
−3.10±0.02
−2.70±0.02
−2.88±0.02
Table 3: Inferred global parameters from the Nissen et al. (2020) data for the top six yield sets. 7 7 7 Notes. Mean values and ±1σ uncertainties of αIMF and log10(NIa) 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σ and 2σ contours) for the IMF high-mass slope αIMF and SN Ia normalization log10NIa , inferred using COMPASS from the Nissen et al. (2020) 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σ standard deviation of this prior.
Figure 7: Overall layer-averaged attention map. This figure summarizes the model’s strategy by averaging the attention weights from Figure 13 across all five layers. It highlights the most dominant information pathways integrated over the model’s full depth.
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 8: Condition transformer architecture. The network, built upon a transformer model, is designed to predict the conditional score. The joint data (θ,x) are provided as input tokens. Conditioning is achieved in two ways: the diffusion timestep t is incorporated via adaptive layer normalization (Scale & Shift), and the condition mask MC generates a self-attention mask to govern the information flow between tokens.
Trial
−logP(θ∣x)
Δmax TARP
Batch Size
Sigma
Depth
Heads
Hidden Size
MLP Ratio
113
-1.76
0.08
862
2.5
5
1
36
3
174
-1.60
0.09
862
2.5
5
1
36
3
215
-1.90
0.10
862
2.5
11
1
65
3
223
-1.97
0.10
375
2.5
5
1
36
1
260
-1.94
0.10
125
2.5
5
1
34
1
242
-1.76
0.10
842
2.5
5
1
28
3
Appendix
Table 4: Top-performing hyperparameter configurations of the optuna study. 8 8 8 Notes. Results of a 1000 -trial optuna study on the GCE task, minimizing both the negative predictive accuracy ( −logP(θ∣x) ) and the maximal deviation of the TARP diagnostic ( Δmax TARP). The upper section lists the top 10 trials ranked by the Δmax TARP objective, the lower section the top 10 trials ranked by the −logP(θ∣x) objective. Trial 275 (marked with † ) is the only configuration to appear in both lists and was selected as the default architecture.
Figure 9: Accuracy of SDE solvers. Comparison of SDE solver performance in terms of predictive accuracy ( −logP(θ∣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 −logP(θ∣x)≈0.693 represents a posterior probability of P(θ∣x)=0.5 for the true parameter. Lower −logP(θ∣x) values indicate higher accuracy. The DPM-Solver (1st order) with 500 steps offers a good balance of accuracy and computational efficiency.
Figure 10: TARP plot. The TARP plot shows the expected coverage probability vs. the ground truth parameters under the inferred posterior samples credibility level α .
Figure 11: 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.
Figure 12: Local ISM parameters. Single-star posteriors (mean ±1σ ) of log10(SFE) , log10(SFRpeak) and xout against stellar age for the 69 Nissen et al. (2020) stars, for the preferred NuGrid + TNG yield set. The gray band shows the prior mean ±1σ (Table 1 ).
Figure 13: 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.5 . The x-axis represents the information sources (keys), including stellar age ( T ), elemental abundances, and a learned bias term. The y-axis represents the parameters being inferred (queries) which contain the global parameters αIMF and log10(NIa) as well as local ISM parameters ( log(SFE),log(SFRpeak) , and xout ).
Figure 14: Calibration of the yield-set classifier on 8×105 validation simulations. (Left) Accuracy against confidence of the top-ranked class. (Right) Predicted class probabilities P(Mk∣x) against the empirical frequency of the true class, in quantile bins over all classes. The dashed lines show perfect calibration.
Figure 15: 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 and log10NIa inferred from 200 stars; methods and contours as in Fig. 5 . (Right) Convergence of the inferred parameters as a function of Nstars ; open diamonds as in Fig. 5 .
Figure 16: 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 Fig. 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 Nstars ; open diamonds as in Fig. 5 .
City University of New York Graduate Center, 365 5th Ave, New York, NY 10016 · Center for Computational Astrophysics, Flatiron Institute, 162 5th Avenue, New York, NY 10010, USA · Columbia Astrophysics Laboratory, Columbia University, 550 West 120th Street, New York, NY 10027, USA +1
Faculty of Computing and Data Sciences, Boston University, Boston, MA 02215, USA · 2The NSF AI Institute for Artificial Intelligence and Fundamental Interactions · Center for Theoretical Physics, Massachusetts Institute of Technology, Cambridge, MA 02139, USA +2