GEMS improves small molecule identification using learned editing of graphs

GEMS: Molecular Structure Elucidation as Learned Search over Isomer Graphs

Artificial Intelligence

Summary

Identifying the exact structure of small molecules just from their formulas and mass measurements is very hard. The authors created GEMS, a method that starts with possible candidates and improves them step-by-step by changing bonds while keeping the overall formula correct. GEMS learns how to make these changes by training on known molecule variations and predicting important molecular features from the mass data. This method finds better matches faster than previous approaches and can also improve candidates generated by other tools.

What this means in practice

  • For pharmaceutical chemists: Identify precise small molecule structures faster from mass spectra and known candidates to accelerate drug discovery.
  • For food safety analysts: Improve identification of unknown contaminants or natural products in food using mass spectrometry data enhanced by learned molecular edits.

Authors

Utku Umur Acikalin, Yingheng Wang, Goncalo J. Gouveia, Tyler J. Schwertfeger, Frank C. Schroeder, Carla P. Gomes

Abstract

Identifying small-molecule structures from molecular formulas and tandem mass spectra remains a bottleneck in untargeted metabolomics and natural-product discovery. Even when database retrieval or de novo prediction misses the exact structure, the resulting candidates can provide starting points for exploring nearby structures through a few bond edits. We introduce GEMS (Guided Editing of Molecular Structures), which refines candidates through learned 2-switch bond edits that preserve the molecular formula and each atom's total valence. GEMS uses MIST, a pretrained spectrum-to-fingerprint model, to predict fingerprint probabilities once per spectrum. A neural policy compares each candidate's fingerprint with these predictions, links present features to the atoms and bonds that generate them, and scores all valid edits in one forward pass. The policy is trained on shortest edit paths between structures, so it can be pretrained on PubChem isomers without spectra and then fine-tuned with spectrum-predicted fingerprints. At inference, GEMS searches from multiple initial candidates matching the supplied molecular formula and ranks candidates by fingerprint agreement and multi-start consensus. With the target structure excluded from PubChem initialization, three edit rounds achieve Hit@1/Hit@10 of 29.64%/50.81% on NPLIB1 and 30.22%/41.33% on MassSpecGym, exceeding published baselines under comparable settings. On NPLIB1, GEMS achieves higher identification accuracy in about 3.3 minutes end to end, compared with 26.2 hours for our FRIGID run. GEMS also improves identification from generated candidates, including those refined by FRIGID. Experiments with exact target fingerprints identify fingerprint prediction error as a bottleneck in target recovery and final ranking. Deeper search recovers additional targets without retraining, with larger gains from weaker initial candidates.