cs.LGOct 29, 2026

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

Authors: Bowen Gao, Lei Zhu, Yiying Wang, Wenjie Yu

Organizations: State Key Laboratory of Materials for Integrated Circuits, Shanghai Institute of Microsystem and Information Technology, Chinese Academy of Sciences, Shanghai 200050, China · University of Chinese Academy of Sciences, Beijing 100049, China

Abstract

Small-molecule identification from tandem mass spectrometry (MS/MS) may require complementary measurements. 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.

Figures & tables

Explore similar work

Sep 13, 2026

Robust small-molecule identification from incomplete, degraded, and inconsistent spectra using multimodal mixed-condition training

Reliable small-molecule identification often requires complementary evidence from multiple spectroscopic measurements. In practice, however, spectra may be unavailable, degraded by measurement-related variations, or even incorrectly associated with a sample, thereby hindering accurate molecular identification. Herein, we propose a multimodal mixed-condition training strategy that accommodates missing, degraded, and mismatched measurements for small-molecule structure identification. The strategy incorporates chemical and spectroscopic knowledge through predefined missing-input configurations, modality-specific spectral perturbations, and chemically informed spectrum replacements. Models were trained on 635,441 samples comprising mass spectrometry (MS), infrared (IR), and nuclear magnetic resonance (NMR) simulated spectra from the Multimodal Spectroscopic Dataset (MSSD). They were then systematically evaluated on 79,462 held-out samples across 30 views designed to represent variations in spectra. A controlled comparison of complete-input and mixed-condition training under concatenation and mixture-of-experts (MoE) fusion showed that the training strategy was the principal source of improvement. For MoE, mixed-condition training increased the mean reciprocal rank (MRR) by 6.08% (from 0.9203 to 0.9763) and the top-1 molecular identification rate by 7.67% (from 89.50% to 96.36%). Notably, under single-modality inputs, IR MRR increased 2.15-fold (from 0.4337 to 0.9307), while MS MRR increased 2.31-fold (from 0.3711 to 0.8575). With the proposed strategy, complete-input performance remained high, while sample-level mismatch detection also improved. Together, these results highlight the potential of multimodal mixed-condition training for practical molecular identification by explicitly addressing incomplete, degraded, and mismatched measurements encountered in real-world analysis.
Jul 26, 2026

MS-GPT: Rethinking MS/MS De Novo Structure Elucidation as Spectrum-Induced Posterior Querying of a Molecule-Language Model

Molecular structure elucidation from tandem mass spectra (MS/MS) is a central inverse problem in analytical chemistry. Most existing approaches to MS/MS identification remain tied to reference libraries or predefined candidate sets, whereas de novo methods aim to generate structures directly from spectra. A common de novo route predicts a molecular fingerprint from the spectrum and then decodes structures from it, enabling decoder pretraining on large molecule-only corpora. However, this paradigm creates a training-inference mismatch: the decoder is trained on oracle fingerprints computed from molecules, but at inference it is queried with a noisy spectrum-induced fingerprint posterior that is typically collapsed to a single thresholded fingerprint. We introduce MS-GPT, which recasts fingerprint-mediated de novo elucidation as spectrum-induced posterior querying of a conditional molecule-language model. MS-GPT conditions a molecule-language model on fingerprints and formulas, then converts the spectrum-induced posterior into a band of fingerprint queries near the oracle-fingerprint manifold through active-bit density calibration. Candidates sampled across this band are pooled and ranked by generation-frequency consensus. A lightweight LoRA adapter further mitigates domain-specific posterior bias while preserving the pretrained molecular prior. On NPLIB1 and MassSpecGym, MS-GPT sets a new state of the art, reaching Top-1/Top-10 exact-match accuracy of 29.8%/41.1% and 23.9%/28.7%, respectively. Candidate-pool scaling shows that efficient autoregressive molecular generation continues to improve recall with a little additional inference cost. The source code and model checkpoints are available at https://github.com/VIKI623/MS-GPT.
Oct 8, 2026

MAST: Motif-Augmented Diffusion with Search Tree for Spectroscopic Molecular Structure Elucidation

Elucidating molecular structures from spectra is a foundational problem in chemical and materials characterization, yet remains challenging due to spectral ambiguity and the vast molecular space. Although recent diffusion-based generators show strong promise for spectra-conditioned elucidation, existing methods struggle to learn robust spectra-structure relationships from limited paired data when relying solely on global spectral representation. Moreover, the repeated full sampling inference strategy incurs substantial computation overhead. To address these limitations, we propose MAST, a Motif-Augmented diffusion framework with Search Tree, for joint 2D-3D spectroscopic molecular structure elucidation. MAST introduces explicit, interpretable motif priors as intermediate evidences throughout denoising, reducing conditional ambiguity and facilitating spectra-conditioned optimization. We further cast diffusion sampling as reward-guided tree search to prioritize high-reward denoising trajectories, yielding a compact set of spectra-consistent candidates under limited budgets. On the QM9S multi-spectra benchmark, MAST achieves 94.89% exact recovery and improves 3D fidelity, while preserving high chemical validity and stability. Code is available at https://github.com/Jia040223/MAST.