Spectuner-D1: Spectral Line Fitting of Interstellar Molecules Using Deep Reinforcement Learning
Yisheng Qiu, Tianwei Zhang, Tie Liu, Fengyao Zhu, Dezhao Meng, Huaxi Chen, Thomas Möller, Peter Schilke, Donghui Quan
TL;DR
Spectuner-D1 addresses the challenge of automated spectral line fitting in the era of ALMA-scale data by learning a deep reinforcement learning policy that maps molecular transition data and observed spectra to five LTE-fitting parameters, $\eta$, $T_{\mathrm{ex}}$, $N_{\mathrm{tot}}$, $\Delta v$, and $v_{\mathrm{offset}}$. The approach combines a transformer-based encoder for variable-length inputs with a normalizing-flow decoder, trained via policy gradients and a prioritized replay buffer, to generate high-quality initial guesses later refined by local optimizers, dramatically reducing forward-modeling runs. Evaluated on real ALMA line cubes and applied to pixel-level fitting of CH$_3$OH and several complex organic molecules, the method yields results comparable to or robustly distinct from traditional $\chi^2$-based fittings and xclass, while enabling efficient handling of large spectral cubes. The Spectuner package demonstrates practical speedups and robustness for line-rich regions, with clear paths for extension to more molecules and to infrared regimes, enhancing the scalability of ISM chemical analyses.
Abstract
Spectral lines from interstellar molecules provide crucial insights into the physical and chemical conditions of the interstellar medium. Traditional spectral line analysis relies heavily on manual intervention, which becomes impractical when handling the massive datasets produced by modern facilities like ALMA. To address this challenge, we introduce a novel deep reinforcement learning framework to automate spectral line fitting. Using observational data from ALMA, we train a neural network that maps both molecular spectroscopic data and observed spectra to physical parameters such as excitation temperature and column density. The neural network predictions can serve as initial estimates and be further refined using a local optimizer. Our method achieves consistent fitting results compared to global optimization with multiple runs, while reducing the number of forward modeling runs by an order of magnitude. We apply our method to pixel-level fitting for an observation of the G327.3-0.6 hot core and validate our results using XCLASS. We perform the fitting for CH$_3$OH, CH$_3$OCHO, CH$_3$OCH$_3$, C$_2$H$_5$CN, and C$_2$H$_3$CN. For a 100 $\times$ 100 region covering 5 GHz bandwidth, the fitting process requires 4.9 to 41.9 minutes using a desktop with 16 cores and one consumer-grade GPU card.
