Source-linked AI summary
Deep learning of multi-element abundances from high-resolution spectroscopic data
Henry W. Leung, Jo Bovy
TL;DR
High-resolution spectroscopic surveys require scalable analysis despite incomplete, noisy, and low-SNR training data. The paper develops a censored-spectrum Bayesian neural network with robust training and dropout-based uncertainties, achieving precise abundance estimates while supporting rapid APOGEE-wide inference. Its scope remains tied to the quality and coverage of the ASPCAP-based training labels and training distribution.
Problem
Traditional high-resolution spectral analysis is impractical at survey scale, while existing approaches do not adequately handle low-SNR spectra, incomplete or noisy labels, and predictive uncertainties.
Method
The method uses a robust objective for incomplete and uncertain labels, dropout variational inference, and censored spectral inputs for individual elemental abundances alongside full-spectrum stellar parameters.
Results
Abundance precisions are ≈0.01 to 0.02 dex at high SNR and ≈0.02 to 0.03 dex for most elements at SNR≈50, with open-cluster scatter of 0.03 ± 0.03 dex.
Takeaways & Limitations
The method transfers calibrated spectroscopic results to large APOGEE datasets quickly while providing associated uncertainties and released DR14 predictions.
Takeaways & Limitations
Neural-network accuracy inherits systematic biases from the synthetic spectra, line lists, and calibrations used to generate ASPCAP training labels.
Abstract
from arXiv · showhide
Deep learning with artificial neural networks is increasingly gaining attention, because of its potential for data-driven astronomy. However, this methodology usually does not provide uncertainties and does not deal with incompleteness and noise in the training data. In this work, we design a neural network for high-resolution spectroscopic analysis using APOGEE data that mimics the methodology of standard spectroscopic analyses: stellar parameters are determined using the full wavelength range, but individual element abundances use censored portions of the spectrum. We train this network with a customized objective function that deals with incomplete and noisy training data and apply dropout variational inference to derive uncertainties on our predictions. We determine parameters and abundances for 18 individual elements at the $\approx 0.03$ dex level, even at low signal-to-noise ratio. We demonstrate that the uncertainties returned by our method are a realistic estimate of the precision and they automatically blow up when inputs or outputs outside of the training set are encountered, thus shielding users from unwanted extrapolation. By using standard deep-learning tools for GPU acceleration, our method is extremely fast, allowing analysis of the entire APOGEE data set of $\approx250,000$ spectra in ten minutes on a single, low-cost GPU. We release the stellar parameters and 18 individual-element abundances with associated uncertainty for the entire APOGEE DR14 dataset. Simultaneously, we release astroNN, a well-tested, open-source python package developed for this work, but that is also designed to be a general package for deep learning in astronomy. astroNN is available at https://github.com/henrysky/astroNN with extensive documentation at http://astroNN.readthedocs.io.
1 INTRODUCTION
Deep learning offers a scalable approach to extracting stellar parameters and elemental abundances from large spectroscopic surveys. This work extends earlier spectroscopic ANNs with robust training, uncertainty estimation, physical spectral constraints, and GPU acceleration.
- Motivation: Large surveys and affordable GPU hardware make deep-learning analysis increasingly practical for astronomical data.The authors describe machine learning as increasingly useful across photometric, spectroscopic, astrometric, and time-domain surveys.
- Motivation: High-resolution spectra contain information about stellar physical states and photospheric abundances, but traditional extraction is laborious.The paper motivates ANNs as a faster and more reliable alternative when a small training set of traditionally analyzed stars is available.
- Prior work: Earlier ANNs mapped observed spectra to stellar parameters, but related work primarily inferred only three labels with StarNet.The paper positions its method as an extension of observed-spectrum applications enabled by SEGUE and APOGEE.
- Contributions: The proposed method handles incomplete and uncertain labels, estimates predictive uncertainties with dropout variational inference, and constrains abundance inference using spectral information.It simultaneously infers 22 stellar and elemental labels across high- and low-SNR spectra.
- Contributions: GPU implementation provides more than an order-of-magnitude speed-up, while predictions with uncertainties are released for the entire APOGEE DR14 dataset.The work also demonstrates that a large network can operate with thousands of high-SNR training spectra.
2 BAYESIAN NEURAL NETWORKS WITH DROP-OUT
This section introduces artificial neural networks and dropout variational inference, then develops an objective function for incomplete and noisy spectroscopic training data. The approach combines stochastic dropout predictions with learned and known uncertainty terms while masking unavailable labels.
- Dropout Variational Inference: Dropout variational inference approximates Bayesian neural-network weight distributions with Bernoulli variables and is computationally suitable for large networks.Applying dropout to layers except the last, together with an L2-induced Gaussian prior, approximates the Bayesian network.
- Artificial Neural Networks: Artificial neural networks learn nonlinear mappings from input data to predicted labels through layered neurons and trainable weights.Each neuron applies a linear transformation followed optionally by a nonlinear function.
- Artificial Neural Networks: Network parameters are optimized by minimizing an objective function using gradient-based back-propagation and stochastic subsets of training data.The paper uses ADAM as a more sophisticated stochastic optimizer.
- Dropout Variational Inference: Dropout randomly removes hidden neurons during training to reduce overfitting and, during prediction, produces varying forward-pass outputs for uncertainty estimation.The final prediction is the mean across Monte Carlo dropout passes, while their standard deviation represents model uncertainty.
- Incomplete and noisy data: Standard mean squared error is vulnerable to outliers and ignores uncertainty in training labels, which are common issues in astronomical data.Spectral labels may be unavailable for one element while remaining measurable for others.
- Incomplete and noisy data: The robust objective incorporates known label uncertainty, learns an additional predictive variance, and assigns zero loss to unavailable labels.A correction term compensates for the implicit assumption of zero prediction error on missing data.
3 HIGH-RESOLUTION SPECTROSCOPIC DATA FROM APOGEE
The study builds training and test sets from APOGEE DR14 spectra and ASPCAP labels, then prepares normalized, standardized inputs for neural-network analysis. Data selection and preprocessing account for label quality, signal-to-noise, censored abundances, and known limitations in ASPCAP-derived parameters.
- Data sets: APOGEE DR14 provides continuum-normalized spectra, 22 ASPCAP labels, and associated uncertainties for the constructed training and test sets.The labels span stellar parameters and individual elemental abundances, including separate carbon and singly ionized titanium measurements.
- Data selection: The low-SNR test set uses the same stars as the high-SNR test set, providing a stringent evaluation of performance under added noise.
- Data selection: Training labels are restricted to accurate parameter ranges because systematic label errors would be learned by the network and propagated to test data.The study excludes spectra with Teff below 4000 K and recognizes that synthetic-spectrum assumptions limit ASPCAP label quality.
- Data selection: Main-sequence log g labels are ignored because ASPCAP assigns them MAGIC NUM = −9999, so the network cannot determine reliable main-sequence surface gravities.
- Data reduction: Continuum normalization compares ASPCAP processing with a method intended to trace the actual continuum, while masked bad pixels are set to the expected continuum value of 1.The normalization difference is relatively smooth with an overall offset, and detector-edge behavior is not perfectly captured.
- Data reduction: Labels are standardized to approximately zero mean and unit variance, using the training-set statistics consistently during inference without scaling spectra to unit variance.This preserves the differing noise properties between high-SNR training spectra and test spectra.
- Neural-network architecture: The ApogeeBCNNCensored architecture combines an ASPCAP masking layer with convolutional processing and predictive-uncertainty outputs.
4 PERFORMANCE ON APOGEE DATA
The neural network performs well across APOGEE spectra, including low-SNR observations, while its uncertainty estimates track sparse or unreliable regions. Comparisons, cluster tests, and sensitivity analysis support accurate abundance inference and physically sensible spectral dependence, with ASPCAP comparisons limited by possible reference biases.
- Comparison to ASPCAP at high signal-to-noise ratio: The network exhibits high-SNR bias against ASPCAP but relatively small scatter, and the comparison may overestimate its errors because ASPCAP has SNR-dependent and random uncertainties.The authors describe these ASPCAP-based biases and errors as an upper limit on the neural network’s own biases and errors.
- Comparison to ASPCAP at high signal-to-noise ratio: Uncertainties are high for extrapolative or sparsely trained regions, including dwarfs without training labels and low-metallicity, low-log g giants.For well-populated giant-branch regions, log g predictions are precise and uncertainties are low.
- Results at low signal-to-noise ratio: Low-SNR individual-exposure predictions closely match high-SNR combined counterparts, demonstrating robust performance despite larger scatter than at high SNR.The comparison uses neural-network predictions for corresponding individual and combined spectra rather than ASPCAP labels.
- Results at low signal-to-noise ratio: At SNR≈50, abundance precision ranges from 0.014 dex for [Fe/H] and [Ca/H] to 0.068 dex for [P/H], with all abundances measured better than 0.10 dex.Below SNR<30, all abundances show significant errors; performance worsens at lower metallicity.
- Results on open and globular clusters: At high SNR, residuals flatten to 0.01–0.02 dex, indicating approximately 0.01 dex precision for most abundances.Open-cluster abundance spreads are 0.030 ± 0.029 dex, while M13 reproduces the expected large Al spread more closely than ASPCAP.
- Sensitivity analysis: The network primarily uses element-specific ASPCAP spectral windows, but metal-poor stars also require features outside those windows, including strong Fe I features.This sensitivity pattern supports the censored architecture while showing that full-spectrum information remains important in extreme cases.
5 VARIATIONS
The paper compares alternative neural-network architectures, training-set sizes, and continuum-normalization procedures. Censored-spectrum abundance predictions avoid correlations seen with full-spectrum training, while performance remains nearly unchanged with only a few thousand training stars.
- 5.1 Training on the full, uncensored spectrum: Full-spectrum training fails in abundance-space regions poorly represented by the training set or with different intrinsic abundance trends.For M13, the full-spectrum network produces an overly strong [Al/H]–[Mg/H] correlation.
- 5.1 Training on the full, uncensored spectrum: Censored training yields M13 [Al/H] measurements more consistent with external results because it uses regions containing Al features.The [Al/H] spread from the censored network is about the same as that reported by Mészáros et al. (2015).
- 5.1 Training on the full, uncensored spectrum: Censored-spectrum training uses element-specific spectral regions while allowing limited full-spectrum information through a trainable two-neuron connection.The connection captures effects of abundances on the broader stellar spectrum without letting abundances be determined entirely through label correlations.
- 5.2 Training on small data sets: A network trained on only a few thousand stars achieves almost the same performance as one trained on the full data set.The reduced-data experiments used the same architecture and parameters, with training sets reduced by factors of 2 to 32.
- 5.3 Importance of continuum normalization: The authors’ continuum normalization improves neural-network performance compared with ASPCAP’s procedure.Biases are similar, but scatter for some abundances, including [C/H] and [N/H], is considerably larger with ASPCAP normalization.
6 ABUNDANCE DISTRIBUTIONS IN THE MILKY WAY
The paper presents [X/Fe] versus [Fe/H] distributions for all elements measured by ASPCAP, using a log g-uncertainty cut to remove problematic spectra and essentially all dwarfs.
- Abundance distributions: The Milky Way abundance distributions are compared between the neural network and ASPCAP after removing stars with log g uncertainty above 0.2 dex.This selection also removes essentially all dwarfs from the catalog.
7 DISCUSSION
The discussion emphasizes the neural network’s speed, realistic uncertainty estimates, and applicability to large spectroscopic surveys, while also identifying limits in interpretability, input-uncertainty handling, extrapolation, and unknown-line discovery.
- Performance: ≈100,000 APOGEE spectra with ≈7,500 wavelength pixels are processed using 22 labels, with training completed in ≈700 seconds on a consumer GPU.The method uses GPU acceleration and dropout during analysis.
- Performance: The method can transfer a small, traditionally analyzed training set to a much larger survey rapidly, enabling fast testing of changes in training-set input physics.This supports rapid prototyping and exploration of neural-network architectures.
- Limitations: The network performs best within its training domain, and extrapolation is limited even though returned uncertainties become very large there.This boundary is shared with other flexible data-driven approaches.
- Comparison with data-driven approaches: The direct spectrum-to-label mapping is faster than forward-modeling approaches but provides less interpretability because it cannot generate spectra while varying one label independently.The Cannon’s forward model supports such inspection, whereas this network does not.
- Uncertainties: Dropout-based uncertainties are approximately consistent with cross-validation or open-cluster scatter within well-populated training regions.Large uncertainties also flag extrapolation beyond the training set.
- Synthetic-spectrum comparison: Training on synthetic spectra can perform poorly when theoretical spectra do not match observed spectra because of calibration, normalization, or unmodeled-physics differences.This is a limitation of synthetic-spectrum training rather than the observed-spectrum training used here.
8 CONCLUSIONS
The conclusions present neural networks as a fast approach for scaling spectroscopic analysis to large surveys while retaining uncertainty estimates and useful precision at low signal-to-noise. The work also releases an astronomy-focused software framework and an APOGEE abundance catalog.
- Motivation: Hundreds of thousands of high-resolution spectra make traditional one-by-one analysis impractical, while existing synthetic-library fitting is slow and handles low-SNR spectra poorly.This motivates a scalable alternative for large spectroscopic surveys.
- Method: The method combines a robust objective for incomplete, uncertain labels with Bayesian dropout inference for uncertainty estimation.It is implemented in the astroNN Python framework.
- Results: ≈0.01–0.02 dex precision is obtained at high SNR, and ≈0.02–0.03 dex for most elements at SNR≈50.Open-cluster abundance scatter is 0.03 ± 0.03 dex.
- Results: Censoring is crucial for recovering expected globular-cluster abundance trends because full-spectrum training can overuse training-set element correlations.Performance remains barely degraded with training sets containing only thousands of spectra.
- Implications: Neural networks can transfer detailed analysis from a small calibration set to millions of spectra in minutes, supporting development of next-generation spectroscopy tools.The released astroNN package provides a platform for pursuing such applications.
APPENDIX A: astroNN: A PYTHON LIBRARY FOR DEEP LEARNING IN ASTRONOMY
astroNN is an astronomy-focused Python package designed to make deep learning accessible, reliable, and shareable for astronomical research. The package is supported by extensive testing, documentation, and model-sharing infrastructure.
- astroNN provides a Python platform for deep learning in astronomy, addressing the need for astronomy-relevant, accessible, well-tested tools and shareable neural networks.
- The package relies heavily on TensorFlow and is designed for easy setup across common platforms.
- Models are stored with the neural network, training history, model parameters, and output-neuron names to support sharing.
- The implementation includes about 8,300 lines of module code, 1,200 lines of test code, and 3,200 lines of documentation.
- More than 90% of neural-network-related components are covered by the test suite, with development infrastructure provided through GitHub, Travis-CI, Coveralls, and Read the Docs.
A1 Modules
astroNN is organized into data-processing, neural-network, and dataset modules supporting major astronomical surveys and multiple deep-learning workflows. Its components include survey-specific processing, specialized model architectures, robust objectives for incomplete data, and astronomy-oriented training datasets.
- Data processing modules: Three data-processing modules support APOGEE, Gaia, and LAMOST datasets, including survey-specific spectra, astrometry, and conversion tools.
- Neural-network modules: Two neural-network modules provide model architectures and TensorFlow- or Keras-compatible infrastructure.
- Neural-network modules: astroNN.models includes convolutional, Bayesian dropout-variational, and variational-autoencoder architectures, although the autoencoder remains under development.
- Neural-network modules: astroNN.nn provides robust and incomplete-data objective functions plus custom layers such as Monte Carlo Dropout, Gradient Stopping, and Boolean Masking.
- Datasets module: The datasets module supports multiple astronomical datasets, including APOKASC and Galaxy10, an astronomy-focused galaxy-image dataset for introducing deep-learning tools.
A2 Example of using Neural Net to infer parameters and abundances on arbitrary APOGEE spectra
This section provides a practical example for applying the paper’s neural network to APOGEE spectra. It covers obtaining the software and reproduction repository, preparing a Python environment, and beginning inference on a spectrum.
- The authors share trained networks in a separate GitHub repository for determining stellar parameters and abundances from APOGEE spectra.
- Users first install astroNN and obtain the repository containing code to reproduce the paper’s figures.
- Inference is performed from a Python terminal opened outside the astroNN_0617_run001 folder.
- The example applies the neural network to spectrum 2M19060637+4717296, which is also shown in Figure 5.
- The example listing demonstrates neural-network inference of parameters and abundances on APOGEE spectra.
- The code loads APOGEE spectrum, error, and bitmask data, then continuum-normalizes the spectrum using default settings.
A3 Fast Monte Carlo Inference on GPU
This section introduces FastMCInference for probabilistic neural networks that return predictions and predictive variance. The wrapper enables fast Monte Carlo inference on a GPU.
- FastMCInference wraps a probabilistic single-input neural network whose output concatenates predictions and predictive variance.
- FastMCInference is presented as a method for fast Monte Carlo inference on GPU.
- The example sets n=100 Monte Carlo runs and uses the resulting model through the standard Keras predict API.