Aligning Mass Spectrometry with Molecular Representations for Guiding de novo Structure Prediction
Abstract
Interpreting mass spectrometry (MS) data is challenging because reconstructing molecular structures from fragment patterns is an inherently ambiguous task, even for experienced analysts. Recent advances in MS instrumentation and acquisition protocols have created new opportunities for data-driven structural elucidation by leveraging large amounts of experimental spectra. This work presents DeniMS, a deep learning framework for a de novo generation of molecular structures from tandem mass spectrometry (MS/MS) data. We use a contrastive learning strategy to train a model to produce a joint representation that aligns spectra with their corresponding molecular graphs, resulting in embeddings that organize MS data in a chemically meaningful manner. These MS embeddings then guide a discrete graph diffusion model to predict molecular structures directly from spectra. Rather than returning a single answer, the model produces a ranked list of plausible structures, which better reflects practical MS/MS analysis, where isomers and closely related compounds can yield similar spectra. The framework can also integrate multiple spectra per molecule, improving robustness by pooling complementary evidence across measurements. We train and evaluate the method on the open FragHub dataset and release the code and pretrained models at https://github.com/Milo-group/DeniMS.
Fields of Study & Subjects
Mass Spectrometry Techniques and Applications
Computational Drug Discovery Methods
Metabolomics and Mass Spectrometry Studies
Publication details
- Journal / source
- ChemRxiv
- Publication date
- 16 February 2026
- Language
- EN
- Document type
- Preprint