# Transferring spectroscopic stellar labels to 217 million Gaia DR3 XP stars with SHBoost

A. Khalatyan, F. Anders, C. Chiappini, A. B. A. Queiroz, S. Nepal, M. Dal

Ponte, C. Jordi, G. Guiglion, M. Valentini, G. Torralba Elipe, et al.

► To cite this version:

A. Khalatyan, F. Anders, C. Chiappini, A. B. A. Queiroz, S. Nepal, et al. Transferring spectroscopic stellar labels to 217 million Gaia DR3 XP stars with SHBoost. Astronomy & Astrophysics - A&A, 2024, 691, 10.1051/0004-6361/202451427. insu-04821652

HAL Id: insu-04821652

https://insu.hal.science/insu-04821652v1

Submitted on 6 Dec 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Transferring spectroscopic stellar labels to 217 million Gaia DR3 XP stars with SHBoost

A. Khalatyan¹, F. Anders²,³,⁴,*, C. Chiappini¹, A. B. A. Queiroz⁵,⁶, S. Nepal¹,⁷, M. dal Ponte⁸, C. Jordi⁴, G. Guiglion⁹,¹⁰,¹, M. Valentini¹, G. Torralba Elipe¹¹,¹²,¹³, M. Steinmetz¹, M. Pantaleoni-González¹⁴,¹⁵, S. Malhotra²,³,⁴, Ó. Jiménez-Arranz¹⁶,²,³,⁴, H. Enke¹, L. Casamiquela¹⁷, and J. Ardèvol²,³,⁴

¹ Leibniz-Institut für Astrophysik Potsdam (AIP), An der Sternwarte 16, 14482 Potsdam, Germany

² Departament de Física Quàntica i Astrofísica (FQA), Universitat de Barcelona, C Martí i Franquès, 1, 08028 Barcelona, Spain

³ Institut de Ciències del Cosmos (ICCUB), Universitat de Barcelona (UB), C Martí i Franquès, 1, 08028 Barcelona, Spain

⁴ Institut d'Estudis Espacials de Catalunya (IEEC), Edifici RDIT, Campus UPC, 08860 Castelldefels (Barcelona), Spain

⁵ Instituto de Astrofísica de Canarias, 38200 La Laguna, Tenerife, Spain

⁶ Departamento de Astrofísica, Universidad de La Laguna, 38205 La Laguna, Tenerife, Spain

⁷ Institut für Physik und Astronomie, Universität Potsdam, Haus 28 Karl-Liebknecht-Str. 24/25, 14476 Golm, Germany

⁸ INAF – Osservatorio Astronomico di Padova, Vicolo dell'Osservatorio 5, 35122 Padova, Italy

⁹ Zentrum für Astronomie der Universität Heidelberg, Landessternwarte, Königstuhl 12, 69117 Heidelberg, Germany

¹⁰ Max Planck Institute for Astronomy, Königstuhl 17, 69117 Heidelberg, Germany

¹¹ CIGUS CITIC – Department of Computer Science and Information Technologies, University of A Coruña, Campus de Elviña s/n, A Coruña, 15071, Spain

¹² Escuela Superior de Ingeniería y Tecnología, Universidad Internacional de la Rioja, Spain

¹³ Escuela de Arquitectura y Politécnica, Universidad Europea de Valencia, Spain

¹⁴ Departamento de Astrofísica, Centro de Astrobiología (CSIC-INTA), Camino Bajo del Castillo s/n, 28692 Villanueva de la Cañada, Madrid, Spain

¹⁵ Department of Astrophysics, University of Vienna, Türkenschanzstraße 17, 1180 Wien, Austria

¹⁶ Lund Observatory, Division of Astrophysics, Department of Physics, Lund University, Box 43, 22100 Lund, Sweden

¹⁷ GEPI, Observatoire de Paris, Université PSL, CNRS, 5 Place Jules Janssen, 92190 Meudon, France

Received 8 July 2024 / Accepted 20 September 2024

## ABSTRACT

With Gaia Data Release 3 (DR3), new and improved astrometric, photometric, and spectroscopic measurements for 1.8 billion stars have become available. Alongside this wealth of new data, however, there are challenges in finding efficient and accurate computational methods for their analysis. In this paper, we explore the feasibility of using machine learning regression as a method of extracting basic stellar parameters and line-of-sight extinctions from spectro-photometric data. To this end, we built a stable gradient-boosted random-forest regressor (xgboost), trained on spectroscopic data, capable of producing output parameters with reliable uncertainties from Gaia DR3 data (most notably the low-resolution XP spectra), without ground-based spectroscopic observations. Using Shapley additive explanations, we interpret how the predictions for each star are influenced by each data feature. For the training and testing of the network, we used high-quality parameters obtained from the StarHorse code for a sample of around eight million stars observed by major spectroscopic stellar surveys, complemented by curated samples of hot stars, very metal-poor stars, white dwarfs, and hot sub-dwarfs. The training data cover the whole sky, all Galactic components, and almost the full magnitude range of the Gaia DR3 XP sample of more than 217 million objects that also have reported parallaxes. We have achieved median uncertainties of 0.20 mag in V-band extinction, 0.01 dex in logarithmic effective temperature, 0.20 dex in surface gravity, 0.18 dex in metallicity, and 12% in mass (over the full Gaia DR3 XP sample, with considerable variations in precision as a function of magnitude and stellar type). We succeeded in predicting competitive results based on Gaia DR3 XP spectra compared to classical isochrone or spectral-energy distribution fitting methods we employed in earlier works, especially for parameters $A_V$ and $T_{eff}$, along with the metallicity values. Finally, we showcase some potential applications of this new catalogue, including extinction maps, metallicity trends in the Milky Way, and extended maps of young massive stars, metal-poor stars, and metal-rich stars.

**Key words.** catalogs – stars: general – stars: statistics – Galaxy: general – Galaxy: stellar content – Galaxy: structure

## 1. Introduction

Galactic Astronomy has become an exceedingly data-driven field with a vast and rapidly growing collection of multi-temporal and multi-wavelength data being observed by a multitude of stellar surveys. The Gaia mission (Gaia Collaboration 2016), which is currently charting a six-dimensional (6D) phase-space map of

the Milky Way, is currently providing accurate measurements for almost two billion stars in our Galaxy and the Local Group (Gaia Collaboration 2018b, 2021, 2023c). The volume of astronomical data available passed the 100 Terabyte (10¹⁴ bytes) mark by the end 20th century and is expected to continue rapidly expanding towards the Petabyte (10¹⁵ bytes) and Exabyte (10¹⁸ bytes) scales in the near future (Fluke & Jacobs 2020; Vavilova et al. 2020).

In response to the growing amount of data being collected, a variety of machine learning (ML) techniques have been

<footnote>* Corresponding author; fanders@icc.ub.edu</footnote>
integrated to complement more classical statistical methods of data analysis. These ML techniques are now at the forefront of data mining and analytics, thanks to their ability to cope with the current scale of the data and in anticipation of even greater volumes of data being released. Furthermore, the versatility of ML techniques allow us to use them in performing a wide variety of tasks, such as classification, regression, outlier detection, and data compression on large scales (e.g. Ivezić et al. 2014). Overall, ML techniques have quickly become effective tools for astronomers to turn a copious amount of raw data into useful knowledge (for reviews, see e.g. Baron 2019; Fluke & Jacobs 2020; Sen et al. 2022).

Recently, the scope of Gaia data has been expanded by the inclusion of more than 219 million low-resolution XP spectra (Carrasco et al. 2021; De Angeli et al. 2023; Montegriffo et al. 2023) in the third Gaia data release, DR3 (Gaia Collaboration 2023c). For Gaia DR3, the mean XP spectra have primarily been used to infer much more precise stellar parameters, such as: T<sub>eff</sub>, log g, d, A<sub>0</sub>, and [M/H] (Andrae et al. 2023a; Fouesneau et al. 2023). Various groups have already shown that this new dataset can potentially be used for a variety of Galactic archaeology purposes: to estimate rough stellar α-element abundances (Gavel et al. 2021; Hattori 2024; Laroche & Speagle 2024; Li et al. 2024), efficiently locate extremely metal-poor stars (Witten et al. 2022; Xylakis-Dornbusch et al. 2022, 2024; Lucey et al. 2023; Yao et al. 2024), classify white dwarfs (Echeverry et al. 2022; Gaia Collaboration 2023b), study hydrogen emission and absorption lines (Weiler et al. 2023), or improve the accuracy of stellar parameters determined from Gaia RVS spectra (Guiglion et al. 2024).

Here, we aim to take advantage of the *Gaia* DR3 XP spectra by combining this dataset with additional information, both from *Gaia* and photometric databases. This paper aims to investigate the use of a relatively new but robust and well-tested regression technique, *xgboost*, trained using spectroscopically derived data from a variety of stellar surveys, to determine the following stellar parameters: extinction, effective temperature, metallicity, surface gravity, and mass from astrometric and photometric data provided by the *Gaia* mission. Similarly to other ML techniques, *xgboost* achieves this by learning the complex, non-linear relationships between the raw input data and the desired outputs.

For the training set, we mainly use the spectroscopy-derived data from Queiroz et al. (2023, hereafter Q23) obtained with StarHorse (Queiroz et al. 2018, 2020), a Bayesian isochrone-fitting code that yields precise results for spectroscopic surveys. When only supplied with astrometric and multi-band photometric data, StarHorse still produces very competitive results, compared to other techniques (as we have shown in Anders et al. 2019, 2022). However, there are two main disadvantages with Bayesian isochrone fitting for these large datasets: (1) it is considerably slower and computationally more expensive, since the likelihood for each star has to be computed for a larger stellar-parameter range; and (2) it cannot make direct use of additional information (e.g. Gaia proper motions, colour-excess factor, or XP spectra<fnref n="1" />). Therefore, in this paper we explore the possibility of circumventing these problems with a well-trained ML algorithm, thus freeing computational resources and greatly

improving the CO₂ budget of the new catalogue. In addition, by taking into account the information contained in the *Gaia* DR3 XP spectra, we are able to improve, for instance, the inferred metallicities for a large sample of stars covering large portions of the Galaxy. We stress, however, that in this work we do not attempt to derive new age or distance estimates, since the information about these quantities is not directly encoded in the *Gaia* DR3 XP spectra.

This paper is structured as follows: in Sect. 2 we describe the data used to train and predict stellar parameters for Gaia stars. In Sect. 3 we explain the concept and implementation of xgboost, the supervised regression algorithm we use in this paper. Section 4 presents the scope of the produced catalogues, including a discussion of the caveats of the present catalogue (Sect. 4.2). Some immediate results derived from the catalogue are shown in Sect. 5. We conclude the paper with a short discussion and our conclusions in Sect. 6. The appendices of the paper contain comparisons to other catalogues (Appendix A), data model of the produced catalogue (Appendix B), and a possible re-calibration of the metallicity scale based on open and globular clusters (Appendix C).

## 2. Data

In supervised machine learning, the most important ingredient for building a well-performing classifier or regressor is the availability of a sufficiently large, precise, and accurate training dataset that covers as much of the parameter space as possible. For the case of the vast Gaia DR3 dataset (totalling more than 1.8 billion stars), a small but sizeable subset (≥7 million stars) has already been co-observed spectroscopically by several major multiplex stellar surveys. This subset covers all major components of the Milky Way (discs, halo, bar, and bulge) and, in particular, the Apache Point Observatory Galactic Evolution Experiment (APOGEE; Majewski et al. 2017) even exceeds the volume reached by Gaia towards the inner Galaxy. We can therefore consider the part of the Gaia DR3 catalogue observed by ground-based spectroscopic surveys a well-sampled subset of the full catalogue, at least down to the typical limiting magnitude of the most relevant spectroscopic surveys.

### 2.1. Spectroscopic labels

Our training set consists of roughly 7 million stars that have been observed by large ground-based spectroscopic stellar surveys, such as APOGEE, GALactic Archaeology with HERMES survey (GALAH; De Silva et al. 2015), Gaia-ESO Survey (Gilmore et al. 2012, 2022), LAMOST surveys (Cui et al. 2012; Deng et al. 2012), RA dial Velocity Experiment (RAVE; Steinmetz et al. 2006, 2020), and Sloan Extension for Galactic Understanding and Exploration (SEGUE; Yanny et al. 2009). For all these surveys, Q23 reported precise distances, extinctions, and stellar parameters using the Bayesian isochrone-fitting code StarHorse (Queiroz et al. 2018, 2020). The data cover the main parts of the Hertzsprung-Russell diagram, from the hot main sequence (although sparsely sampled) to M-type stars (including dwarfs and asymptotic giant-branch stars). For more information on the individual spectroscopic survey datasets, we refer to Sects. 3–4 and Figs. 1–5 of Q23.

