Table of Contents
Fetching ...

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.

Spectuner-D1: Spectral Line Fitting of Interstellar Molecules Using Deep Reinforcement Learning

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, , , , , and . 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 CHOH and several complex organic molecules, the method yields results comparable to or robustly distinct from traditional -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 CHOH, CHOCHO, CHOCH, CHCN, and CHCN. For a 100 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.

Paper Structure

This paper contains 23 sections, 6 equations, 8 figures, 5 tables.

Figures (8)

  • Figure 1: Architecture of the proposed neural network introduced in Section \ref{['sec:architecture']}. Here, FC stands for the fully connected layer, MLP stands for the multi-layer perceptron, and SwiGLU stands for the SwiGLU activation function 2020arXiv200205202S.
  • Figure 2: Pixel binning for G327-band6-1.9as. Different colors correspond to pixels in different bins. This binning is used for data sampling, as described in Section \ref{['sec:sampling']}.
  • Figure 3: Relation between the mean relative loss and the number of forward modeling runs using different fitting methods. Each dot shows the average metric over all datasets, and the error bars represent the standard deviation over the datasets. The mean relative loss is defined in Section \ref{['sec:metric']}. The datasets are described in Section \ref{['sec:data']} and summarized in Table \ref{['tab:cubes']}. Blue dots correspond to results based on traditional optimization methods. Nelder-Mead and SLSQP are classical local optimizers, whereas particle swarm optimization (PSO) is a global optimization algorithm. Red dots show results where a neural network generates the initial guess for the local optimizers. For the methods based on local optimization, the initial guess is given by the best parameters from $N_\text{init} = 50$ sampled points. The methods to produce these results are introduced in Sections \ref{['sec:inference']} and \ref{['sec:baseline']}.
  • Figure 4: Relation between the mean relative loss and the number of forward modeling runs with different number of initial points generated by the neural network. For each method, from left to right, the dots show the average metric over all datasets with $N_\text{init}=10, 25, 50, 100$. The error bars represent the standard deviation over the datasets. The mean relative loss is defined in Section \ref{['sec:metric']}. The datasets are described in Section \ref{['sec:data']} and summarized in Table \ref{['tab:cubes']}.
  • Figure 5: Mean relative loss of neural network-based methods across individual datasets. For each dataset, we present the results from using the neural network alone and from combining the neural network with the SLSQP optimization algorithm. The results are divided into two sets based on the species for fitting, i.e. Mol-1980 and Mol-2010 as described in Section \ref{['sec:species']}. While Mol-1980 is used for training, Mol-2010 is reserved for testing. The mean relative loss metric is defined in Section \ref{['sec:metric']}, and the inference method is introduced in Section \ref{['sec:inference']}.
  • ...and 3 more figures