arXiv:2610.40264cs.LGOct 2026

Manuscript Offprint

arXiv:2610.40264

From MS/MS evidence to adaptive spectroscopic characterization: Reinforcement learning guided by candidate molecular structures

Bowen Gao, Lei Zhu, Yiying Wang, Wenjie Yu

Abstract

Small-molecule identification from tandem mass spectrometry (MS/MS) may require complementary measurements to distinguish competing structures, but acquiring every available spectrum increases experimental demands. Herein, we propose a structure-informed deep Q-network (SI-DQN) that uses existing MS/MS evidence to decide whether further characterization is needed, which measurement to request, and when to stop. The policy combines spectral representations and candidate rankings with score-weighted descriptors of the candidates' chemical features and structural differences. The policy was evaluated on 79,462 held-out samples with simulated MS/MS, infrared (IR), and nuclear magnetic resonance (NMR) spectra from the Multimodal Spectroscopic Dataset. Evaluation used fixed hard candidate sets containing the correct structure and equal normalized acquisition costs. Averaged across three training runs, SI-DQN increased Top-1 accuracy from 80.10% to 93.78% for positive-ion MS/MS starts and from 70.44% to 93.31% for negative-ion starts. The corresponding mean additional measurement counts were only 0.227 and 0.340 per sample, respectively. Complete acquisition achieved 97.72% accuracy with four additions, whereas SI-DQN reduced the additional measurement count by 94.3% and 91.5%. Relative to a rule-based policy, SI-DQN reduced the composite loss combining terminal ranking error and acquisition cost by 19.3% and 25.5%. Adding structural information to DQN further improved accuracy while reducing requests across all three training runs. At comparable ranking uncertainty, SI-DQN increased request rates relative to DQN more strongly in groups with high structural disagreement, where larger reductions in composite loss were also observed. Together, these results support using the ambiguity among candidate structures after MS/MS analysis to guide further characterization, providing a quantitative basis for balancing identification performance against subsequent measurement effort.

Keywords: Tandem mass spectrometry, Reinforcement learning, Small-molecule identification, Multimodal spectroscopy, Molecular descriptors, Adaptive acquisition

1. Introduction

Liquid chromatography–tandem mass spectrometry (LC–MS/MS) is widely adopted for small-molecule identification, as the fragment-ion patterns in MS/MS spectra provide rich information on molecular substructures and backbone connectivity [1–3]. However, practical structure identification often requires additional complementary spectroscopic measurements [4–9]. For instance, infrared (IR) and nuclear magnetic resonance (NMR) can help distinguish

*Corresponding author.

Email addresses: gaobowend@gmail.com (Bowen Gao), leizhu@mail.sim.ac.cn (Lei Zhu), yywang@mail.sim.ac.cn (Yiying Wang), casan@mail.sim.ac.cn (Wenjie Yu) candidate structures through information about functional groups and local chemical environments [10, 11]. These additional measurements also require time and labor, increasing the demands on laboratory resources [12, 13]. Therefore, once an MS/MS result is available, researchers must decide whether further characterization is needed and, if so, which measurement would provide the most useful additional information.

Reinforcement learning, combined with deep neural networks, offers a way to make these decisions using the evidence already available [14, 15]. In particular, value-based methods (e.g., Q-learning) estimate how each choice affects the eventual identification result and the total acquisition cost [16, 17]. These estimates can therefore guide a sequence of spectroscopic measurements, with each new result informing whether to continue characterization or stop. Recent studies have used reinforcement learning to optimize data acquisition within individual characterization techniques. For example, Schloz et al. used deep reinforcement learning to optimize scan positions within electron ptychography, improving the structural similarity index by up to 15.8% over sparse-grid scanning at the same measurement budget [18]. Liu et al. combined ensemble deep kernel learning with a reinforcement learning policy to select predictive image channels and guide local spectroscopy within piezoresponse force microscopy. For polarization–voltage loop-area prediction in BiFeO3BiFeO_{3}, the amplitude-channel reward stabilized at 0.5–0.6 after approximately 50 exploration steps [19]. Tang et al. used a deep Q-network to select successive spectral bands within stimulated Raman scattering imaging. This approach achieved an average accuracy of 94.50% for polymer segmentation at a 50% band budget without characteristic-band priors, compared with 70.96% for random sampling [20]. Reinforcement learning has also been used to infer molecular structures from 13C{}^{13}C NMR spectra or combined IR and 13C{}^{13}C NMR spectra through sequential molecular construction [21, 22]. These studies focused on optimizing data acquisition within individual characterization techniques or inferring molecular structures from available spectra, but did not address how to select the next complementary characterization modality. More importantly, for small-molecule identification beginning with MS/MS, a further challenge is to connect the chemical differences among competing candidates to the choice of complementary spectroscopic measurements and the decision to stop, while balancing ranking performance against acquisition cost. Ranking scores summarize relative support for candidates but do not explicitly describe the functional-group or local chemical-environment differences that distinguish them. Incorporating these differences into the decision state could help direct further measurements toward the remaining structural ambiguity.

Herein, we propose a structure-informed deep Q-network (SI-DQN), which combines value-based reinforcement learning with chemical domain knowledge to select spectroscopic measurements adaptively. Starting from MS/MS, the model dynamically decides whether to request additional IR, 1{}^{1}H NMR, or 13{}^{13}C NMR measurements, or to stop immediately and report the identification result. The model uses the available spectral evidence, the current candidate ranking, and the structural differences among competing candidates to make these decisions. When another measurement is selected, the resulting evidence and updated candidate ranking continue to guide the next decision. By relating the structural differences among candidate molecules to the potential value of another measurement, the approach uses existing spectra to guide further characterization while balancing identification performance against acquisition cost.

References (27)