S3C-LLM: Skill-Code Guided Agentic Language Models for Spectrum-to-Structure Elucidation

2026-08-31Machine Learning

Machine LearningComputation and Language
AI summary

The authors introduce S3C-LLM, a new AI approach to identify molecular structures from spectroscopic data by mimicking how human experts analyze spectra step-by-step. Instead of directly guessing the molecule, their model uses specialized skills and runs analysis code to interpret diagnostic peaks and chemical rules before making predictions. They also developed a training method that combines supervised learning and reinforcement learning to improve performance. Their system works better than current models while using far less training data.

spectroscopymolecular structure elucidationLarge Language Models (LLM)SMILESreinforcement learningsupervised fine-tuningpeak interpretationchemical formula constraintsagentic modelsspectral analysis
Authors
Xuanle Zhao, Xinyuan Cai, Xiang Cheng, Bo Xu
Abstract
Spectroscopic structure elucidation is central to molecular analysis, but recent Large Language Model (LLM)-based methods mostly formulate it as direct spectrum-to-SMILES generation. Although this paradigm can leverage paired spectral data, it does not explicitly model the analytical workflow used by spectroscopists, such as diagnostic peak interpretation, fragment reasoning, formula constraints, and chemical consistency checking. In this paper, we introduce S3C-LLM, a skill-guided and code-grounded agentic LLM for spectrum-to-structure elucidation. Rather than directly predicting a molecule, S3C-LLM retrieves modality-specific spectroscopy skills, executes analysis code to instantiate these skills on the input spectra, and integrates the resulting peak-level evidence and formula constraints before generating SMILES. Specifically, we contribute a self-evolving spectroscopy skill library, a thinking-augmented skill-code trajectory construction pipeline, and a two-stage training strategy that teaches Qwen3-4B through supervised fine-tuning (SFT) followed by our proposed step-level reinforcement learning (RL). Experiments on diverse benchmarks show that S3C-LLM consistently outperforms current general LLMs and spectrum-specific models across spectra, while using less than 1/10th of SpectraLLM's training corpus.