AI Navigate

FlowMS: Flow Matching for De Novo Structure Elucidation from Mass Spectra

arXiv cs.LG / 3/20/2026

📰 NewsModels & Research

Key Points

  • FlowMS is introduced as the first discrete flow matching framework for spectrum-conditioned de novo molecular generation.
  • It performs iterative refinement in probability space while enforcing chemical formula constraints and uses spectral embeddings from a pretrained formula transformer encoder.
  • It achieves state-of-the-art performance on 5 of 6 metrics on the NPLIB1 benchmark, including 9.15% top-1 accuracy (9.7% relative improvement over DiffMS) and 7.96 top-10 MCES (4.2% improvement over MS-BART).
  • Visual analyses show the generated molecules are structurally plausible and closely resemble ground truth structures.
  • The work positions discrete flow matching as a promising paradigm for MS-based structure elucidation in metabolomics and natural product discovery, addressing the computational demands of diffusion-based approaches.

Abstract

Mass spectrometry (MS) stands as a cornerstone analytical technique for molecular identification, yet de novo structure elucidation from spectra remains challenging due to the combinatorial complexity of chemical space and the inherent ambiguity of spectral fragmentation patterns. Recent deep learning approaches, including autoregressive sequence models, scaffold-based methods, and graph diffusion models, have made progress. However, diffusion-based generation for this task remains computationally demanding. Meanwhile, discrete flow matching, which has shown strong performance for graph generation, has not yet been explored for spectrum-conditioned structure elucidation. In this work, we introduce FlowMS, the first discrete flow matching framework for spectrum-conditioned de novo molecular generation. FlowMS generates molecular graphs through iterative refinement in probability space, enforcing chemical formula constraints while conditioning on spectral embeddings from a pretrained formula transformer encoder. Notably, it achieves state-of-the-art performance on 5 out of 6 metrics on the NPLIB1 benchmark: 9.15% top-1 accuracy (9.7% relative improvement over DiffMS) and 7.96 top-10 MCES (4.2% improvement over MS-BART). We also visualize the generated molecules, which further demonstrate that FlowMS produces structurally plausible candidates closely resembling ground truth structures. These results establish discrete flow matching as a promising paradigm for mass spectrometry-based structure elucidation in metabolomics and natural product discovery.