How well can off-the-shelf LLMs elucidate molecular structures from mass spectra using chain-of-thought reasoning?
Yufeng Wang, Lu Wei, Lin Liu, Hao Xu, Haibin Ling
TL;DR
This study benchmarks off-the-shelf LLMs on the task of elucidating molecular structures from MS/MS data using a domain-informed chain-of-thought prompting framework, without any model training. Across four large models, the approach yields syntactically valid SMILES and expert-like reasoning traces but fails to achieve chemical fidelity: DBE and formula correctness are near-zero and no exact canonical matches are produced. Mid-sized molecules (200–400 Da) show the best but still modest similarity to ground-truth structures, while larger and smaller molecules exhibit rapid degradation, highlighting the lack of spectral grounding in text-only LLMs. The results underscore a gap between linguistic reasoning and mechanistic chemical interpretation, motivating integration with spectral encoders, chemistry-aware constraints, and multimodal or physics-informed architectures to achieve reliable MS-to-structure predictions. Overall, the work provides a diagnostic benchmark demonstrating that chain-of-thought prompting alone cannot bridge the gap to chemically grounded molecular elucidation from mass spectra.
Abstract
Mass spectrometry (MS) is a powerful analytical technique for identifying small molecules, yet determining complete molecular structures directly from tandem mass spectra (MS/MS) remains a long-standing challenge due to complex fragmentation patterns and the vast diversity of chemical space. Recent progress in large language models (LLMs) has shown promise for reasoning-intensive scientific tasks, but their capability for chemical interpretation is still unclear. In this work, we introduce a Chain-of-Thought (CoT) prompting framework and benchmark that evaluate how LLMs reason about mass spectral data to predict molecular structures. We formalize expert chemists' reasoning steps-such as double bond equivalent (DBE) analysis, neutral loss identification, and fragment assembly-into structured prompts and assess multiple state-of-the-art LLMs (Claude-3.5-Sonnet, GPT-4o-mini, and Llama-3 series) in a zero-shot setting using the MassSpecGym dataset. Our evaluation across metrics of SMILES validity, formula consistency, and structural similarity reveals that while LLMs can produce syntactically valid and partially plausible structures, they fail to achieve chemical accuracy or link reasoning to correct molecular predictions. These findings highlight both the interpretive potential and the current limitations of LLM-based reasoning for molecular elucidation, providing a foundation for future work that combines domain knowledge and reinforcement learning to achieve chemically grounded AI reasoning.
