Tandem mass spectrometry (MS2) is central to small-molecule structural annotation in metabolomics, yet accurate structure inference remains challenging because of complex fragmentation and structurally similar candidates. Here, we introduce MS2Agent, an end-to-end multi-agent framework that integrates cross-modal representation learning with large language model (LLM) reasoning for MS2 annotation. The agent converts mass spectrometry data and molecular structures into a unified textual representation and utilizes a pre-trained model to calculate similarity. Four functional agents perform spectrum textualization, structure textualization, candidate initialization, and collaborative reranking, enabling evidence-based candidate discrimination. On the CASMI 2022 benchmark, MS2Agent improved Recall@1 from 0.156 for the Codex baseline to 0.738 with the same base LLM. Evaluations on MassSpecGym and an independently constructed isomer benchmark further characterize its generalization and performance in challenging structural cases. To improve computational efficiency, we developed MS2Rep-0.8B-GRPO, a lightweight 0.8B-parameter model optimized by Group Relative Policy Optimization (GRPO), a reinforcement learning (RL) algorithm for MS2 and molecular-structure textualization, achieving a Recall@1 of 0.784 (+8.4 percentage points over the base model) on the CASMI 2022 benchmark. Tests on real samples further demonstrate the practical utility of MS2Agent for metabolite annotation. This multi-agent framework integrating cross-modal representation learning and LLM reasoning offers a promising strategy for automated structural annotation workflows. Future advances in LLMs may further strengthen the annotation capability of the proposed framework.
No takes yet. Share an insight, caveat, or question.
Geng et al. (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: