Instrument-agnostic Machine Learning Framework for Accurate Prediction of Functional Groups from Tandem Mass Spectrometry

25 September 2025, Version 1
This content is an early or alternative research output and has not been peer-reviewed by Cambridge University Press at the time of posting.

Abstract

Structural elucidation of unknown compounds using tandem mass spectrometry (MS/MS) is an ongoing challenge. Expert chemists will often use common product ion peaks and neutral losses or peak matching software to predict structural aspects from MS/MS spectra, a process which is time consuming and limited by the molecular entries in the database. We introduce an instrument-agnostic machine learning (ML) framework that predicts functional groups directly from MS/MS spectra, eliminating the need for conventional database searches. The ML models are trained on data from different sources, the Mass Bank of North America (MoNA), a public database, and a custom MS/MS data-base acquired using a single high throughput desorption electrospray ionization (DESI) MS/MS platform to showcase transferability of model predictions independent of instrument acquisition. Additionally, a novel spectral representa-tion is developed for ML use by standardizing the spectra to the precursor ion m/z. We utilized molecular metrics, specifically, average molecular F1 score of 87% (MoNA) and 76% (DESI) and average molecular accuracy of 94% (MoNA) and 87% (DESI), indicating similar model performance when trained on different databases to validate the ML framework. To further illustrate the robustness and transferability of our ML framework, models trained on DESI-generated data successfully predicted functional groups, using spectral data from blind test set of molecules that were generated by two different company laboratories using distinct mass spectrometry instruments (Orbitrap and TOF) operated in positive-ion mode electrospray ionization. We believe that such an approach, where models trained on data from one instrument can reliably make accurate predictions on spectra acquired using different instruments in a database-free manner, will significantly expand the practical applications of ML to mass spectrometry.

Keywords

Functional group prediction
Neural networks
Untargeted metabolomics
High-Throughput Screening
Tandem mass spectrometry
Machine learning
Instrument-agnostic analysis

Supplementary materials

Title
Description
Actions
Title
Supporting Information
Description
Supporting Information is available and includes detailed functional group definitions, spectral preprocessing methods, model architectures and training protocols, benchmarking results, blind test set performance, and extended figures and tables providing precision, recall, F1 scores, and example predictions.
Actions

Comments

Comments are not moderated before they are posted, but they can be removed by the site moderators if they are found to be in contravention of our Commenting and Discussion Policy [opens in a new tab] - please read this policy before you post. Comments should be used for scholarly discussion of the content in question. You can find more information about how to use the commenting feature here [opens in a new tab] .
This site is protected by reCAPTCHA and the Google Privacy Policy [opens in a new tab] and Terms of Service [opens in a new tab] apply.