To cover an important part the parameter range that has been missed by StarHorse due to the lack of consistent stellar models in this regime, we added the HotPayne catalogue of LAMOST OBA stars (Xiang et al. 2022), a curated set of very metal-poor

<footnote n="1">¹ In principle, it is possible to use narrow- or intermediate-band photometry derived from the Gaia XP spectra to include their information content – however, this transformation adds additional systematic uncertainty, and in the case of StarHorse, the execution time scales with the number of photometric observations included in the inference.</footnote>
<figure><img src="image_2.png" /><figcaption>**Fig. 1.** Distance- and extinction-corrected Gaia DR3 CMDs for each of the spectroscopic stellar surveys used in the training and test data for this work. The bottom right panel shows the joint dataset. Note: not all data points were used in the training and testing of the xgboost models; duplicates were removed and different quality cuts applied for each training label.</figcaption></figure>

<table><caption>**Table 1.** Cleaning conditions applied to each of the training labels.</caption><thead><tr><th>Label</th><th>A<sub>V</sub></th><th>log T<sub>eff</sub></th><th>log g</th><th>[M/H]</th><th>Mass</th></tr></thead><tbody><tr><td>Training range</td><td>[-0.2, 30]</td><td>[3, 5]</td><td>[-1, 9]</td><td>[-4, 0.6]</td><td>[0.05, 70]</td></tr><tr><td>Maximum uncertainty</td><td>0.1 mag or 0.1 &middot; A<sub>V</sub></td><td>&sigma;<sub>T<sub>eff</sub></sub> &lt; 0.1 &middot; T<sub>eff</sub></td><td>0.15 dex</td><td>0.1 dex (0.2 dex for [M/H] &lt; -2)</td><td>0.2 &middot; M</td></tr><tr><td>Excluded data</td><td></td><td></td><td></td><td>WDs, hSDs</td><td>VMP</td></tr></tbody></table>

(VMP) stars<fnref n="2" />, along with the Gaia EDR3 white-dwarf catalogue of Gentile Fusillo et al. (2021) and the Gaia EDR3 hot sub-dwarf catalogue of Culpan et al. (2022) to this training set. The de-reddened and distance-corrected colour-magnitude diagrams (CMDs) of each of the training datasets are shown in Fig. 1. After joining the different datasets, we cleaned the sample from duplicate stars, giving preference to higher-resolution surveys and higher signal-to-noise (S/N) observations if multiple entries of the same stars were included.

## 2.2. Training and test datasets

We have aimed to keep the training data simple: we only used as our input columns (aka ‘features’) the Gaia DR3 XP spectral coefficients (Carrasco et al. 2021; De Angeli et al. 2023), Gaia EDR3 astrometry ($l, b, \bar{\omega}, \sigma_{\omega}, \mu_{ra}, \mu_{dec}$), and broad-band {G, BP,

RP} photometry (Gaia Collaboration 2021), and Gaia EDR3 astrometric fidelity flag fidelity_v2 (Rybizki et al. 2022), as well as infrared (IR) $JHK_s$ and $W1W2W3W4$ magnitudes from 2MASS (Cutri et al. 2003) and AllWISE (Cutri et al. 2013), respectively. The XP coefficients have been normalised per star by the value of the first coefficient.

The ML algorithms (especially neural networks) are often susceptible to the varying quality of the training data. To test their impact, we performed tests using different quality cuts for the input data (i.e. varying the maximum uncertainty for each parameter; see second line in Table 1), finding no significant improvements. We therefore chose to use the full set of columns for each of the training datasets.

For each label (extinction $A_V$, effective temperature, log $T_{eff}$, surface gravity, log g, metallicity, [M/H], and stellar mass, M), we applied a set of criteria to clean the training data from poorly determined or unreliable labels, as detailed in Table 1. For each label, 80% of the data were used during the training phase (see the next section), while 20% of the data are reserved for estimating the overall performance (test dataset; see Fig. 2).

<footnote n="2">² Primarily taken from the 2021 version of the SAGA database (http://sagadatabase.jp/?p=43; Suda et al. 2008), selecting Milky-Way stars observed with spectral resolution $R > 5000$, and adding stars from Yong et al. (2021) and Li et al. (2022b).</footnote>
<figure><img src="image_3.png" /><figcaption>**Fig. 2.** Performance of the *xgboost* models for the test datasets for each of the training labels. In the top row, we show the SHBoost (mean) parameters predicted from *Gaia* DR3, 2MASS, and AllWISE against the spectroscopic values (test labels). The middle row shows the residuals (predicted: 'true'). The bottom row shows the formal uncertainties (derived with *xgboost-distributions*). Each panel contains logarithmic density plots of the full sample of 217 million stars. The lines and shaded regions in the middle and bottom rows show the running median and 1σ quantiles, respectively.</figcaption></figure>

### 3. xgboost regression

A large and still growing variety of ML algorithms exists on the market, each of them optimised for slightly different tasks. The problem we are dealing with here boils down to regression on tabular data. Borisov et al. (2021) and Grinsztajn et al. (2022) recently surveyed the performance of several state-of-the-art ML regression techniques on tabular data. They concluded that algorithms based on gradient-boosted tree ensembles still outperform deep learning models for this kind of task (although some neural-network implementations, if sufficiently trained, can perform similarly well on large enough datasets; see e.g. Klambauer et al. 2017). Also, xgboost has the additional advantage that it requires much less training time and parameter tuning (Shwartz-Ziv & Armon 2021).

After some initial tests and complementary efforts using artificial neural networks, we therefore chose the best-performing tree-based algorithm considered by Borisov et al. (2021, see their Fig. 4), xgboost, for the purpose of this work. Following previous implementations (see Anders et al. 2023b), our approach was successfully adopted by other groups (Rix et al. 2022; Andrae et al. 2023b). Overall, xgboost (Chen & Guestrin 2016) stands short for extreme gradient-boosted trees and it is a supervised ML algorithm that can perform both classification and regression. The algorithm has been used to some extent in astronomy for classification tasks (e.g. Bethapudi & Desai 2018; Yi et al. 2019; Li et al. 2021; Cunha & Humphrey 2022; Tolamatti et al. 2023; Xu et al. 2024); more recently also its regression capability has been explored in some astronomical use cases – e.g. photometric redshifts (Li et al. 2022a; Jia et al. 2023), sunspot prediction (Dang et al. 2022), or spectroscopic stellar ages (Hayden et al. 2022; He et al. 2022; Anders et al. 2023a).

In principle, there are various ways to estimate uncertainties with xgboost (e.g. training the model on various subsets of the training data, or training models with a wide range of hyper-parameters). Perhaps the most rigorous way is to modify xgboost's cost function to include the prediction of confidence intervals in the inference (Duan et al. 2019). Thankfully, a fast implementation of this method based on the latest versions (>$2.0$) of the xgboost library<fnref n="3" /> is available in the python module xgboost-distribution<fnref n="4" />, which we therefore used to build our models. The results of this module can be interpreted as pseudo-posterior distributions (in the Bayesian terminology). As in Anders et al. (2023a), we provide both the 'traditional' xgboost point estimates as well as the mean and standard deviation provided by xgboost-distribution.

In addition to high accuracy, stability to noise, and relatively short training time, another advantage of using xgboost is that it can be coupled with a powerful feature-attribution code, SHAP (Lundberg et al. 2020), which makes tree-based regression methods much more interpretable, even at the level of individual data points. In this manner, xgboost is no longer an ML 'black box', but it also allows us to measure which of the input data (features) carry most of the information about the desirable parameters (labels). We analyse the SHAP values in more detail in Sect. 3.3.

#### 3.1. Tuning hyper-parameters

Like most ML techniques, xgboost has a number of hyper-parameters that can be tuned to optimise the performance. We

<footnote n="3">³ https://xgboost.readthedocs.io/</footnote>

<footnote n="4">⁴ https://xgboost-distribution.readthedocs.io/</footnote>
Uncertainties for the full Gaia DR3 XP dataset

<figure><img src="image_4.png" /><figcaption>**Fig. 3.** Uncertainty distributions. Top row: logarithmic histograms of the uncertainties for the training (yellow), test (green), and full *Gaia* DR3 XP (blue) samples. The median uncertainties are indicated in each panel. Second row: uncertainties as a function of *Gaia* *G* magnitude. Bottom row: Uncertainties as a function of distance. In the second and third row, the white lines and shaded bands show the median trends and corresponding $1\sigma$ quantiles, respectively.</figcaption></figure>

tested each of the main parameters individually as well as with scikit-learn's GridSearchCV, a cross-validation algorithm that can be used to loop over hyper-parameter configurations. Our tests confirmed that xgboost is extremely stable under different configurations. The range of hyper-parameters that can be considered close to optimal is quite large. Using a subsample of 1% of the training and test data, we found that for our case the following configuration yields optimal results in an acceptable runtime: learning_rate=0.1-0.2, max_depth=6-10, min_child_weight=1, and subsample=0.8.

## 3.2. Typical accuracy and precision

Figure 2 shows the performance of xgboost regression on the Gaia DR3 XP spectra dataset for each of the desirable parameter labels for the test dataset not used in the xgboost training phase. The top panels of Fig. 2 show direct comparisons between the labels and the label predictions, the middle panels show the residuals, and the bottom panels the estimated uncertainties. Focusing on the middle row, we find that the residuals are typically small in the regions where the bulk of the training and test data are located; furthermore, they typically grow in regimes where training data is sparse (e.g. $log T_{eff} > 3.9$, [M/H] < -0.8, $M > 1.8 M_\odot$). This behaviour is expected and typical for machine-learning regression techniques, both tree-based and neural networks. It can, in some cases, be mitigated by carefully weighting or balancing the training data (e.g. Ciucă et al. 2021) or by defining a different cost function in the fitting process (Ivezić et al. 2014, Chapters 8.3 and 8.9). In our case, we tried both attempts but then found worse performances for the full dataset, which in the end led us to keep the unbalanced, but large training set.

The test data uncertainties derived with xgboost-distribution are shown in the bottom row of

Fig. 2. They nicely follow the expected trends with the corresponding stellar parameter (e.g. greater $A_V$, $T_{eff}$, or mass values are associated with a greater uncertainty). In particular, the derived uncertainties are always larger than (or at least compatible with) the residuals shown in the middle row of the figure, which shows that the uncertainties are not underestimated, at least for the test dataset.

Some particular features in Fig. 2 may be noteworthy. For example, it appears that the extinction estimates in the low-extinction regime are typically overestimated, but part of this trend stems from (nonphysical) negative extinction estimates in the training data that xgboost is compensating for. Another expected feature is the rectangular structure in the $log g$ comparison (top middle panel in Fig. 2), which hints at an occasional confusion between dwarfs and red-clump stars in cases where the surface gravity is poorly constrained by the Gaia parallax. Finally, the thin vertical stripes in the metallicity panels (fourth column in Fig. 2) are inherited from the training set; namely, the StarHorse runs of Queiroz et al. (2023). A similar (although less pronounced) effect is observed also in the panels that describe the mass (last column).

The typical precisions achieved for each label in the full Gaia DR3 XP sample are presented in Fig. 3. In particular, we achieve median precisions of 0.20 mag in $A_V$, 0.014 dex in $log T_{eff}$ (or 174 K in $T_{eff}$), 0.20 mag in $log g$, 0.18 dex in [M/H], and 12% in mass. These uncertainties are highly heteroscedastic: for example, more than 50 million stars (using the 25th percentile of the label uncertainty distributions) have uncertainties smaller than 0.11 mag in $A_V$, 0.010 dex in $log T_{eff}$, 0.13 dex in $log g$, 0.14 dex in [M/H], or 8% in mass, respectively. As expected, the uncertainty distributions for the full dataset (top row of Fig. 3) are broader than for the training and test data (since the bulk of the sample is fainter than most of the training set), but the typical uncertainties are still smaller than the ones obtained from pure
<figure><img src="image_5.png" /><figcaption>**Fig. 4.** Feature importance plots for each output parameter determined with SHapley Additive exPlanation values (SHAP; Lundberg & Lee 2017). In each panel, the SHAP values for 20 000 random stars are aggregated. The rows in each panel are ordered by decreasing feature importance (from top to bottom). Only the 20 most important columns are shown; the abscissa ranges are cut to 99.8% of the SHAP value range for better visibility.</figcaption></figure>

astro-photometric isochrone fitting (as performed in e.g. Anders et al. 2022; see Appendix A.2). As expected, the reported uncertainties increase with magnitude for most of the labels (except for stellar mass, which is also expected). The uncertainties also increase with distance, as expected.

### 3.3. Feature importance

The concept of SHAP (SHapley Additive exPlanations) values provides an elegant way to understand the output of a machine-learning model (Lundberg & Lee 2017). They provide an empirical explanation of how each feature of a given data point impacts the predictions of the model (as also done in Anders et al. 2023a for the case of spectroscopic stellar age determination). Positive SHAP values mean that the respective feature increases the output's model value, while a negative SHAP decreases it. The exact behaviour depends on the combination of all other feature values, so that in many cases similar feature values for two particular stars may have opposite effects on the label prediction. For illustrative examples and a detailed explanation, we refer to the documentation of the shap package<fnref n="5" />.

Figure 4 shows the SHAP beeswarm summary plots<fnref n="6" /> for each of the five predicted labels, calculated for a random subset of 20 000 stars. We can think of each star as a pixel in each row. Each subplot shows, from top to bottom, the 20 most influential features (and the exact effect that each of them has) in the prediction of the corresponding label ($A_V$, $T_{eff}$, log g, [M/H], and M). It is clear that the Gaia XP coefficients contain very valuable information for the prediction of the stellar labels. For example, for $A_V$ the most important features are the fifth BP coefficient and the first RP coefficient, followed by Galactic latitude (which is obviously a good first prior for the presence of dust), the third RP coefficient, the eighth BP coefficient, and the 2MASS $K_s$ and J magnitudes. In the case of effective temperature (second panel in Fig. 4), we observe that the first BP coefficient (obviating the zeroth coefficient that was used to normalise the XP spectra) is the most influential piece of information (in accordance with e.g. Figs. 25 and 26 in De Angeli et al. 2023). For most labels, the Gaia parallax also plays an important role in the determination of the output.

<footnote n="5">⁵ https://shap.readthedocs.io/</footnote>

<footnote n="6">⁶ https://shap.readthedocs.io/en/latest/example notebooks/api_examples/plots/beeswarm.html</footnote>
Recently, Guiglion et al. (2024) also explored feature impor-
tance using neural network gradients in the context of their
hybrid-CNN method for the Gaia RVS spectra. The hybrid-CNN
method employs an entirely different machine learning approach
and input dataset, with a combination of Gaia DR3 RVS spectra,
photometry (G, G_BP, G_RP), parallaxes, and XP coefficients.
They demonstrated that for each label (i.e. T\_eff, log g, [M/H],
[α/Fe], [Fe/H]) their neural network learns from the character-
istic spectral features in the Gaia RVS spectra and the specific
Gaia XP coefficients, in addition to the parallax and magnitudes.
The difference in the machine learning methodology, the dataset
and the method of estimation of the feature importance can result
in a different relative importance of the features.

For T<sub>eff</sub> values found by the hybrid-CNN, in decreasing order
of importance, the fifth, fourth, second, sixteenth, and first BP
coefficients provide the most information. For log g, the fourth,
sixteenth, second, fifth and eighth BP coefficients are found to be
important. For [M/H], the sixteenth BP coefficient was found to
be most important followed by the fourth, sixth, fourteenth and
eleventh RP coefficients. The parallax information is also found
to be very crucial for log g and T<sub>eff</sub> (as previously demonstrated
by Guiglion et al. 2020 for the RAVE spectra). The most impor-
tant XP coefficients identified for the hybrid-CNN method (as
listed above and also see their Fig. 10) are found to be common
with most important XP coefficients we present in Fig. 4 for the
xgboost method. A more detailed comparison with the stellar
parameter catalogue provided by Guiglion et al. (2024) is given
in Appendix A.1.

4. The SHBoost Gaia DR3 catalogue

In this paper, we use an xgboost regression to produce a cata-
logue of stellar properties derived from Gaia DR3 XP spectra,
avstrometry, and multi-wavelength photometry. This catalogue,
referred to as SHBoost, comprises the extinction, effective tem-
perature, surface gravity, [M/H], and mass estimates for more
than 217 million stars and is made available via CDS/VizieR.
The data model is described in Appendix B.

As mentioned in Sect. 3.2, Fig. 3 shows a summary plot of
the uncertainties for each parameter, as histograms (top row) and
as a function of magnitude (second row) and distance (bottom
row), respectively. Below, we give a few examples of how our
catalogue can be used to study stellar populations and interstel-
lar dust in the Milky Way and the Local Group. Comparisons
with other stellar-parameter catalogues based on Gaia DR3 are
presented in Appendix A.

4.1. Kiel and colour-magnitude diagrams

In Fig. 5, we show the *Kiel* diagrams (log *g* vs. log *T*<sub>eff</sub>) obtained from the full *Gaia* DR3 XP run in four magnitude bins (*G* < 14, 14 < *G* ≤ 16, 16 < *G* ≤ 17, and 17 < *G* ≤ 19). Figure 6 shows the colour-magnitude diagrams (corrected for distance and extinction) for the full *Gaia* DR3 XP sample for which *G*<sub>BP</sub>, *G*<sub>RP</sub>, and parallaxes are available (217.97M stars) and for a sub-sample of white-dwarf stars (one of the novelties of the present work with respect to Anders et al. 2022).

At a first glance, the diagrams are unsurprising and show
expected trends (for example, the *Kiel* diagrams in the four
magnitude bins shown in Fig. 5 look similar, and the full
CMD in Fig. 6 resembles the one in the lower right panel of
Fig. 1). However, upon a closer inspection, we notice a series of
interesting details.

The top panels of Fig. 5 show *Kiel* diagrams that are almost
fully consistent with our expectations from stellar evolutionary
models. As our composite training set covers most of the areas
of *Kiel* diagram actually occupied by the Milky Way’s stellar
populations and is indirectly based on stellar models, this is
expected. However, since our predictions of *T*<sub>eff</sub> and log *g* are
independent (in the sense that we train an *xgboost* model for
each label separately), this is not a completely trivial result. In
fact, the upper right panel, for example, shows that some stars
around log *T*<sub>eff</sub> ≈ 3.6 fall in unphysical log *g* ranges, which indi-
cates that our capacity to determine their surface gravity is not at
the same level as our *T*<sub>eff</sub> accuracy.

The brightest magnitude bin (upper left panel of Fig. 5 does
not contain any WDs, since these are too intrinsically faint.
The bulk of the WDs is contained in the faintest magnitude bin
(beyond the magnitude limit of G = 17.65 for non-WDs in Gaia
DR3; Montegriffo et al. 2023). Nevertheless, the total number of
white dwarfs contained in the XP dataset is low (see also Fig. 6;
lower row).

The second magnitude bin (upper right panel of Fig. 5) con-
tains a small number of stars classified as white dwarfs (log g ≈
8) and hot sub-dwarfs (log g ≈ 6), the latter well separated from
hot main-sequence stars (log g ≈ 4). This separation becomes
less obvious in the fainter magnitude bins (the hot part of the
MS tilts towards higher log g in the lower panels of Fig. 5), which
means that our results do not allow for a completely clean sep-
aration between O-type main-sequence stars and hot sub-dwarfs
(consistent with the findings of Gaia Collaboration 2018a).

The lowest-mass MS is missing in our training set, which
results in overestimated effective temperatures for ultra-cool
dwarfs. These objects accumulate at the lower end of the tem-
perature sequence in Fig. 5.

The top left panel of Fig. 6 shows that there is a sizeable
number of (mainly red-clump, but also upper-MS) stars with
inaccurate/uncertain extinction estimates, which results in the
unphysical diagonal stripes (the most obvious one extending
above and below the red clump). This feature is also visible in
parts of the training set; in particular in the *StarHorse* LAM-
OST LRS and MRS data (central panels of Fig. 1). We tested
the exclusion of these data from the training set, but achieved
worse results – indicating that the fainter magnitude limit of
LAMOST makes these stars crucial during the training phase.
We thus look forward to a re-calibration of all spectroscopic sur-
vey data to a common stellar parameter scale (see e.g. the recent
efforts of Thomas et al. 2024), which should lead to a significant
improvement of the stellar-parameter homogenisation problem
in the future.

The second and third panels of Fig. 6 show the intrinsic CMD colour-coded by metallicity (median xgbdist met mean per pixel) and metallicity uncertainty (median xgbdist met std per pixel), respectively. In particular, the right panel highlights the CMD regions in which the XP spectra are most sensitive to metallicity (FGK dwarfs and giants, as expected). The derived metallicities of WDs and stars in edge regions of the *Kiel* diagram/CMD should not be used.

4.2. Caveats

In this subsection, we reiterate the observational and method-
ological caveats associated with our SHBoost catalogue. Some
of them were already discussed with the validation plots shown
in the previous subsections or in the comparisons to other stellar-
parameter catalogues shown in Appendix A. The most important
caveats of our method are described in this section.
<figure><img src="image_6.png" /><figcaption>**Fig. 5.** Unfiltered *Kiel* diagrams of the full *Gaia* DR3 XP sample, in four broad bins of observed *G* magnitude.</figcaption></figure>

Most importantly, the accuracy of any supervised machine
learning model is limited by the accuracy of the training set
it uses. In our case, most of our training set is coming from
the *StarHorse* catalogues of *Queiroz et al.* (2023) derived
from ground-based spectroscopic surveys and *Gaia* DR3. These
stellar parameters are based on state-of-the-art evolutionary
models, but do not take into account unresolved or interacting
binaries.

A second (and related) caveat is that in order to cover a
larger parameter space of the Hertzsprung-Russell diagram, we
joined the *Queiroz et al.* (2023) catalogues with other cata-
logues of hot stars, white dwarfs, very metal-poor stars, and hot
sub-dwarfs (see Fig. 1). At the margin between these regimes,
systematics can be expected. These systematics certainly con-
tribute to both the statistical and the systematic uncertainty
budget of the *SHBoost* catalogue and, thus, the dedicated cat-
alogues for smaller parts of the Hertzsprung-Russell diagram
will likely be more precise within their specified realm of
validity.

A minor caveat in this respect is that there are also system-
atic differences in the input spectroscopic stellar parameters of
the different *StarHorse* catalogues. Our training set is based on
the *StarHorse* posteriors, so the systematics between different
surveys are to a large degree homogenised, but some systematics
might still be present (see discussion in *Queiroz et al. 2023*).
A true inter-survey homogenisation should follow approaches
such as Ness et al. (2015); Ting et al. (2019); Guiglion et al.
(2020); Ambrosch et al. (2023), or Thomas et al. (2024). Homo-
geneous stellar parameter catalogues might become available for
more surveys in the near- and mid-term future (Tsantaki et al.
2022).

Due to our philosophy of using the *StarHorse* posteriors as the input label scale, the produced *xgb met* metallicities are based on [M/H] (assuming the Salaris correction for α-enhancement). Thus, we see significant trends with respect to [Fe/H] values, particularly at low metallicities (see Appendix C).

Although we included a significant set of very metal-poor stars
in the training data, our catalogue results also comes with much
larger uncertainties at low metallicities.

By construction, xgboost, unlike StarHorse or simi-
lar Bayesian stellar inference codes, cannot take into account
co-variances between the stellar parameters. Correlations
between, for example, T<sub>eff</sub> and log g are therefore not taken into
account. This weakness cannot be overcome with currently avail-
able tree-based methods, while it is intrinsically taken care of by
many multi-label output neural networks (e.g. Fallows & Sanders
2022, 2024; Anders et al. 2023b; Guiglion et al. 2024). Neverthe-
less, we have achieved physically meaningful results for the *Kiel*
diagram (see Fig. 5), for instance. This means that many stellar-
parameter degeneracies that appear in purely photo-astrometric
inferences (e.g. Anders et al. 2019, 2022) disappear when using
the *Gaia* XP spectra.

We obtained stellar parameter and extinction estimates for all
objects with Gaia DR3 XP spectra (217 974 770). This sample
includes also a small portion of bright (G < 17.65) galaxies and
quasars. For a significant portion of stars, some of the derived
quantities are very uncertain or even meaningless (see e.g. the
metallicities of white dwarfs in Fig. 6). All these results should
be filtered out either by their uncertainties or the corresponding
parameter flags.

In this work, we did not attempt to derive new age or dis-
tance estimates, since the information about these quantities is
not directly encoded in the *Gaia* DR3 XP spectra. All the maps
in this paper use Bayesian distance estimates from Anders et al.
(2022) or Bailer-Jones et al. (2021), both of which are based on
*Gaia* (E)DR3 astrometry and photometry.

**5. Results**

**5.1. Metallicity maps**

Figures 7 and 8 show examples of metallicity maps that can
be created from our dataset. The left panel of Fig. 7 shows
a face-on map of the Milky Way and its surroundings from
afar (box size: 100 kpc × 100 kpc), based on distances from
Anders et al. (2022) when available, otherwise from Bailer-Jones
et al. (2021). The right panel of the figure shows the same map
(but colour coded by the median xgbdist met mean per pixel)
demonstrating that it is possible to see some astrophysical sig-
natures in the data (e.g. we appreciate the expected metallicity
difference between the Large and Small Magellanic Clouds),
while others have not been recovered (e.g. a negative metal-
licity gradient in the MW halo; e.g. Castellani et al. 1983;
Carney et al. 1990; Tunçel Güçtekin et al. 2019, but see also
Monachesi et al. 2016; Das & Binney 2016; Conroy et al. 2019;
Vickers et al. 2021). We suggest that this is partly due to uncer-
tain distance estimates and partly due to the poor performance
of the xgbdist met estimator in the low-metallicity regime,
which can be mitigated by using calibrated [Fe/H] estimates (see
Appendix C).

In Fig. 8, we show an edge-on view of the Milky Way disc (R<sub>Gal</sub> vs. Z<sub>Gal</sub>), using only red-clump stars with small xgbdist met std. The median metallicity map (bottom panel) displays the expected signatures of the radial and vertical metallicity gradients, covering a much larger range of the disc with good statistics than currently possible with high- or medium-resolution spectroscopic surveys. A detailed quantitative comparison is out of the scope of the present paper, but the plot clearly reaffirms that the information content of the low-resolution *Gaia* XP spectra should not be underestimated (see
<figure><img src="image_7.png" /><figcaption>**Fig. 6.** Extinction-corrected colour–magnitude diagrams. Top row: Full Gaia DR3 XP sample (before filtering results with large uncertainties). Top left: 2D histogram. Top middle: colour-coded by median metallicity per bin. Top right: Colour-coded by median metallicity uncertainty per bin. Middle row: Same as top row, but flag-cleaned (using xgb_av_outputflag, xgb_logteff_outputflag, and xgb_met_outputflag). Bottom row: white-dwarf portion of the colour-magnitude diagram (filtered by $log g > 7$). Bottom left: 2D histogram. Bottom middle: mass colour-coded by median mass. Bottom right: mass colour-coded by mass uncertainty.</figcaption></figure>

also e.g. Andrae et al. 2023b; Lucey et al. 2023; Weiler et al. 2023; Li et al. 2024).

## 5.2. Hot stars

One of the strong points of our method lies in the diversity of the training set. Since we explicitly included hot stars in our training set, the stellar-parameter predictions for these stars are significantly better than in Anders et al. (2022) or Andrae et al. (2023a). As an example, we show in Fig. 9, a map of about 375 000 B star candidates selected only based on their effective temperature and surface gravity. This map extends further than most previous maps of hot stars (e.g. Zari et al. 2021; Pantaleoni González et al. 2021) and provides fully consistent results with the Gaia-derived maps of young upper main-sequence stars (UMS, Poggio et al. 2021; Gaia Collaboration 2023a).

Figure 9 demonstrates that even without a dedicated effort to determine better distances for these stars (which would certainly be necessary for further science exploitation), all known major

over- and under-densities have been recovered (the plot can be compared to e.g. Fig. 11 in Zari et al. 2021 or Fig. 5 in Pantaleoni González et al. 2021). In addition, the new over-densities in the Milky Way’s fourth quadrant seen in the Gaia EDR3 maps of Poggio et al. (2021) (at (-9.5, -2) or at (-9, -3)) have been confirmed. As pointed out in Gaia Collaboration (2023a), they also coincide with over-densities of young open clusters seen in recent catalogues (Cantat-Gaudin et al. 2020; Hunt & Reffert 2023).

The hot star map shown in Fig. 9 also highlights two under-densities (dashed ellipses) that appear in many different samples of young stellar tracers (star clusters, O stars, upper main-sequence stars; e.g. Castro-Ginard et al. 2019)<fnref n="7" />. In both cases, we find a significant number of sources that have been detected in the same line of sight but further away; in other words, they have not been produced by extinction cones. Recent 3D extinction maps (e.g. Vergely et al. 2022, Fig. 11) also indicate that

<footnote n="7">7 https://www.cosmos.esa.int/web/gaia/iow_20180614</footnote>
<figure><img src="image_8.png" /><figcaption>**Fig. 7.** Large-scale Cartesian map (box size: 100 × 100 kpc²) of the *Gaia* DR3 XP sample. Left panel: density map. Right panel: median metallicity map of the same volume (integrating over all $Z_{\text{Gal}}$), using all 204 million stars with $\sigma_{[M/H]} < 0.3$ dex and only showing bins containing more than 3 stars. Some salient features of the map are annotated.</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>**Fig. 8.** Distribution of red-clump stars with *Gaia* DR3 XP spectra in the Galactic disc. Top panel: Density distribution in cylindrical Galactocentric coordinates. Bottom panel: Median metallicity map of 7.5 million red-clump stars with $\sigma_{[M/H]} < 0.2$ dex.</figcaption></figure>

<caption>**Fig. 9.** Spatial distribution of a *Gaia* DR3 XP sample of 376 321 B star candidates (selected as 4.0 < xgbdist_logteff_mean < 4.5 & xgbdist_logg_mean < 6 & xgbdist_logteff_std < 0.1 & xgbdist_logg_std < 0.5). Known over-densities corresponding to OB associations are annotated. The dotted ellipses correspond to (potential) star formation voids.</caption>

there is little absorption in the respective areas. The sample of IPHAS-selected A stars investigated by Ardèvol et al. (2023) is limited to longitudes $30^\circ \text{deg} < l < 215^\circ \text{deg}$; thus, it does not reach this region.

Comparing Fig. 9 to the map of *Gaia* EDR3 upper main-sequence stars (Poggio et al. 2021, see Fig. 1), we find that both these two over-densities and the under-density near Vela can also be sensed, albeit close to the limit of their sample. This is a further point indication that these features are not biases of this new sample. We argue that the mapping of stellar under-densities should be just as important as mapping their overdensities. We see more and more evidence for lumpy or flocculent structure in the solar neighbourhood, as opposed to a smooth distribution with well-defined spiral arms (e.g. Shetty & Ostriker 2008;

Dobbs et al. 2011; Dobbs & Baba 2014; Castro-Ginard et al. 2021).

### 5.3. Extinction maps

Figure 10 shows an example of how our results perform in terms of extinction. The four panels correspond to consecutive distance bins of a 30 $^\circ \text{deg} \times 30^\circ \text{deg}$ region around the Orion nebula; each
<figure><img src="image_10.png" /><figcaption>**Fig. 10.** Differential Δ*A*<sub>V</sub> extinction maps for the Orion region (30 deg × 30 deg, *d* < 1.5 kpc; left) in four bins of distance, as indicated in each panel. Some artefacts from the *Gaia* scanning law are visible in these maps, but the distance-sliced *A*<sub>V</sub> maps are generally complete down to *A*<sub>V</sub> ≳ 6 mag, with a high resolution, and correspond very well to existing 3D dust maps.</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>**Fig. 11.** Z<sub>Gal</sub> vs. R<sub>Gal</sub> map of low-metallicity candidate stars (defined as stars that have xgbdist met mean < -1 and xgb met output flag== "0"). There are 766k stars in the region covered by the map (943k in total). The white dashed ellipse marks the typical extent of a classical bulge region.</figcaption></figure>

panel shows a differential extinction map (i.e. the amount of extinction that is added in the respective distance range). We thus observe how the extinction from the molecular dust clouds gradually fills the Galactic plane with increasing distance. This effect is in principle already observable in the median StarHorse Gaia DR2 extinction maps of the Orion region shown in Fig. 11 of Anders et al. (2019), but now the scatter in extinction per star (and thus also per pixel) is lower and the amount of unphysical artefacts has diminished.

It is thus possible to infer the 3D dust distribution almost by eye from sequential 2D slices such as those shown in Fig. 10. In the case of farther regions and/or greater statistical noise, however, the inversion problem of inferring the 3D dust distribution in the extended solar neighbourhood from photo-astrometric data requires significant conceptual and computational effort (Lallement et al. 2014, 2019, 2022; Sale & Magorrian 2018; Green et al. 2019; Leike et al. 2020; Rezaei Kh. et al. 2020, e.g.).

5.4. Metal-poor stars

The plethora of recent works providing improved stellar metal-
licity estimates from Gaia XP spectra (e.g. Andrae et al. 2023b;
Zhang et al. 2023; Xylakis-Dornbusch et al. 2024; Yao et al.
2024) is (to some degree) driven by the need for reliable input
catalogues of ongoing and upcoming surveys targeting metal-
poor and very metal-poor stars (e.g. Christlieb et al. 2019;
Conroy et al. 2019; Cioni et al. 2019; Chiappini et al. 2019;
Arentsen et al. 2020a).

Pre-Gaia DR3 surveys of metal-poor stars, such as SkyMap-
per (Keller et al. 2007), J-PAS/J-PLUS (Marín-Franch et al.
2012), Pristine (Starkenburg et al. 2017), or PIGS (Arentsen
et al. 2020b), have fundamentally relied on the combination of
narrow- and intermediate-band photometry to select candidates
(e.g. Frebel & Norris 2015; Youakim et al. 2017; Whitten et al.
2019; Chiti et al. 2021; Galarza et al. 2022). The high signal-to-
noise ratios of the Gaia XP spectra make it possible to construct
synthetic narrow-band filters from these spectra, for example

using the gaia-xpy package (Ruz-Mieres 2022), without the
need for costly narrow-band observations with ground-based
telescopes.

In this work, we have used the *Gaia* DR3 XP spectra in their native form (using the coefficients of the Hermite basis functions that describe the spectra; Carrasco et al. 2021). Other works, such as Andrae et al. (2023b), have also used the synthetic narrow-band magnitudes and focussed on a narrower portion of the Hertzsprung-Russell diagram. This enabled their study to achieve a higher formal precision in the obtained metallicities (see Appendix A.3).

The comparison with open and globular clusters in Appendix C shows that our xgb met global metallicity estimates are systematically overestimated for low metallicities (see also Fig. 2 and Appendix A.3). However, these estimates are still useful to select a pure sample of low-metallicity candidates to be followed up with spectroscopic surveys. Figure 11 shows an example selection of bona-fide metal-poor stars (selected as xgbdist met mean + xgbdist met std < -1) closer than 5 kpc to the Galactic plane. A comparison with Fig. C.1 shows that while this selection is not optimised for very or extremely metal-poor stars (see Xylakis-Dornbusch et al. 2024 or Yao et al. 2024 for dedicated attempts), it does result in a disc sample that has a purity of metal-poor stars (i.e. spectroscopic [M/H] < -1) greater than 90%. The metallicity range -2 ≲ [M/H] ≲ -1 is in itself a very interesting regime that provides crucial hints to deciphering the early evolution and merger history of the Milky Way’s disc (e.g. Nepal et al. 2024b). The selection shown in Fig. 11 was therefore chosen as the base sample for the 4MIDABLE-LR (Chiappini et al. 2019) sub-survey on metal-poor disc stars, which will commence observations as part of 4MOST project (de Jong et al. 2019) in 2025 (de Jong et al. 2022).
<figure><img src="image_12.png" /><figcaption>**Fig. 12.** Galactic maps of super-metal-rich stars (xgbdist met > +0.5). The lower panel shows a top-down view of the Galaxy, marking the solar position (dotted lines), the approximate extent of the Galactic bar (ellipse), and the bulge and bar region studied by Queiroz et al. (2021).</figcaption></figure>

## 5.5. Super-metal-rich stars

As shown in Appendix A, our metallicity estimates are most reliable in the solar and super-solar regime. An immediate application is thus the mapping of super-metal-rich (SMR) stars. Figure 12 shows the distribution of stars with xgbdist met > +0.5 in the Galaxy, highlighting that most of these stars are located in the Galactic bar and bulge region (which is known to host a rich reservoir of such stars; see e.g. Queiroz et al. 2021; Rix et al. 2024). It also shows a few artefacts that are likely to be related to erroneous distances (in particular, the ring-like structure at ~1 kpc from the Sun; see also Anders et al. 2019).

Figure 13 demonstrates another possible application of our catalogue: the slicing of the XP sample into metallicity bins, which allows for statistical stellar-population studies that are otherwise difficult to carry out. In particular, Fig. 13 shows the distribution of orbital guiding radii (calculated assuming a flat rotation curve, roughly equivalent to angular momentum) in bins of metallicity between -0.5 and +0.5 for over 7 million stars in the disc ($|Z_{Gal}| < 1$ kpc and heliocentric distances $\le 4$ kpc). The most obvious observation is of course the gradual inward shift of the R<sub>guide</sub> distributions with growing metallicity, caused by the disc's negative radial abundance gradient (e.g. Janes 1979; Grenon 1987; Anders et al. 2014; Luck 2018). We also observe a second effect: the super-solar metallicity stars (xgb met> +0.1) show peaks in the R<sub>guide</sub> distribution similar to the bi-modality, which was found and discussed in Nepal et al. (2024a) using the much smaller Gaia DR3 RVS CNN dataset (Guiglion et al. 2024, containing ~169 000 MSTO stars). The XP sample, thanks

<figure><img src="image_13.png" /><figcaption>**Fig. 13.** Guiding-radius distributions of the XP sample with radial velocities from Gaia RVS, in bins of xgbdist met. The curves of SMR stars are highlighted as thicker lines. The dotted vertical line at R<sub>guide</sub> highlights the point after which the density of metal-rich stars reaches a floor, which might possibly be related to the outer Lindblad resonance of the Galactic bar.</figcaption></figure>

to its larger statistics, now allows us to also confirm another signature that was already hinted at by the data shown in Nepal et al. (2024a): There is an abrupt scarcity of metal-rich stars (xgb met> +0.1) beyond ~9.2 kpc (see also Khoperskov & Gerhard 2022). It has been suggested that the Galactic bar's outer Lindblad resonance (OLR) may limit the migration of stars from the inner galaxy beyond this location (see e.g. Halle et al. 2015; Khoperskov et al. 2020). We therefore suggest that this break in density at ~9.2 kpc could mark the position of the bar's OLR, which provides a natural barrier for the radial migration of stars on cold orbits.

These trends displayed by the metal-rich stars, previously shown on the basis of smaller samples, is impossible to explain only by selection biases and hint at a major role of the galactic bar in the chemo-dynamical evolution of the disc. In a future work (in preparation), we aim to use the SMR stars from the SHBoost catalogue to constrain the bar properties.

## 6. Conclusions and lessons for future work

In this paper, we present the SHBoost catalogue, derived from a set of xgboost regression models that determine stellar parameters and line-of-sight extinctions for more than 217 million stars with Gaia DR3 XP spectra. Through the curation of a high-quality training set (mostly coming from the spectroscopic survey data compiled in Queiroz et al. 2023), the code yields results that are competitive with its classical isochrone-fitting counter-part, the StarHorse Gaia EDR3 data presented in Anders et al. (2022). For reference, Table 2 summarises the stellar-parameter, distance, and extinction catalogues available from our group.

Our new SHBoost catalogue comes with reliable uncertainties estimated via xgboost-distributions. We achieve median (best 25% percentile in brackets) precisions of 0.20 (0.11) mag in line-of-sight extinction, $A_V$, 0.014 (0.010) dex for effective temperature, log T<sub>eff</sub> (or 174 [119] K in T<sub>eff</sub>), 0.20 (0.13) mag in surface gravity, log g, 0.18 (0.14) dex in metallicity [M/H], and 12% (8%) in mass. The validation of the individual uncertainty estimates shows that they are correctly estimated. In
<table><caption>**Table 2.** Stellar-parameter catalogues produced by the StarHorse group over the past years.</caption><thead><tr><th>References</th><th>Scope</th><th>N<sub>stars</sub></th><th>d</th><th>A<sub>V</sub></th><th>T<sub>eff</sub></th><th>log g</th><th>[M/H]</th><th>Mass</th><th>Age</th></tr></thead><tbody><tr><td>Queiroz et al. (2018)</td><td>4 spectroscopic surveys</td><td>0.5M</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td></td><td></td></tr><tr><td>Anders et al. (2018)</td><td>HARPS-GTO sample</td><td>0.001M</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td></tr><tr><td>Anders et al. (2019)</td><td>Gaia DR2 + 2MASS+AllWISE (G &lt; 18)</td><td>266M</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td></td></tr><tr><td>Queiroz et al. (2020)</td><td>5 spectroscopic surveys</td><td>1.6M</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td></td></tr><tr><td>Anders et al. (2022)</td><td>Gaia EDR3 + photometry (G &lt; 18.5)</td><td>362M</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x<sup>(*)</sup></td></tr><tr><td>Queiroz et al. (2023)</td><td>8 spectroscopic surveys</td><td>11.1M</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td></tr><tr><td>Nepal et al. (in prep.)</td><td>Gaia DR3 RVS CNN</td><td>0.8M</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td></tr><tr><td>This work</td><td>Gaia DR3 XP spectra</td><td>217M</td><td></td><td>x</td><td>x</td><td>x</td><td>x</td><td>x</td><td></td></tr></tbody></table>

**Notes.** (*)Age estimates for the StarHorse EDR3 run can only be obtained from the approximate joint posterior PDFs published at https://data.aip.de/projects/starhorse2021.html

addition, our *xgboost* models can be interpreted by using SHAP values (see Sect. 3.3 and Fig. 4).

We demonstrate that the combination of training data from several different surveys produces satisfactory results in parameter regimes that are traditionally not well covered by large-scale spectroscopic surveys (e.g. white dwarfs, OB stars, sdO stars) and other catalogues based on Gaia XP spectra. Other available stellar-parameter catalogues derived from XP spectra mostly rely on APOGEE data (e.g. Andrae et al. 2023b; Zhang et al. 2023; Fallows & Sanders 2024).

The whole inference pipeline (building the training set, training of the *xgboost* regression of stellar parameters, post-processing) could be run in 2 days on a 48-core machine at the Leibniz-Institut für Astrophysik Potsdam. This is a significant improvement in computational speed compared to the latest StarHorse EDR3 run, which took roughly three weeks to complete on a similar machine. We emphasise, however, that the need for classical Bayesian inference (at least for the construction of large robust training sets) will persist in the future.

In Sect. 5, we showcase several potential applications of our new catalogue, including differential extinction maps, metallicity trends in the Milky Way, and extended maps of young massive stars, metal-poor stars, and metal-rich stars. In particular, our hot star map reveals a new stellar void adjacent to the Vela region, suggesting that more such inhomogeneities are hiding in the extended solar neighbourhood.

The distribution of metal-poor stars shows homogeneity around the Sun and a spherical over-density in the Galactic centre, corroborating previous findings of an old bulge population distinct from the boxy peanut bulge (Barbuy et al. 2018; Zoccali 2019; Rix et al. 2022; Ardern-Arentsen et al. 2024). In addition, mapping metal-rich stars across the Galaxy reveals a significant reservoir of these stars in the inner regions (Queiroz et al. 2021; Rix et al. 2024). The large number of metal-rich stars in our catalogue provides new opportunities to study the formation and evolution of the inner disk and bar structure. As recently found in Nepal et al. (2024a), but now with a much larger number of stars, we have identified a bi-modality in the guiding radius distribution of super-metal-rich stars and a scarcity of such stars beyond a Galactocentric distance of ~9.2 kpc, which may be related to the outer Lindblad resonance of the Galactic bar.

In view of Gaia DR4, which will contain a much greater data volume (including many millions of previously unavailable XP and RVS spectra), we foresee that convolutional neural-network approaches will likely prevail over future tree-based implementations. This is supported by recent developments, which allow for similar levels of performance in terms of precision and

computational cost, while naturally allowing for the inclusion of uncertain and correlated output labels (e.g. Fallows & Sanders 2024).

## Data availability

Table B.1 provides the data model for the provided SHBoost output tables. It is available at the CDS via anonymous ftp to cdsarc.cds.unistra.fr (130.79.128.5) or via https://cdsarc.cds.unistra.fr/viz-bin/cat/J/A+A/691/A98. Alternatively, the data can also be accessed via a dedicated web page (https://data.aip.de/projects/shboost2024.html), where we provide detailed instructions and python notebooks that illustrate how to download and use the catalogue efficiently: data.aip.de/projects/shboost2024.html.

**Acknowledgements.** This work was partially funded by the Spanish MICIN/AEI/10.13039/501100011033 and by the "ERDF A way of making Europe" funds by the European Union through grants RTI2018-095076-B-C21, PID2021-122842OB-C21, PID2021-125451NA-100, and CNS2022-135232, and the Institute of Cosmos Sciences University of Barcelona (ICCUB, Unidad de Excelencia 'María de Maeztu') through grant CEX2019-000918-M. FA acknowledges financial support from MCIN/AEI/10.13039/501100011033 through grants IJC2019-04862-I and RYC2021-031638-I (the latter co-funded by European Union NextGenerationEU/PRTR). GG acknowledges support by Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – project-IDs: eBer-22-59652 (GU 2240/1-1 "Galactic Archaeology with Convolutional Neural-Networks: Realising the potential of Gaia and 4MOST"). This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (Grant agreement No. 949173). This work made use of the following software packages: *astropy* (Astropy Collaboration 2013, 2018, 2022), *Jupyter* (Perez & Granger 2007; Kluyver et al. 2016), *matplotlib* (Hunter 2007), * numpy* (Harris et al. 2020), *pandas* (Wes McKinney 2010; The pandas development team 2023), *python* (Van Rossum & Drake 2009), *scipy* (Virtanen et al. 2020; Gommers et al. 2024), *astroquery* (Ginsburg et al. 2019; Ginsburg et al. 2024), *Cython* (Behnel et al. 2011), *h5py* (Collette 2013; Collette et al. 2023), *scikit-learn* (Pedregosa et al. 2011; Buitinck et al. 2013; Grisel et al. 2024) and *seaborn* (Waskom 2021). This research has made use of NASA's Astrophysics Data System. Some of the results in this paper have been derived using *healpy* and the *HEALPix* package<fnref n="8" /> (Zonca et al. 2019; Górski et al. 2005; Zonca et al. 2024). Software citation information were aggregated using *The Software Citation Station* (Wagg & Broekgaarden 2024a; Wagg & Broekgaarden 2024b). This work has made use of data from the European Space Agency (ESA) mission Gaia (http://www.cosmos.esa.int/gaia), processed by the Gaia Data Processing and Analysis Consortium (DPAC, http://www.cosmos.esa.int/web/gaia/dpac/consortium). Funding for the DPAC has been provided by national institutions, in particular the institutions participating in the Gaia Multilateral Agreement. Funding for

<footnote n="8">⁸ http://healpix.sourceforge.net</footnote>
the SDSS Brazilian Participation Group has been provided by the Ministério de Ciência e Tecnologia (MCT), Fundação Carlos Chagas Filho de Amparo à Pesquisa do Estado do Rio de Janeiro (FAPERJ), Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq), and Financiadora de Estudos e Projetos (FINEP). Funding for the Sloan Digital Sky Survey IV has been provided by the Alfred P. Sloan Foundation, the U.S. Department of Energy Office of Science, and the Participating Institutions. SDSS-IV acknowledges support and resources from the Center for High-Performance Computing at the University of Utah. The SDSS web site is www.sdss.org. SDSS-IV is managed by the Astrophysical Research Consortium for the Participating Institutions of the SDSS Collaboration including the Brazilian Participation Group, the Carnegie Institution for Science, Carnegie Mellon University, the Chilean Participation Group, the French Participation Group, Harvard-Smithsonian Center for Astrophysics, Instituto de Astrofísica de Canarias, The Johns Hopkins University, Kavli Institute for the Physics and Mathematics of the Universe (IPMU) / University of Tokyo, Lawrence Berkeley National Laboratory, Leibniz-Institut für Astrophysik Potsdam (AIP), Max-Planck-Institut für Astronomie (MPIA Heidelberg), Max-Planck-Institut für Astrophysik (MPA Garching), Max-Planck-Institut für Extraterrestrische Physik (MPE), National Astronomical Observatory of China, New Mexico State University, New York University, University of Notre Dame, Observatório Nacional / MCTI, The Ohio State University, Pennsylvania State University, Shanghai Astronomical Observatory, United Kingdom Participation Group, Universidad Nacional Autónoma de México, University of Arizona, University of Colorado Boulder, University of Oxford, University of Portsmouth, University of Utah, University of Virginia, University of Washington, University of Wisconsin, Vanderbilt University, and Yale University. Guoshoujing Telescope (the Large Sky Area Multi-Object Fiber Spectroscopic Telescope LAMOST) is a National Major Scientific Project built by the Chinese Academy of Sciences. Funding for the project has been provided by the National Development and Reform Commission. LAMOST is operated and managed by the National Astronomical Observatories, Chinese Academy of Sciences. Funding for RAVE has been provided by: the Australian Astronomical Observatory; the Leibniz-Institut für Astrophysik Potsdam (AIP); the Australian National University; the Australian Research Council; the French National Research Agency; the German Research Foundation (SPP 1177 and SFB 881); the European Research Council (ERC-StG 240271 Galactica); the Istituto Nazionale di Astrofisica di Padova; The Johns Hopkins University; the National Science Foundation of the USA (AST-0908326); the W. M. Keck foundation; the Macquarie University; the Netherlands Research School for Astronomy; the Natural Sciences and Engineering Research Council of Canada; the Slovenian Research Agency; the Swiss National Science Foundation; the Science & Technology Facilities Council of the UK; Opticon; Strasbourg Observatory; and the Universities of Groningen, Heidelberg and Sydney. The RAVE web site is at https://www.rave-survey.org. This work has also made use of data from Gaia-ESO based on data products from observations made with ESO Telescopes at the La Silla Paranal Observatory under programme ID 188.B-3002.

## References

Ambrosch, M., Guiglion, G., Mikolaitis, Š., et al. 2023, A&A, 672, A46

Anders, F., Chiappini, C., Santiago, B. X., et al. 2014, A&A, 564, A115

Anders, F., Chiappini, C., Santiago, B. X., et al. 2018, A&A, 619, A125

Anders, F., Khalatyan, A., Chiappini, C., et al. 2019, A&A, 628, A94

Anders, F., Khalatyan, A., Queiroz, A. B. A., et al. 2022, A&A, 658, A91

Anders, F., Gispert, P., Ratcliffe, B., et al. 2023a, A&A, 678, A158

Anders, F., Khalatyan, A., Queiroz, A., Nepal, S., & Chiappini, C. 2023b, in Highlights on Spanish Astrophysics XI, 349

Andrae, R., Fouesneau, M., Sordo, R., et al. 2023a, A&A, 674, A27

Andrae, R., Rix, H.-W., & Chandra, V. 2023b, ApJS, 267, 8

Ardern-Arentsen, A., Monari, G., Queiroz, A. B. A., et al. 2024, MNRAS, 530, 3391

Ardèvol, J., Monguió, M., Figueras, F., Romero-Gómez, M., & Carrasco, J. M. 2023, A&A, 678, A111

Arentsen, A., Starkenburg, E., Martin, N. F., et al. 2020a, MNRAS, 496, 4964

Arentsen, A., Starkenburg, E., Martin, N. F., et al. 2020b, MNRAS, 491, L11

Astropy Collaboration (Robitaille, T. P., et al.) 2013, A&A, 558, A33

Astropy Collaboration (Price-Whelan, A. M., et al.) 2018, AJ, 156, 123

Astropy Collaboration (Price-Whelan, A. M., et al.) 2022, ApJ, 935, 167

Bailer-Jones, C. A. L., Rybizki, J., Fouesneau, M., Demleitner, M., & Andrae, R. 2021, AJ, 161, 147

Barbuy, B., Chiappini, C., & Gerhard, O. 2018, ARA&A, 56, 223

Baron, D. 2019, arXiv e-prints [arXiv:1904.07248]

Behnel, S., Bradshaw, R., Citro, C., et al. 2011, Comput. Sci. Eng., 13, 31

Bethapudi, S., & Desai, S. 2018, Astron. Comput., 23, 15

Borisov, V., Leemann, T., Seßler, K., et al. 2021, arXiv e-prints [arXiv:2110.01889]

Buitinck, L., Louppe, G., Blondel, M., et al. 2013, in ECML PKDD Workshop: Languages for Data Mining and Machine Learning, 108

Cantat-Gaudin, T., Anders, F., Castro-Ginard, A., et al. 2020, A&A, 640, A1

Carney, B. W., Aguilar, L., Latham, D. W., & Laird, J. B. 1990, AJ, 99, 201

Carrasco, J. M., Weiler, M., Jordi, C., et al. 2021, A&A, 652, A86

Castellani, V., Maceroni, C., & Tosi, M. 1983, A&A, 128, 64

Castro-Ginard, A., Jordi, C., Luri, X., Cantat-Gaudin, T., & Balaguer-Núñez, L. 2019, A&A, 627, A35

Castro-Ginard, A., McMillan, P. J., Luri, X., et al. 2021, A&A, 652, A162

Chen, T., & Guestrin, C. 2016, arXiv e-prints [arXiv:1603.02754]

Chiappini, C., Minchev, I., Starkenburg, E., et al. 2019, The Messenger, 175, 30

Chiti, A., Frebel, A., Mardini, M. K., et al. 2021, ApJS, 254, 31

Christlieb, N., Battistini, C., Bonifacio, P., et al. 2019, The Messenger, 175, 26

Cioni, M. R. L., Storm, J., Bell, C. P. M., et al. 2019, The Messenger, 175, 54

Ciucà, I., Kawata, D., Miglio, A., Davies, G. R., & Grand, R. J. J. 2021, MNRAS, 503, 2814

Collette, A. 2013, Python and HDF5 (O'Reilly)

Collette, A., Kluyver, T., Caswell, T. A., et al. 2023, https://doi.org/10.5281/zenodo.7560547

Conroy, C., Bonaca, A., Cargile, P., et al. 2019, ApJ, 883, 107

Cui, X.-Q., Zhao, Y.-H., Chu, Y.-Q., et al. 2012, Res. Astron. Astrophys., 12, 1197

Culpan, R., Geier, S., Reindl, N., et al. 2022, A&A, 662, A40

Cunha, P. A. C., & Humphrey, A. 2022, A&A, 666, A87

Cutri, R. M., Skrutskie, M. F., van Dyk, S., et al. 2003, 2MASS All Sky Catalog of point sources

Cutri, R. M., Wright, E. L., Conrow, T., et al. 2013, Explanatory Supplement to the AllWISE Data Release Products, Tech. rep.

Dang, Y., Chen, Z., Li, H., & Shu, H. 2022, Appl. Artif. Intell., 36, 1

Das, P., & Binney, J. 2016, MNRAS, 460, 1725

De Angeli, F., Weiler, M., Montegriffo, P., et al. 2023, A&A, 674, A2

de Jong, R. S., Agertz, O., Berbel, A. A., et al. 2019, The Messenger, 175, 3

de Jong, R. S., Bellido-Tirado, O., Brynnel, J. G., et al. 2022, SPIE Conf. Ser., 12184, 1218414

Deng, L.-C., Newberg, H. J., Liu, C., et al. 2012, Res. Astron. Astrophys., 12, 735

De Silva, G. M., Freeman, K. C., Bland-Hawthorn, J., et al. 2015, MNRAS, 449, 2604

Dobbs, C., & Baba, J. 2014, PASA, 31, e035

Dobbs, C. L., Burkert, A., & Pringle, J. E. 2011, MNRAS, 417, 1318

Duan, T., Avati, A., Ding, D. Y., et al. 2019, Thirty-seventh International Conference on Machine Learning 2020, [arXiv:1910.03225]

Echeverry, D., Torres, S., Rebassa-Mansergas, A., & Ferrer-Burjachs, A. 2022, A&A, 667, A144

Fallows, C. P., & Sanders, J. L. 2022, MNRAS, 516, 5521

Fallows, C. P., & Sanders, J. L. 2024, MNRAS, 531, 2126

Fluke, C. J., & Jacobs, C. 2020, WIREs Data Mining Knowledge Discov., 10, e1349

Fouesneau, M., Frémat, Y., Andrae, R., et al. 2023, A&A, 674, A28

Frebel, A., & Norris, J. E. 2015, ARA&A, 53, 631

Gaia Collaboration (Prusti, T., et al.) 2016, A&A, 595, A1

Gaia Collaboration (Babusiaux, C., et al.) 2018a, A&A, 616, A10

Gaia Collaboration (Brown, A. G. A., et al.) 2018b, A&A, 616, A1

Gaia Collaboration (Brown, A. G. A., et al.) 2021, A&A, 649, A1

Gaia Collaboration (Drimmel, R., et al.) 2023a, A&A, 674, A37

Gaia Collaboration (Montegriffo, P., et al.) 2023b, A&A, 674, A33

Gaia Collaboration (Vallenari, A., et al.) 2023c, A&A, 674, A1

Galarza, C. A., Daflon, S., Placco, V. M., et al. 2022, A&A, 657, A35

Gavel, A., Andrae, R., Fouesneau, M., Korn, A. J., & Sordo, R. 2021, A&A, 656, A93

Gentile Fusillo, N. P., Tremblay, P. E., Cukanovaite, E., et al. 2021, MNRAS, 508, 3877

Gilmore, G., Randich, S., Asplund, M., et al. 2012, The Messenger, 147, 25

Gilmore, G., Randich, S., Worley, C. C., et al. 2022, A&A, 666, A120

Ginsburg, A., Sipőcz, B. M., Brasseur, C. E., et al. 2019, AJ, 157, 98

Ginsburg, A., Sipőcz, B., Brasseur, C. E., et al. 2024, https://doi.org/10.5281/zenodo.10799414

Gommers, R., Virtanen, P., Haberland, M., et al. 2024, https://doi.org/10.5281/zenodo.10909890

Górski, K. M., Hivon, E., Banday, A. J., et al. 2005, ApJ, 622, 759

Green, G. M., Schlafly, E., Zucker, C., Speagle, J. S., & Finkbeiner, D. 2019, ApJ, 887, 93

Grenon, M. 1987, J. Astrophys. Astron., 8, 123

Grinsztajn, L., Oyallon, E., & Varoquaux, G. 2022, arXiv e-prints [arXiv:2207.08815]

Grisel, O., Mueller, A., Lars, et al. 2024, https://doi.org/10.5281/zenodo.11237090

Guiglion, G., Matijevič, G., Queiroz, A. B. A., et al. 2020, A&A, 644, A168

Guiglion, G., Nepal, S., Chiappini, C., et al. 2024, A&A, 682, A9
Halle, A., Di Matteo, P., Haywood, M., & Combes, F. 2015, A&A, 578, A58

Harris, W. E. 2010, arXiv e-prints [arXiv:1012.3224]

Harris, C. R., Millman, K. J., van der Walt, S. J., et al. 2020, Nature, 585, 357

Hattori, K. 2024, AJ, submitted [arXiv:2404.01269]

Hayden, M. R., Sharma, S., Bland-Hawthorn, J., et al. 2022, MNRAS, 517, 5325

He, X.-J., Luo, A. L., & Chen, Y.-Q. 2022, MNRAS, 512, 1710

Hunt, E. L., & Reffert, S. 2023, A&A, 673, A114

Hunter, J. D. 2007, Comput. Sci. Eng., 9, 90

Ivezić, Ž., Connelly, A. J., VanderPlas, J. T., & Gray, A. 2014, Statistics, Data Mining, and Machine Learning in Astronomy

Janes, K. A. 1979, ApJS, 39, 135

Jia, Y., Guo, S., Zhu, C., et al. 2023, Res. Astron. Astrophys., 23, 105012

Joshi, Y. C., Deepak, & Malhotra, S. 2024, Front. Astron. Space Sci., 11, 1348321

Keller, S. C., Schmidt, B. P., Bessell, M. S., et al. 2007, PASA, 24, 1

Khoperskov, S., & Gerhard, O. 2022, A&A, 663, A38

Khoperskov, S., Di Matteo, P., Haywood, M., Gómez, A., & Snaith, O. N. 2020, A&A, 638, A144

Klambauer, G., Unterthiner, T., Mayr, A., & Hochreiter, S. 2017, arXiv e-prints [arXiv:1706.02515]

Kluyver, T., Ragan-Kelley, B., Pérez, F., et al. 2016, in ELPUB, 87

Lallement, R., Babusiaux, C., Vergely, J. L., et al. 2019, A&A, 625, A135

Lallement, R., Vergely, J. L., Valette, B., et al. 2014, A&A, 561, A91

Lallement, R., Vergely, J. L., Babusiaux, C., & Cox, N. L. J. 2022, A&A, 661, A147

Laroche, A., & Speagle, J. S. 2024, ApJ, submitted [arXiv:2404.07316]

Leike, R. H., Glatzle, M., & Enßlin, T. A. 2020, A&A, 639, A138

Li, C., Zhang, Y., Cui, C., et al. 2021, MNRAS, 506, 1651

Li, C., Zhang, Y., Cui, C., et al. 2022a, MNRAS, 509, 2289

Li, H., Aoki, W., Matsuno, T., et al. 2022b, ApJ, 931, 147

Li, J., Wong, K. W. K., Hogg, D. W., Rix, H.-W., & Chandra, V. 2024, ApJS, 272, 2

Lucey, M., Al Kharusi, N., Hawkins, K., et al. 2023, MNRAS, 523, 4049

Luck, R. E. 2018, AJ, 156, 171

Lundberg, S. M. & Lee, S.-I. 2017, in Advances in Neural Information Processing Systems 30, eds. I. Guyon, U. V. Luxburg, S. Bengio, et al. (Curran Associates, Inc.), 4765

Lundberg, S. M., Erion, G., Chen, H., et al. 2020, Nat. Mach. Intell., 2, 2522

Majewski, S. R., Schiavon, R. P., Frinchaboy, P. M., et al. 2017, AJ, 154, 94

Marín-Franch, A., Chueca, S., Moles, M., et al. 2012, SPIE Conf. Ser., 8450, 84503S

Monachesi, A., Bell, E. F., Radburn-Smith, D. J., et al. 2016, MNRAS, 457, 1419

Montegriffo, P., De Angeli, F., Andrae, R., et al. 2023, A&A, 674, A3

Nepal, S., Chiappini, C., Guiglion, G., et al. 2024a, A&A, 681, L8

Nepal, S., Chiappini, C., Queiroz, A. B., et al. 2024b, A&A, 688, A167

Ness, M., Hogg, D. W., Rix, H. W., Ho, A. Y. Q., & Zasowski, G. 2015, ApJ, 808, 16

Pantaleoni González, M., Maíz Apellániz, J., Barbá, R. H., & Reed, B. C. 2021, MNRAS, 504, 2968

Pedregosa, F., Varoquaux, G., Gramfort, A., et al. 2011, J. Mach. Learn. Res., 12, 2825

Perez, F., & Granger, B. E. 2007, Comput. Sci. Eng., 9, 21

Poggio, E., Drimmel, R., Cantat-Gaudin, T., et al. 2021, A&A, 651, A104

Queiroz, A. B. A., Anders, F., Santiago, B. X., et al. 2018, MNRAS, 476, 2556

Queiroz, A. B. A., Anders, F., Chiappini, C., et al. 2020, A&A, 638, A76

Queiroz, A. B. A., Chiappini, C., Perez-Villegas, A., et al. 2021, A&A, 656, A156

Queiroz, A. B. A., Anders, F., Chiappini, C., et al. 2023, A&A, 673, A155

Rezaei Kh., S., Bailer-Jones, C. A. L., Soler, J. D., & Zari, E. 2020, A&A, 643, A151

Rix, H.-W., Chandra, V., Andrae, R., et al. 2022, ApJ, 941, 45

Rix, H.-W., Chandra, V., Zasowski, G., et al. 2024, ApJ, submitted [arXiv:2406.01706]

Ruz-Mieres, D. 2022, https://doi.org/10.5281/zenodo.6674521

Rybizki, J., Green, G. M., Rix, H.-W., et al. 2022, MNRAS, 510, 2597

Sale, S. E., & Magorrian, J. 2018, MNRAS, 481, 494

Sen, S., Agarwal, S., Chakraborty, P., & Singh, K. P. 2022, Exp. Astron., 53, 1

Shetty, R., & Ostriker, E. C. 2008, ApJ, 684, 978

Shwartz-Ziv, R., & Armon, A. 2021, arXiv e-prints [arXiv:2106.03253]

Soubiran, C., Brouillet, N., & Casamiquela, L. 2022, A&A, 663, A4

Starkenburg, E., Martin, N., Youakim, K., et al. 2017, MNRAS, 471, 2587

Steinmetz, M., Zwitter, T., Siebert, A., et al. 2006, AJ, 132, 1645

Steinmetz, M., Matijevič, G., Enke, H., et al. 2020, AJ, 160, 82

Suda, T., Katsuta, Y., Yamada, S., et al. 2008, PASJ, 60, 1159

The pandas development team, T. 2023, https://doi.org/10.5281/zenodo.10426137

Thomas, G. F., Battaglia, G., Gran, F., et al. 2024, A&A, 690, A54

Ting, Y.-S., Conroy, C., Rix, H.-W., & Cargile, P. 2019, ApJ, 879, 69

Tolamatti, A., Singh, K. K., & Yadav, K. K. 2023, MNRAS, 523, 5341

Tsantaki, M., Pancino, E., Marrese, P., et al. 2022, A&A, 659, A95

Tunçel Güçtekin, S., Bilir, S., Karaali, S., Plevne, O., & Ak, S. 2019, Adv. Space Res., 63, 1360

Van Rossum, G. & Drake, F. L. 2009, Python 3 Reference Manual (Scotts Valley, CA: CreateSpace)

Vavilova, I., Pakuliak, L., Babyk, I., et al. 2020, in Knowledge Discovery in Big Data from Astronomy and Earth Observation, eds. P. Škoda, & F. Adam, 57

Vergely, J. L., Lallement, R., & Cox, N. L. J. 2022, A&A, 664, A174

Vickers, J. J., Li, Z.-Y., Smith, M. C., & Shen, J. 2021, ApJ, 912, 32

Virtanen, P., Gommers, R., Oliphant, T. E., et al. 2020, Nature Methods, 17, 261

Wagg, T., & Broekgaarden, F. 2024a, The Software Citation Station

Wagg, T., & Broekgaarden, F. S. 2024b, arXiv e-prints [arXiv:2406.04405]

Waskom, M. L. 2021, J. Open Source Softw., 6, 3021

Weiler, M., Carrasco, J. M., Fabricius, C., & Jordi, C. 2023, A&A, 671, A52

Wes McKinney. 2010, in Proceedings of the 9th Python in Science Conference, eds. S. van der Walt, & J. Millman, 56

Whitten, D. D., Placco, V. M., Beers, T. C., et al. 2019, A&A, 622, A182

Witten, C. E. C., Aguado, D. S., Sanders, J. L., et al. 2022, MNRAS, 516, 3254

Xiang, M., Rix, H.-W., Ting, Y.-S., et al. 2022, A&A, 662, A66

Xu, X.-j., Shao, Y., & Li, X.-D. 2024, ApJ, 962, 126

Xylakis-Dornbusch, T., Christlieb, N., Lind, K., & Nordlander, T. 2022, A&A, 666, A58

Xylakis-Dornbusch, T., Christlieb, N., Hansen, T. T., et al. 2024, A&A, 687, A177

Yanny, B., Rockosi, C., Newberg, H. J., et al. 2009, AJ, 137, 4377

Yao, Y., Ji, A. P., Koposov, S. E., & Limberg, G. 2024, MNRAS, 527, 10937

Yi, Z., Chen, Z., Pan, J., et al. 2019, ApJ, 887, 241

Yong, D., Da Costa, G. S., Bessell, M. S., et al. 2021, MNRAS, 507, 4102

Youakim, K., Starkenburg, E., Aguado, D. S., et al. 2017, MNRAS, 472, 2963

Zari, E., Rix, H. W., Frankel, N., et al. 2021, A&A, 650, A112

Zhang, X., Green, G. M., & Rix, H.-W. 2023, MNRAS, 524, 1855

Zoccali, M. 2019, Bol. Asoc. Argentina Astron. Plata Argentina, 61, 137

Zonca, A., Singer, L., Lenz, D., et al. 2019, J. Open Source Softw., 4, 1298

Zonca, A., Singer, L., crosset, et al. 2024, https://doi.org/10.5281/zenodo.11337740
# Appendix A: Comparison to previous catalogues

An exhaustive comparison to similar efforts in the literature is beyond the scope of this paper; the comparisons shown in this appendix serve as illustrations of the magnitude of systematic differences one can expect between the various stellar-parameter catalogues based on Gaia DR3 that have become available in the past four years.

## A.1. Gaia DR3 RVS CNN catalogue (Guiglion et al. 2024)

In Fig. A.1 we compare the SHBoost parameterisation with the Gaia RVS atmospheric parameters derived by Guiglion et al. (2024) based on a hybrid Convolutional Neural-Network (CNN). In their study, Guiglion et al. (2024) combined the full Gaia DR3 data products in the form of Gaia DR3 RVS spectra, parallaxes, $G, G_{BP}$, and $G_{RP}$ magnitudes, as well as XP coefficients. This unique combination provides precise atmospheric parameters and robust [$\alpha$/M] estimates even for low signal-to-noise RVS spectra (down to $S/N_{RVS} = 15$), for about 800 000 stars. The authors characterised the [$\alpha$/M] vs [M/H] bi-modality from the inner to the outer disc, for the first time with Gaia RVS data. The CNN was trained on a high-quality training sample of ~40 000 stars in common between the Gaia DR3 RVS sample and APOGEE DR17. We cross-matched the RVS-CNN catalogue of Guiglion et al. (2024) with SHBoost catalogue. After the recommended quality cuts for the RVS-CNN catalogue (see Guiglion et al. (2024) for details) and requiring xgb_inputflag == 'XP5pGBPRPJHKsW1W2W3W4' for the SHBoost catalogue, we obtained a total of 655 950 stars.

As can be appreciated in Fig. A.1, we obtain very similar results to Guiglion et al. (2024) for the three stellar parameters in common ($T_{eff}$, log g, and [M/H]), modulo some small systematic trends. This is reassuring, especially since Guiglion et al. (2024) used also the Gaia RVS spectra (with spectral resolution $R \sim 11\,000$), which add much more precise information on metallicity than can be obtained from the low-resolution XP spectra.

By construction, our allowed range of $T_{eff}$ is larger than in the catalogue of Guiglion et al. (2024), which used APOGEE DR17 as a training set. This explains the deviating behaviour at the edges of the $T_{eff}$ range shown in the left panels of Fig. A.1. The log g comparison (middle panels) shows systematic differences below the 0.2 dex level (mean difference with respect to Guiglion et al. 2024 is +0.08 dex). For metallicity (right panels of Fig. A.1), we find a very good agreement in the disc-like metallicity regime ($> -0.6$ dex), while at lower metallicities our values are systematically higher than the ones of Guiglion et al. (2024), suggesting that our metallicities are overestimated in this regime (see also the sections below). We also inspected the weak horizontal branch visible in the top right panel of Fig. A.1 and find that for these stars our metallicities agree very well with the high-resolution metallicity scale of APOGEE, suggesting that for this sample the Guiglion et al. (2024) metallicities are underestimated.

## A.2. Gaia EDR3 StarHorse (Anders et al. 2022)

In Fig. A.2 we compare our SHBoost results with the results obtained from traditional Bayesian isochrone fitting to photoastrometric data with StarHorse (Anders et al. 2022). In that paper we published a catalogue of distances, extinctions, and stellar parameters for 362 million Gaia EDR3 stars brighter than $G < 18.5$ (see Table 2).

We observe that the effective temperature estimates between both works agree well for the vast majority of the data (between 3000 K and 10 000 K), albeit with a considerable scatter (MAE of 211 K). At greater $T_{eff}$, we had already shown in Anders et al. (2022) that the StarHorse EDR3 $T_{eff}$ scale is not very reliable, probably due to the sparse sampling of massive-star isochrones, binarity, and the initial-mass-function prior. We also refer to the discussion of hot luminous stars in Sect. 5.2.

For log g and $A_V$ (second and forth panel of Fig. A.2, respectively), we see a very good concordance between StarHorse EDR3 and SHBoost, with little global shifts (-0.02 dex and -0.11 mag, respectively) and small scatter around the one-to-one correspondence (MAEs of 0.10 dex and 0.20 mag, respectively). The group of stars with StarHorse log g ≈ 3 - 4 which has xgb_logg around 4.5-5 seems to be composed of genuine dwarf stars, which were affected by uncertain Gaia (E)DR3 parallax measurements, which lead to a StarHorse solution that is compatible for stars in either the dwarf, sub-giant, or giant evolutionary stages.

The greatest discrepancy of our SHBoost catalogue with the StarHorse EDR3 results arises for the metallicities (third column of Fig. A.2). This is generally expected because the StarHorse metallicity estimates are only based on broad-band photometry (in the best cases including griz photometry from PanSTARRS-1 or SkyMapper); whereas the SHBoost results use the low-resolution Gaia XP spectra, which contain much more precise information about both narrow and broad absorption features (Weiler et al. 2023). The large scatter with respect to the StarHorse EDR3 metallicity scale is thus fully anticipated. The systematic trend at low metallicity, however, is less intuitive. Since our SHBoost metallicities agree well with the ones obtained by Guiglion et al. (2024), as shown in Sect. A.1, we suggest that the StarHorse EDR3 photo-astrometric metallicities should be used with great caution, and not on an individual-star level.

## A.3. Gaia DR3 XP spectra + xgboost: Andrae et al. (2023b)

The first published stellar parameters derived from Gaia XP spectra using xgboost regression were delivered by Andrae et al. (2023b). These authors also included as input columns, in addition to the XP coefficients, synthetic narrow-band photometry derived from the XP spectra, which allowed them to obtain more precise metallicity estimates.

In Fig. A.3 we compare our results to the catalogue of Andrae et al. (2023b). Some of the patterns in the $T_{eff}$ and log g comparisons (left and middle column, respectively) are similar to the ones seen in Figs. A.1 and A.2. The larger range of effective temperatures in our training set allows for a better coverage of especially upper main-sequence stars. The diagonal branch in the lower left panel of Fig. A.3 is due to a set of stars potentially misclassified in the Andrae et al. (2023b) catalogue. The log g comparison in the middle panels of Fig. A.3 shows little dispersion (MAE: 0.11 dex) and only small offsets (mean: +0.03 dex). We also see similar trends of the log g systematics with respect to both the Andrae et al. (2023b) and Anders et al. (2022) catalogues.

The most discrepant results with respect to Andrae et al. (2023b) arise for metallicity. On the one hand, this is due to the different metallicity definitions used (Andrae et al. 2023b trained on the APOGEE DR17 [Fe/H] labels, while we use [M/H], which results in significant offsets for [$\alpha$/Fe]-enhanced populations; see also Sect. C). On the other hand, the training set of Andrae et al. (2023b) itself is much smaller, but less
Comparison to Guiglion+2024 (Gaia RVS CNN trained on APOGEE DR17)

<figure><img src="image_14.png" /><figcaption>**Fig. A.1.** Comparison to the stellar-parameter catalogue of Guiglion et al. (2024), based on Gaia DR3 data (especially RVS spectra, but also XP spectra, parallaxes, and broad-band photometry). Their catalogue was obtained with a convolutional neural network; the labels were trained on APOGEE DR17.</figcaption></figure>

Comparison to Anders+2022 (StarHorse Gaia EDR3)

<figure><img src="image_15.png" /><figcaption>**Fig. A.2.** Comparison of the SHBoost parameters with the StarHorse Gaia EDR3 parameters (Anders et al. 2022). Top panels: One-to-one comparisons of effective temperature, surface gravity, metallicity, and extinction (from left to right). Bottom panels: Residuals.</figcaption></figure>

heterogeneous than ours, resulting in better performance at least for *G* < 16, which is the range well covered by their training data. In addition, it appears that their approach to include also synthetic photometry in the training data further improved the precision. In principle, xgboost is able to fit also complex non-linear dependencies of multiple input quantities accurately, but the work of Andrae et al. (2023b) shows that in particular for metallicity it does help to include more explicit information about metallicity-sensitive features (such as the synthetic Pristine CaHK filter magnitude) in the training data.

**Appendix B: Data model**

Table B.1 provides the data model for the provided SHBoost output tables, available at the CDS and the AIP web page<fnref n="9" />, or through its DOI<fnref n="10" />.

<footnote n="9">⁹ https://data.aip.de/projects/shboost2024.html</footnote>

<footnote n="10">¹⁰ https://doi.org/10.17876/data/2024_3</footnote>
<figure><img src="image_16.png" /><figcaption>Fig. A.3. Comparison to the stellar-parameter catalogue of Andrae et al. (2023b), trained mostly on APOGEE DR17.</figcaption></figure>

<table><caption>Table B.1. Data model of the Gaia DR3 SHBoost catalogue.</caption><thead><tr><th>ID</th><th>Column name</th><th>Unit</th><th>Description</th></tr></thead><tbody><tr><td>0</td><td>source_id</td><td></td><td>Gaia DR3 unique source identifier</td></tr><tr><td>1</td><td>xgb_av</td><td>mag</td><td>line-of-sight extinction at λ = 5420 Å, A<sub>V</sub>, xgboost point estimate</td></tr><tr><td>2</td><td>xgbdist_av_mean</td><td>mag</td><td>line-of-sight extinction at λ = 5420 Å, A<sub>V</sub>, xgboost-distribution mean value</td></tr><tr><td>3</td><td>xgbdist_av_std</td><td>mag</td><td>line-of-sight extinction at λ = 5420 Å, A<sub>V</sub>, xgboost-distribution standard deviation</td></tr><tr><td>4</td><td>xgb_logteff</td><td>[K]</td><td>effective temperature, xgboost point estimate</td></tr><tr><td>5</td><td>xgb_logteff_mean</td><td>[K]</td><td>effective temperature, xgboost-distribution mean value</td></tr><tr><td>6</td><td>xgb_logteff_std</td><td>[K]</td><td>effective temperature, xgboost-distribution standard deviation</td></tr><tr><td>7</td><td>xgb_logg</td><td>[cgs]</td><td>surface gravity, xgboost point estimate</td></tr><tr><td>8</td><td>xgb_logg_mean</td><td>[cgs]</td><td>surface gravity, xgboost-distribution mean value</td></tr><tr><td>9</td><td>xgb_logg_std</td><td>[cgs]</td><td>surface gravity, xgboost-distribution standard deviation</td></tr><tr><td>10</td><td>xgb_met</td><td></td><td>metallicity, xgboost point estimate</td></tr><tr><td>11</td><td>xgb_met_mean</td><td></td><td>metallicity, xgboost-distribution mean value</td></tr><tr><td>12</td><td>xgb_met_std</td><td></td><td>metallicity, xgboost-distribution standard deviation</td></tr><tr><td>13</td><td>xgbAKER</td><td>M<sub>☉</sub></td><td>stellar mass, xgboost point estimate</td></tr><tr><td>14</td><td>xgbMass</td><td>M<sub>☉</sub></td><td>stellar mass, xgboost-distribution mean value</td></tr><tr><td>15</td><td>xgbMass_std</td><td>M<sub>☉</sub></td><td>stellar mass, xgboost-distribution standard deviation</td></tr><tr><td>16</td><td>dist</td><td>mag</td><td>Distance estimate from the literature</td></tr><tr><td>17</td><td>dist_lower</td><td>mag</td><td>16th distance percentile from the literature</td></tr><tr><td>18</td><td>dist_lower</td><td>mag</td><td>84th distance percentile from the literature</td></tr><tr><td>18</td><td>dist_flag</td><td>mag</td><td>Distance flag (0=StarHorse EDR3, 1=Bailer-Jones et al. 2021 photogeo, =2 BJ2021 geo)</td></tr><tr><td>19</td><td>bprp0</td><td>mag</td><td>dereddened colour, derived with gaia_edr3_photutils</td></tr><tr><td>20</td><td>mg0</td><td>mag</td><td>absolute magnitude, derived with gaia_edr3_photutils</td></tr><tr><td>21</td><td>xg</td><td>kpc</td><td>Galactocentric Cartesian X coordinate, derived from dist and assuming X<sub>0</sub> = -8.2 kpc</td></tr><tr><td>22</td><td>yg</td><td>kpc</td><td>Galactocentric Cartesian Y coordinate, derived from dist and assuming X<sub>0</sub> = -8.2 kpc</td></tr><tr><td>23</td><td>zg</td><td>kpc</td><td>Galactocentric Cartesian Z coordinate, derived from dist and assuming Z<sub>0</sub> = 0</td></tr><tr><td>24</td><td>rg</td><td>kpc</td><td>Galactocentric planar distance, derived from xg and yg</td></tr><tr><td>25</td><td>VXg</td><td>km/s</td><td>Galactic Cartesian velocity in X direction</td></tr><tr><td>26</td><td>VYG</td><td>km/s</td><td>Galactic Cartesian velocity in Y direction</td></tr><tr><td>27</td><td>VZG</td><td>km/s</td><td>Galactic Cartesian velocity in Z direction</td></tr><tr><td>28</td><td>VRG</td><td>km/s</td><td>Galactic radial velocity</td></tr><tr><td>29</td><td>VPHIG</td><td>km/s</td><td>Galactic angular velocity</td></tr><tr><td>30</td><td>xgb_inputflag</td><td></td><td>SHBoost input flag</td></tr><tr><td>31</td><td>xgb_av_outputflag</td><td></td><td>A<sub>V</sub> output quality flag (=0 if xgbdist_av_std &lt; 0.3)</td></tr><tr><td>32</td><td>xgb_logteff_outputflag</td><td></td><td>log T<sub>eff</sub> output quality flag (=0 if xgbdist_logteff_std &lt; 0.1)</td></tr><tr><td>33</td><td>xgb_logg_outputflag</td><td></td><td>log g output quality flag (=0 if xgbdist_logg_std &lt; 0.3)</td></tr><tr><td>34</td><td>xgb_met_outputflag</td><td></td><td>[M/H] output quality flag (=0 if xgbdist_met_std &lt; 0.3)</td></tr><tr><td>35</td><td>xgbMass_outputflag</td><td></td><td>Mass output quality flag (=0 if xgbdist_mass_std / xgbdist大人 mean &lt; 0.3)</td></tr></tbody></table>
<figure><img src="image_17.png" /><figcaption>**Fig. C.1.** [Fe/H] calibration based on members of open and globular clusters. Top left panel: One-to-one comparison of the xgb met values for open and globular cluster members with spectroscopic [Fe/H] measurements from the literature (using Joshi et al. 2024 for open clusters and Harris 2010 for globular clusters). Second row: residuals between xgb met and literature [Fe/H] (left panel) and feh calibrated and literature [Fe/H], showing the improvement achieved by our proposed calibration. Top right panel: comparison of the three metallicity distributions (literature, xgb met, and feh calibrated) for the cluster sample.</figcaption></figure>

## Appendix C: Empirical a posteriori metallicity calibration

When comparing the metallicity estimates obtained with xgboost to a large sample of open and globular clusters (see Figs. C.1 and C.2), we find important systematic offsets that scale both with metallicity itself, but also with effective temperature and surface gravity. Since our raw xgb met results correspond to [M/H] rather than [Fe/H], part of the trend with [Fe/H] (left panels of Fig. C.1) is partly expected due to α-enhancement at low metallicities. In addition, overestimated metallicities for globular clusters have been found to be common even in spectroscopic surveys (Soubiran et al. 2022). However, we also find important residual trends with stellar parameters (see left panels of Fig. C.2). We therefore decided to derive cluster-calibrated estimates of [Fe/H] for the full dataset, based on a third-order polynomial fit of {xgb met, xgb logteff, xgb logg, phot g mean mag} to the residuals.

We cross-matched our Gaia DR3 XP sample with the recent star-cluster membership catalogue of Hunt & Reffert (2023), which was in turn cross-matched with the [Fe/H] compilations of Joshi et al. (2024) and Harris (2010), resulting in a sample of 61660 stars in 202 open clusters and 9687 stars in globular clusters (blue and orange symbols in Fig. C.1, respectively). We find that two separate trends are discernible for stars with xgb met > −0.6 and ≤ −0.6, so these regimes were treated separately. The results of our [Fe/H] calibration are shown in the right panels of Figs. C.1 and C.2, demonstrating that it is possible to (at least

<figure><img src="image_18.png" /><figcaption>**Fig. C.2.** Effect of the [Fe/H] calibration for a few example open and globular clusters. Each panel shows the observed Gaia DR3 colour-magnitude diagrams (G vs G − G<sub>RP</sub>), colour-coded by either xgb met (left panels) or feh calibrated (right panels). The colour code limits are different in each row to highlight the differences with respect to the respective literature [Fe/H]. Top row: The solar-metallicity open cluster M67 (NGC 2682). Middle row: The metal-poor open cluster NGC 2158. Bottom row: Bulge globular cluster NGC 6752.</figcaption></figure>

partly) calibrate out the large biases in xgb met when compared to literature [Fe/H] measurements. In the case of the open cluster M67 (a.k.a. NGC 2682; top panels of Fig. C.2), for example, the calibrated [Fe/H] values (right panel) show a very small spread and bias with respect to the literature, while the xgb met values do show significant trends as a function of position in the CMD. In other cases, however, the calibration does not improve the results significantly.

In this paper, however (in particular in Sects. 5.1 and 5.4), we use only the uncalibrated xgb met values, keeping in mind that these tend to be significantly overestimated for low-metallicity objects, and slightly underestimated for super-solar metallicities (left panels of Fig. C.1). This is an effect that is commonly seen in machine-learning regression estimates of unbalanced datasets (e.g. Guiglion et al. 2024; see also Appendix A.1).