NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Predicting Electron-Ionization Mass Spectrometry using Neural Networks

Jennifer N. Wei, David Belanger, Ryan P. Adams, D. Sculley

Abstract: When confronted with a substance of unknown identity, researchers often perform mass spectrometry on the sample and compare the observed spectrum to a library of previously-collected spectra to identify the molecule. While popular, this approach will fail to identify molecules that are not in the existing library. In response, we propose to improve the library's coverage by augmenting it with synthetic spectra that are predicted using machine learning. We contribute a lightweight neural network model that quickly predicts mass spectra for small molecules. Achieving high accuracy predictions requires a novel neural network architecture that is designed to capture typical fragmentation patterns from electron ionization. We analyze the effects of our modeling innovations on library matching performance and compare our models to prior machine learning-based work on spectrum prediction.

Introduction: The Coverage Problem in Mass Spectrometry

Identifying unknown molecules is a cornerstone of chemistry, forensics, and drug discovery. The standard approach is Mass Spectrometry (MS), where a molecule is shattered into fragments and the resulting "fingerprint" (a mass spectrum) is compared against a library of known molecules.

However, researchers face a massive coverage problem. Existing libraries like NIST contain only hundreds of thousands of spectra, while the space of potential small molecules is nearly infinite. If a researcher finds a molecule not in the library, the search fails. Previous attempts to solve this using Quantum Mechanics (QM) or stochastic machine learning were computationally expensive, often taking minutes or days to predict a single spectrum.

Library matching workflow: (a) standard search against a limited library; (b) search against an augmented library containing predicted spectra.

Methods: Neural Electron Ionization Mass Spectrometry (NEIMS)

The authors developed NEIMS, a deep learning model that predicts mass spectra from molecular structures in milliseconds. The model treats spectrum prediction as a multidimensional regression task, taking a molecular structure as input and outputting a vector representing the intensity of fragments at every mass-to-charge ($m/z$) bin.

  • Input Representation: Molecules are converted into Extended Circular Fingerprints (ECFPs)—fixed-length vectors that capture local atomic neighborhoods.
  • Architecture: A deep Multilayer Perceptron (MLP) with seven layers and residual connections.
  • Bidirectional Prediction: Standard models struggle with "high-mass" peaks. NEIMS introduces a reverse prediction mode that calculates intensities based on what is lost from the total mass ($M - \text{fragment}$), rather than just what is formed. A sigmoid gate learns to combine these forward and reverse views, capturing the physical reality of neutral losses.

Key Results: Speed and Accuracy

NEIMS was evaluated using the NIST 2017 library, the industry gold standard.

  • Accuracy: NEIMS achieved a 91.7% recall@10 accuracy. This means that for nearly 92% of queries, the correct molecule was among the top 10 matches in an augmented library.
  • Speed: The model averages 0.47 ms per molecule. Researchers can generate spectra for 1 million molecules in just 90 minutes on a standard CPU—a task that would take years using previous methods.
  • Superiority: Compared to the previous state-of-the-art (CFM-EI), NEIMS was both more accurate (54.3% vs 42.6% recall@1) and orders of magnitude faster.

Limitations and Future Work

While a significant step forward, the current model does not explicitly account for isotopic patterns (like Carbon-13), which provide valuable clues to chemists. Additionally, while ECFPs are efficient, the authors suggest that Graph Convolutional Networks (GCNs) might better capture 3D molecular geometry. Finally, the use of transfer learning could help fine-tune NEIMS for specific instruments and laboratory conditions to improve local matching performance.

Summary updated

BibTeX
@misc{wei2018predicting,
  author = {Jennifer N. Wei and David Belanger and Ryan P. Adams and D. Sculley},
  title = {{Predicting Electron-Ionization Mass Spectrometry using Neural Networks}},
  year = {2018},
  eprint = {1811.08545},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.08545},
}
Figure