GLACIER: Rethinking Mass Spectrum Prediction as an Object Detection Problem
Abstract
Predicting tandem mass spectra (MS/MS) from molecular structures represents a central task in analytical chemistry with direct relevance to clinical metabolomics, systems biology, and adjacent disciplines. In this work, we revisit the problem through the lens of object detection on molecular graphs. Molecular fragmentation, a central step in MS/MS prediction, can be approximated as detecting a set of subgraphs (i.e., fragments) and their associated spectral contributions. Existing fragment-based models follow a two-stage paradigm—first generating candidate fragments and then scoring them—analogous to two-stage R-CNNs in computer vision. Towards higher accuracy and faster inference, we introduce GLACIER, a single-stage transformer-based fragment detection neural network for molecular graphs. This unified formulation eliminates the need for candidate enumeration, enabling scalable and globally consistent modeling of molecular fragmentation. GLACIER is faster and more accurate than existing state-of-the-art methods by a significant margin, achieving 62.4% and 62.1% Top-1 retrieval accuracy with and without contrastive finetuning on the MassSpecGym dataset (from 55.3%), and 55.2% and 38.2%, respectively, on the NIST'20 dataset (from 33.5%). Furthermore, GLACIER provides nearly 3-fold inference speedup over existing two-stage models.