Direct molecular formula prediction from tandem mass spectra with a multi-task-trained encoder and deterministic stoichiometric correction

Molecular formula assignment is the first step of metabolite identification from tandem mass spectra, yet deep-learning methods have repeatedly underperformed classical enumeration, reaching usable accuracy only through candidate generation and learned reranking. Here we present MStoic, a mass spectrum encoder that predicts molecular formulas directly and finalizes them with a deterministic, zero-parameter stoichiometric correction that selects a mass-consistent formula against the precursor mass (20 ppm; falling back to the closest-mass candidate when none qualifies). Every peak is embedded by soft Gaussian binning of log(m/z), Fourier features, pairwise-difference embeddings and an intensity embedding, and the encoder is trained with chemically grounded auxiliary tasks, including fragment-level supervision from computational fragmentation trees. On the multi-source Spectraverse benchmark (48,622 held-out spectra) MStoic achieves 77.8% top-1 exact-match accuracy, and 79.6% on the CASMI-2022 challenge, matching or exceeding specialized deep-learning, candidate-ranking, and rule-based baselines on every benchmark evaluated. Applying the same correction to a competing model shows that mass-based correction is a portable physical prior that amplifies rather than substitutes model capability. Factorial ablation shows that the hybrid encoding is selectively beneficial for rare-element-bearing formulas with information-dense spectra. And imposing mass conservation as a soft training loss reduces direct accuracy more than seven-fold, indicating that physical constraints in discrete chemical spaces belong in hard post-processing rather than in the training objective.

Authors

Institutions

Publication Details

Journal
ChemRxiv
Published
2026-10-27
DOI
https://doi.org/10.26434/chemrxiv.15011102/v1
Primary Topic
Metabolomics and Mass Spectrometry Studies
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Direct molecular formula prediction from tandem mass spectra with a multi-task-trained encoder and deterministic stoichiometric correction

Zhenlin Dong, Ming Yu Gao, Shang Zhang
1 links
ChemRxiv
Metabolomics and Mass Spectrometry Studies
preprint

Direct molecular formula prediction from tandem mass spectra with a multi-task-trained encoder and deterministic stoichiometric correction

Zhenlin Dong, Ming Yu Gao, Shang Zhang
preprint en

Abstract

Molecular formula assignment is the first step of metabolite identification from tandem mass spectra, yet deep-learning methods have repeatedly underperformed classical enumeration, reaching usable accuracy only through candidate generation and learned reranking. Here we present MStoic, a mass spectrum encoder that predicts molecular formulas directly and finalizes them with a deterministic, zero-parameter stoichiometric correction that selects a mass-consistent formula against the precursor mass (20 ppm; falling back to the closest-mass candidate when none qualifies). Every peak is embedded by soft Gaussian binning of log(m/z), Fourier features, pairwise-difference embeddings and an intensity embedding, and the encoder is trained with chemically grounded auxiliary tasks, including fragment-level supervision from computational fragmentation trees. On the multi-source Spectraverse benchmark (48,622 held-out spectra) MStoic achieves 77.8% top-1 exact-match accuracy, and 79.6% on the CASMI-2022 challenge, matching or exceeding specialized deep-learning, candidate-ranking, and rule-based baselines on every benchmark evaluated. Applying the same correction to a competing model shows that mass-based correction is a portable physical prior that amplifies rather than substitutes model capability. Factorial ablation shows that the hybrid encoding is selectively beneficial for rare-element-bearing formulas with information-dense spectra. And imposing mass conservation as a soft training loss reduces direct accuracy more than seven-fold, indicating that physical constraints in discrete chemical spaces belong in hard post-processing rather than in the training objective.

ChemRxiv
Dongbei University of Finance and Economics (CN), Dalian University of Technology (CN), Shanghai Customs College (CN)
Metabolomics and Mass Spectrometry Studies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Direct molecular formula prediction from tandem mass spectra with a multi-task-trained encoder and deterministic stoichiometric correction — Zhenlin Dong, Ming Yu Gao, et al. · ChemRxiv (2026) | TGRS Research Map | TGRS