cs.LGMar 11, 2026

When should we trust the annotation? Selective prediction for molecular structure retrieval from mass spectra

Authors: Mira Jürgens, Gaetan De Waele, Morteza Rakhshaninejad, Willem Waegeman

Organizations: Department of Data Analysis and Mathematical Modeling, Ghent University, Coupure Links 653, Ghent, 9000, Belgium. · Department of Computer Science, University of Antwerp, Middelheimlaan 1, Antwerp, 2020, Belgium.

Abstract

Machine learning methods for identifying molecular structures from tandem mass spectra (MS/MS) have advanced rapidly, yet current approaches still exhibit significant error rates. In high-stakes applications such as clinical metabolomics and environmental screening, incorrect annotations can have serious consequences, making it essential to determine when a prediction can be trusted. In this work, we introduce a selective prediction framework for molecular structure retrieval from MS/MS spectra, separating low-risk predictions automatically from lower-confidence predictions. We formulate the problem within the risk-coverage tradeoff framework and systematically evaluate uncertainty quantification strategies at three levels: input-level distance in the learned representation, fingerprint-level uncertainty over predicted molecular fingerprint bits, and retrieval-level uncertainty over candidate rankings. We compare scoring functions including first-order confidence measures, aleatoric and epistemic uncertainty estimates from second-order distributions, as well as distance-based measures in the latent space. All experiments are conducted on the MassSpecGym benchmark. Our analysis reveals that while fingerprint-level uncertainty scores are poor proxies for retrieval success, retrieval-level total uncertainty provides the overall strongest rejection criterion, and first-order confidence measures are computationally inexpensive, strong baselines. We demonstrate that by applying distribution-free risk control via generalisation bounds, practitioners can specify a tolerable error rate and obtain a subset of annotations satisfying that constraint with high probability.

Figures & tables

Appendix figures & tables13 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. GLACIER: Rethinking Mass Spectrum Prediction as an Object Detection Problem

    Jun 28, 2026Rui-Xi Wang, Runzhong Wang, Connor W. ColeyMass Spectrometry

  2. MS-GPT: Rethinking MS/MS De Novo Structure Elucidation as Spectrum-Induced Posterior Querying of a Molecule-Language Model

    Jul 26, 2026Xin Zhao, Yumin Liu, Zhuo Li +5Language ModelingMolecular Generation

  3. FlexMS: A Unified Public Benchmark for Molecule Tandem Mass Spectrum Prediction

    Feb 26, 2026Yunhua Zhong, Yixuan Tang, Yifan Li +5Benchmark DesignMass Spectrometry