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

Rapid Prediction of Electron–Ionization Mass Spectrometry Using Neural Networks

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

TL;DR

This paper introduces NEIMS, a fast and accurate neural network for predicting electron-ionization mass spectra (EI-MS) of small molecules. By generating synthetic spectra, NEIMS significantly expands existing spectral libraries, improving the identification of unknown compounds and overcoming a major limitation of traditional mass spectrometry.

What Problem Does This Paper Address?

Mass spectrometry is a powerful tool for identifying unknown molecules by comparing their spectra to a library of known spectra. However, this approach fails when the molecule of interest isn't present in the library. Building comprehensive libraries is challenging because acquiring experimental spectra is time-consuming and expensive, and new molecules are constantly being synthesized. Existing methods for predicting spectra are computationally intensive, taking minutes to hours per molecule, making them impractical for large-scale library augmentation. This paper addresses the need for a rapid and accurate method to generate synthetic mass spectra to enhance the coverage of spectral libraries.

Methods

The core of the NEIMS model is a neural network that directly predicts mass spectra. Unlike previous methods that predict fragmentation probabilities, NEIMS outputs the spectrum directly, leading to significant speed improvements. The model uses Extended Circular Fingerprints (ECFPs) as molecular representations, which capture local molecular subgraphs and their frequencies. These fingerprints are then fed into a multilayer perceptron (MLP).

A key innovation is the bidirectional prediction mode. Standard MLPs (forward prediction) struggle with predicting intensities for larger fragments, especially those resulting from neutral losses. The bidirectional approach combines a "forward" prediction (from low to high m/z) with a "reverse" prediction (from high to low m/z, accounting for molecular mass and fragment losses). This bidirectional output is then combined using a sigmoid-gated mechanism, which adaptively weighs the forward and reverse predictions for each m/z bin. This architecture is designed to better model the physical fragmentation process in mass spectrometry.

Datasets

The models were trained and evaluated using data from the NIST 2017 Mass Spectral Library. For training, a large set of 240,942 spectra was used. For evaluation, a subset of the NIST 2017 replicates library was employed, which contains noisier spectra of molecules also present in the main library, reflecting experimental variation.

Key Insights and Ideas

  • Direct Spectrum Prediction is Faster: Predicting the entire spectrum directly, rather than intermediate fragmentation probabilities, dramatically speeds up the process.
  • Bidirectional Prediction is Crucial: The bidirectional approach significantly improves spectral prediction accuracy, especially for larger fragments, which are critical for molecule identification. This is because it better captures the physics of fragmentation, including neutral losses.
  • ECFPs are Effective Molecular Descriptors: While not entirely novel, the use of ECFPs as input features for the neural network proves effective for capturing relevant molecular information for spectral prediction.
  • Mass Filtering Enhances Library Matching: Incorporating a mass filter during library search, which only considers molecules within a certain mass tolerance of the query, significantly improves recall performance.

Key Results

  • Speed: NEIMS predicts spectra for small molecules in an average of 5 ms per molecule, a speedup of orders of magnitude compared to previous methods.
  • Library Matching Performance: NEIMS achieves 91.7% recall@10 on an augmented library (combining NIST spectra with predicted spectra). This is comparable to or better than previous machine learning models and significantly outperforms using the NIST library alone for certain recall levels.
  • Spectral Prediction Quality: The bidirectional model shows improved spectral prediction quality, with roughly half of the molecules having a predicted similarity to overall similarity ratio greater than 0.9.
  • Comparison to CFM-EI: NEIMS performs slightly better than the CFM-EI model on library matching and is orders of magnitude faster.

Limitations and Future Work

  • Isotope Modeling: NEIMS currently does not explicitly model intensity peaks corresponding to isotopes in ion fragments. Training on higher-precision spectral data could allow for learning atom identities based on decimal m/z values.
  • Extrapolation: While the model shows some ability to extrapolate to molecules with limited structural similarity to the training set, further work is needed to examine the limitations of this extrapolation.
  • Mass Filtering Optimization: Exploring different settings for mass filtering could further improve performance.
  • Alternative Representations: Using graph-convolutional molecular representations could potentially improve predictive accuracy at a slightly higher computational cost.
  • Transfer Learning: Combining NEIMS with transfer learning could enable spectral prediction specific to individual mass spectrometry machines, further improving matching.
  • Broader Applicability: The principles behind NEIMS could likely be extended to other types of mass spectrometry beyond EI-MS.

Summary updated

BibTeX
@misc{wei2018rapid,
  author = {Jennifer N. Wei and David Benjamin Belanger and Ryan P Adams and D. Sculley},
  title = {{Rapid Prediction of Electron–Ionization Mass Spectrometry Using Neural Networks}},
  year = {2018},
  eprint = {1811.08545},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.08545},
}

Loading related content...

Figure