SPT: Spectral Transformer for Red Giant Stars Age and Mass Estimation

Mengmeng Zhang, Fan Wu, Yude Bu, Shanshan Li, Zhenping Yi, Meng Liu, Xiaoming KongarXiv 2024 · DOI

Abstract

The precise determination of stellar ages and masses is fundamental to galactic archaeology. Red giant stars serve as vital "galactic clocks," yet traditional dating methods like isochrone fitting often suffer from degeneracy, and high-precision asteroseismology is data-intensive. We present the Spectral Transformer (SPT), an end-to-end deep learning model that predicts stellar age and mass from low-resolution spectra. SPT utilizes a Multi-head Hadamard Self-Attention (HSA) mechanism and a Mahalanobis distance-based loss function to capture complex spectral features while respecting the physical covariance between age and mass. Validated on LAMOST DR9 data with APOKASC-2 labels, SPT achieves state-of-the-art performance with a Mean Absolute Percentage Error (MAPE) of 17.64% for age and 6.61% for mass.

Introduction

Mapping the assembly history of the Milky Way requires accurate measurements of stellar ages and masses. Red giants are particularly useful for this task due to their high luminosity, allowing them to be observed across vast galactic distances. However, determining their age is challenging. Traditional isochrone fitting relies on stellar models that often overlap for different ages and masses, leading to significant ambiguity. Conversely, asteroseismology—the study of stellar oscillations—provides high precision but requires years of continuous photometric monitoring, which is unavailable for the vast majority of observed stars.

To bridge this gap, researchers have developed the Spectral Transformer (SPT). This framework aims to extract age and mass information directly from a single spectroscopic snapshot, effectively using deep learning to replicate the precision of asteroseismology using more readily available data.

Overview of the SPT pipeline, from data acquisition to age and mass prediction.

The Spectral Transformer Architecture

The SPT architecture adapts the Transformer model, originally designed for natural language processing, to the domain of stellar spectroscopy. Unlike previous methods that rely on pre-calculated stellar parameters (like temperature or metallicity), SPT operates directly on raw spectral pixels reduced via Principal Component Analysis (PCA).

Multi-head Hadamard Self-Attention (HSA)

A key innovation in SPT is the Multi-head Hadamard Self-Attention (HSA) mechanism. Standard Transformers use dot-product attention, which can sometimes overlook subtle spectral features. HSA employs element-wise multiplication (the Hadamard product) combined with a custom enhanced_softmax function. This approach preserves the competitive interplay between different spectral lines, ensuring that the model captures the complex chemical signatures necessary for accurate age estimation.

Detailed architecture of the Hadamard Self-Attention (HSA) mechanism and the transformer block.

Physics-Informed Loss: Mahalanobis Distance

In stellar physics, age and mass are not independent variables; they are deeply correlated through the laws of stellar evolution. To incorporate this physical reality, the authors implemented a loss function based on the Mahalanobis distance. Unlike standard Mean Squared Error (MSE), which treats targets independently, the Mahalanobis distance accounts for the covariance between age and mass. This ensures that the model's predictions remain physically consistent with stellar evolution models.

Uncertainty Quantification

To ensure the reliability of its predictions, SPT incorporates Monte Carlo (MC) Dropout. Instead of providing a single point estimate, the model generates a distribution of predictions for each star, allowing astronomers to quantify the uncertainty associated with each age and mass measurement.

Experimental Results

The SPT model was trained and validated using 3,880 high-quality red giant spectra from the LAMOST DR9 survey, with ground-truth labels derived from the high-precision APOKASC-2 asteroseismic catalog. The model demonstrated significant improvements over traditional machine learning baselines:

  • Age Estimation: Achieved a MAPE of 17.64%, a substantial improvement over the 25-40% error range typical of earlier spectral methods.
  • Mass Estimation: Achieved a MAPE of 6.61%, providing near-asteroseismic precision from a single spectrum.
  • Generalization: The model's reliability was further confirmed by testing it on "Open Clusters" (e.g., M67), where its predictions aligned closely with established independent age constraints.

Conclusion

The Spectral Transformer represents a significant step forward in stellar parameter estimation. By combining advanced attention mechanisms with physics-informed loss functions, SPT provides a scalable "middle way" for galactic archaeology. Future work will involve applying SPT to massive upcoming datasets from the Chinese Space Station Telescope (CSST) and the Vera C. Rubin Observatory (LSST), potentially unlocking the ages of millions of stars across the Milky Way.

Summary updated

BibTeX
@misc{zhang2024spt,
  author = {Mengmeng Zhang and Fan Wu and Yude Bu and Shanshan Li and Zhenping Yi and Meng Liu and Xiaoming Kong},
  title = {{SPT: Spectral Transformer for Red Giant Stars Age and Mass Estimation}},
  year = {2024},
  eprint = {2401.04900},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.04900},
}
Figure