Context. Modern spectroscopic surveys have the capacity to obtain the spectra of millions of stars. However, classical spectroscopic methods can often be computationally expensive, rendering them impractical for the analysis of large datasets. Aims. We introduce a novel simulation-based, deep-learning approach for the efficient analysis of high-resolution stellar spectra that will be obtained with the upcoming high-resolution 4MOST spectrograph. Methods. We used a suite of synthetic non-local thermodynamic equilibrium (NLTE) spectra generated with Turbospectrum to mimic 4MOST observations and trained a conditional invertible neural network (cINN) for the purpose of predicting self-consistently stellar surface parameters and chemical abundances. The cINN is a neural network architecture that estimates full posterior distributions for the target stellar properties, providing an intrinsic uncertainty estimate. We evaluated the predictive performance of the trained cINN model on both synthetic data and the observed spectra of stars. Results. We found that our new cINN trained on NLTE synthetic spectra is capable of recovering stellar parameters with average errors (σ) of 33 K for Teff, 0.16 dex for log (g), and 0.12 dex for Fe/H, 0.1 dex for Ca/Fe, 0.11 for Mg/Fe, and 0.51 dex for Li/Fe, respectively, at a signal-to-noise ratio (S/N) of 250 per Angstrom. From the analysis of the observed spectra of Gaia-ESO/4MOST/PLATO benchmark stars, we verified that our NLTE estimates for stellar parameters and abundances are consistent with results obtained with the independent code TSFitPy. We conclude that the NLTE cINN is robust and that it can, in theory, evaluate four million high-resolution 4MOST spectra in less than a day, using GPU acceleration.
Ksoll et al. (Fri,) studied this question.