MolSpecFlow: Mass-Constrained Hybrid Flow Matching for Joint Molecular-Spectral Analysis
Preprint
Abstract
Identifying the “dark matter” of the chemical universe requires bridging the fundamental gap between molecules and mass spectra. Existing approaches struggle to accurately map between these distinct data formats, often yielding results that are either chemically implausible or inconsistent with the physical evidence. We introduce MolSpecFlow, a unified foundation model pretrained on 100 million molecules and 42 million spectra, which leverages a hybrid flow matching framework to orchestrate optimal transport paths for spectral peaks and discrete probability flows for molecular tokens. Furthermore, to guarantee the physicochemical validity of the generated structures, we incorporate explicit rule-based constraints into the generative process, utilizing a token-level mass control mechanism that strictly enforces alignment with the precursor molecular weight. MolSpecFlow establishes a new state-of-the-art on the MassSpecGym benchmark, surpassing diffusion and retrieval baselines in de novo generation (Top-1 accuracy +35%), spectral simulation, and molecular retrieval, demonstrating the power of physics-grounded unified modeling.Keywords
This publication has 42 references indexed in Scilit:
- Machine Learning Models for Predicting Molecular UV–Vis Spectra with Quantum Mechanical PropertiesJournal of Chemical Information and Modeling, 2023
- Graph Neural Networks for Learning Molecular Excitation SpectraJournal of Chemical Theory and Computation, 2022
- CFM-ID 4.0: More Accurate ESI-MS/MS Spectral Prediction and Compound IdentificationAnalytical Chemistry, 2021
- ZINC20—A Free Ultralarge-Scale Chemical Database for Ligand DiscoveryJournal of Chemical Information and Modeling, 2020
- Empowering Clinical Diagnostics with Mass SpectrometryACS Omega, 2020
- Sharing and community curation of mass spectrometry data with Global Natural Products Social Molecular NetworkingNature Biotechnology, 2016
- Using fragmentation trees and mass spectral trees for identifying unknown compounds in metabolomicsTrAC Trends in Analytical Chemistry, 2015
- Competitive fragmentation modeling of ESI-MS/MS spectra for putative metabolite identificationMetabolomics, 2014
- Mass spectrometry‐based metabolomicsMass Spectrometry Reviews, 2006
- SMILES, a chemical language and information system. 1. Introduction to methodology and encoding rulesJournal of Chemical Information and Computer Sciences, 1988