# DiffMS: Diffusion Generation of Molecules Conditioned on Mass Spectra

arXiv: https://arxiv.org/abs/2502.09571 · HTML: https://mlsanity.com/paper/2502.09571/

## Key facts

- Cited by 32 papers in the map (data through 14 Oct 2026).
- Builds on 33 of its 67 references that are in the map.
- First posted on arXiv 13 Feb 2025.

## Builds on (most cited first, 30 of 33)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Denoising Diffusion Probabilistic Models](https://mlsanity.com/paper/2006.11239/) (2020)
- [Score-Based Generative Modeling through Stochastic Differential Equations](https://mlsanity.com/paper/2011.13456/) (2020)
- [Diffusion Models Beat GANs on Image Synthesis](https://mlsanity.com/paper/2105.05233/) (2021)
- [Deep Unsupervised Learning using Nonequilibrium Thermodynamics](https://mlsanity.com/paper/1503.03585/) (2015)
- [Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding](https://mlsanity.com/paper/2205.11487/) (2022)
- [Classifier-Free Diffusion Guidance](https://mlsanity.com/paper/2207.12598/) (2022)
- [SGDR: Stochastic Gradient Descent with Warm Restarts](https://mlsanity.com/paper/1608.03983/) (2016)
- [Improved Denoising Diffusion Probabilistic Models](https://mlsanity.com/paper/2102.09672/) (2021)
- [Elucidating the Design Space of Diffusion-Based Generative Models](https://mlsanity.com/paper/2206.00364/) (2022)
- [Structured Denoising Diffusion Models in Discrete State-Spaces](https://mlsanity.com/paper/2107.03006/) (2021)
- [Diffusion-LM Improves Controllable Text Generation](https://mlsanity.com/paper/2205.14217/) (2022)
- [On the Variance of the Adaptive Learning Rate and Beyond](https://mlsanity.com/paper/1908.03265/) (2019)
- [Automatic chemical design using a data-driven continuous representation of molecules](https://mlsanity.com/paper/1610.02415/) (2016)
- [Discrete Diffusion Modeling by Estimating the Ratios of the Data Distribution](https://mlsanity.com/paper/2310.16834/) (2023)
- [DiGress: Discrete Denoising diffusion for graph generation](https://mlsanity.com/paper/2209.14734/) (2022)
- [GraphVAE: Towards Generation of Small Graphs Using Variational Autoencoders](https://mlsanity.com/paper/1802.03480/) (2018)
- [DiffDock: Diffusion Steps, Twists, and Turns for Molecular Docking](https://mlsanity.com/paper/2210.01776/) (2022)
- [Molecular Sets (MOSES): A Benchmarking Platform for Molecular Generation Models](https://mlsanity.com/paper/1811.12823/) (2018)
- [Learning Deep Generative Models of Graphs](https://mlsanity.com/paper/1803.03324/) (2018)
- [Constrained Graph Variational Autoencoders for Molecule Design](https://mlsanity.com/paper/1805.09076/) (2018)
- [A 3D Generative Model for Structure-Based Drug Design](https://mlsanity.com/paper/2203.10446/) (2022)
- [Artificial Intelligence for Science in Quantum, Atomistic, and Continuum Systems](https://mlsanity.com/paper/2307.08423/) (2023)
- [Generating 3D Molecules for Target Protein Binding](https://mlsanity.com/paper/2204.09410/) (2022)
- [Efficient and Degree-Guided Graph Generation via Discrete Diffusion Modeling](https://mlsanity.com/paper/2305.04111/) (2023)
- [Equivariant Shape-Conditioned Generation of 3D Molecules for Ligand-Based Drug Design](https://mlsanity.com/paper/2210.04893/) (2022)
- [Prefix-Tree Decoding for Predicting Mass Spectra from Molecules](https://mlsanity.com/paper/2303.06470/) (2023)
- [MADGEN: Mass-Spec attends to De Novo Molecular generation](https://mlsanity.com/paper/2501.01950/) (2025)
- [Efficiently predicting high resolution mass spectra with graph neural networks](https://mlsanity.com/paper/2301.11419/) (2023)
- [Scalable Fragment-Based 3D Molecular Design with Reinforcement Learning](https://mlsanity.com/paper/2202.00658/) (2022)

## Built on by (most cited first, 30 of 32)

- [MS-BART: Unified Modeling of Mass Spectra and Molecules for Structure Elucidation](https://mlsanity.com/paper/2510.20615/) (2025)
- [DiffSpectra: Molecular Structure Elucidation from Spectra using Diffusion Models](https://mlsanity.com/paper/2507.06853/) (2025)
- [Test-Time Tuned Language Models Enable End-to-end De Novo Molecular Structure Generation from MS/MS Spectra](https://mlsanity.com/paper/2510.23746/) (2025)
- [Small molecule retrieval from tandem mass spectrometry: what are we optimizing for?](https://mlsanity.com/paper/2602.16507/) (2026)
- [FRIGID: Scaling Diffusion-Based Molecular Generation from Mass Spectra at Training and Inference Time](https://mlsanity.com/paper/2604.16648/) (2026)
- [SpectraLLM: Uncovering the Ability of LLMs for Molecular Structure Elucidation from Multi-Spectral Data](https://mlsanity.com/paper/2508.08441/) (2025)
- [Comparative Analysis of Formula and Structure Prediction from Tandem Mass Spectra](https://mlsanity.com/paper/2601.00941/) (2026)
- [De Novo Molecular Generation from Mass Spectra via Many-Body Enhanced Diffusion](https://mlsanity.com/paper/2602.01643/) (2026)
- [MassSpecGym in the Wild: Uncovering and Correcting Evaluation Pitfalls in AI-Driven Molecule Discovery](https://mlsanity.com/paper/2606.19624/) (2026)
- [One Small Step with Fingerprints, One Giant Leap for De Novo Molecule Generation from Mass Spectra](https://mlsanity.com/paper/2508.04180/) (2025)
- [FlowMS: Flow Matching for De Novo Structure Elucidation from Mass Spectra](https://mlsanity.com/paper/2603.18397/) (2026)
- [SpecMol: A Spectroscopy-Grounded Foundation Model for Multi-Task Molecular Learning](https://mlsanity.com/paper/2509.21861/) (2025)
- [NMIRacle: Multi-modal Generative Molecular Elucidation from IR and NMR Spectra](https://mlsanity.com/paper/2512.19733/) (2025)
- [SpecBridge: Bridging Mass Spectrometry and Molecular Representations via Cross-Modal Alignment](https://mlsanity.com/paper/2601.17204/) (2026)
- [De novo molecular structure elucidation from mass spectra via flow matching](https://mlsanity.com/paper/2602.19912/) (2026)
- [MSAlign: Aligning Molecule and Mass Spectra representations for Metabolite Identification](https://mlsanity.com/paper/2605.19752/) (2026)
- [MAST: Motif-Augmented Diffusion with Search Tree for Spectroscopic Molecular Structure Elucidation](https://mlsanity.com/paper/2610.12067/) (2026)
- [A collaborative constrained graph diffusion model for the generation of realistic synthetic molecules](https://mlsanity.com/paper/2505.16365/) (2025)
- [How well can off-the-shelf LLMs elucidate molecular structures from mass spectra using chain-of-thought reasoning?](https://mlsanity.com/paper/2601.06289/) (2026)
- [Latent Diffusion-Based 3D Molecular Recovery from Vibrational Spectra](https://mlsanity.com/paper/2603.06113/) (2026)
- [When should we trust the annotation? Selective prediction for molecular structure retrieval from mass spectra](https://mlsanity.com/paper/2603.10950/) (2026)
- [Unlocking High-Fidelity Molecular Generation from Mass Spectra via Dual-Stream Line Graph Diffusion](https://mlsanity.com/paper/2605.07048/) (2026)
- [CoRe-Gen: Robust Spectrum-to-Structure Generation under Imperfect Fingerprint Conditions](https://mlsanity.com/paper/2605.12980/) (2026)
- [Uncertainty-Calibrated Diffusion for Reliable 3D Molecular Graph Generation](https://mlsanity.com/paper/2606.01595/) (2026)
- [MARLIN: De Novo Molecular Structure Elucidation from Tandem Mass Spectra without a Ground-Truth Formula](https://mlsanity.com/paper/2607.04774/) (2026)
- [NMR Elucidation as an Agentic Search Problem, Not a Modeling Problem](https://mlsanity.com/paper/2607.19406/) (2026)
- [MS-GPT: Rethinking MS/MS De Novo Structure Elucidation as Spectrum-Induced Posterior Querying of a Molecule-Language Model](https://mlsanity.com/paper/2607.23607/) (2026)
- [MM-Spectrum: Multimodal Multi-spectral Molecular Structural Elucidation with a Stable MoE Framework](https://mlsanity.com/paper/2608.27286/) (2026)
- [S3C-LLM: Skill-Code Guided Agentic Language Models for Spectrum-to-Structure Elucidation](https://mlsanity.com/paper/2608.30910/) (2026)
- [Explainable Molecular Structure Inference from GC--MS with Diffusion Models and LLM Reranking](https://mlsanity.com/paper/2610.03066/) (2026)

## Abstract (arXiv)

Mass spectrometry plays a fundamental role in elucidating the structures of unknown molecules and subsequent scientific discoveries. One formulation of the structure elucidation task is the conditional de novo generation of molecular structure given a mass spectrum. Toward a more accurate and efficient scientific discovery pipeline for small molecules, we present DiffMS, a formula-restricted encoder-decoder generative network that achieves state-of-the-art performance on this task. The encoder utilizes a transformer architecture and models mass spectra domain knowledge such as peak formulae and neutral losses, and the decoder is a discrete graph diffusion model restricted by the heavy-atom composition of a known chemical formula. To develop a robust decoder that bridges latent embeddings and molecular structures, we pretrain the diffusion decoder with fingerprint-structure pairs, which are available in virtually infinite quantities, compared to structure-spectrum pairs that number in the tens of thousands. Extensive experiments on established benchmarks show that DiffMS outperforms existing models on de novo molecule generation. We provide several ablations to demonstrate the effectiveness of our diffusion and pretraining approaches and show consistent performance scaling with increasing pretraining dataset size. DiffMS code is publicly available at https://github.com/coleygroup/DiffMS.
