Agentic reinforcement learning empowers next-generation chemical language models for molecular design and synthesis

Hao Li, He Cao, Shenyao Peng, Zijing Liu, Bin Feng, Yu Wang, Zhiyuan Yan, Yonghong Tian, Yu Li, Li YuanarXiv 2026

TL;DR

ChemCRAFT is a novel framework that decouples chemical reasoning from knowledge storage by allowing a compact, locally deployable language model to interact with an external chemical sandbox. By optimizing this setup with agentic reinforcement learning (SMILES-GRPO), a 7B-14B parameter model can match or exceed the performance of massive cloud-based LLMs on complex molecular design and synthesis tasks while preserving data privacy and drastically reducing inference costs.

What Problem Does This Paper Address?

Chemical Language Models (CLMs) are transforming drug discovery and synthesis planning, but current approaches force a difficult trade-off. Small, locally deployable models suffer from hallucinations and limited knowledge retention when forced to memorize vast amounts of chemical data. On the other hand, massive cloud-based models (like GPT-4 or Gemini) introduce severe privacy risks—since proprietary molecular structures must be transmitted to external servers—and incur prohibitive token costs during large-scale screening.

Furthermore, standard supervised fine-tuning (SFT) paradigms train models using simple "Task-Query-Direct Answer" pairs. This forces a shallow mapping from chemical inputs directly to outputs, bypassing the step-by-step reasoning, intermediate hypothesis generation, and logical verification that human experts use.

Methods

The authors introduce ChemCRAFT, a framework built on a "cognitive decoupling" architecture that separates high-level planning from deterministic calculations:

  1. Chemical Agent Sandbox: An external execution environment that refactors domain-specific tasks (such as RDKit structure parsing, QED/LogP evaluation, and reaction database retrieval) into scalable microservices. This offloads error-prone arithmetic and syntactic validation from the LLM.
  2. Reflective Refinement: To prevent disjointed "Action-Observation" logs from cluttering the context, a teacher model rewrites raw tool outputs into fluid, expert-level scientific narratives.
  3. Two-Stage Training Paradigm:
  4. Stage 1: Cold-Start SFT: Initializes the model's understanding of chemical syntax and establishes the fundamental "Think $\rightarrow$ Call Tool $\rightarrow$ Observe" behavioral pattern.
  5. Stage 2: Reinforcement Learning with SMILES-GRPO: Uses Group Relative Policy Optimization (GRPO) paired with a multidimensional, chemical-aware reward function. This function evaluates structural integrity (Tanimoto similarity of scaffolds), functional group fidelity, property optimization magnitude ($\Delta$LogP, $\Delta$QED), and synthetic realizability.
Overview of the data curation pipeline and Chemical Agent Sandbox

Datasets

  • ChemToolDataset: The first large-scale chemical tool trajectory dataset, constructed from the interactive logs of the Chemical Agent Sandbox.
  • ChemCoTBench: A comprehensive evaluation suite that decomposes the chemical discovery process into 9 major tasks and 22 subtasks (e.g., Molecule Understanding, Molecule Optimization, and Reaction Prediction).
  • Public Repositories: Raw molecular structures and reaction data were aggregated from PubChem, ChEMBL, ZINC, ChemRxiv, and DrugBank.

Key Insights and Ideas

  • Reasoning as a Policy, Not Scale: Scientific reasoning is not solely an emergent ability of massive model scale; it can be learned as a policy of tool orchestration. A compact local model can achieve superior performance if it knows how and when to call specialized tools.
  • SFT vs. Agentic RL: While SFT teaches a model the format of tool invocation, reinforcement learning via SMILES-GRPO teaches the model the strategy. Under RL, the agent actively queries the sandbox to verify hypotheses and self-correct.
  • Defying Catastrophic Forgetting: Standard fine-tuning on domain-specific data often degrades an LLM's general capabilities. Because ChemCRAFT instills a universal problem-solving methodology rather than static fact memorization, it maintains robust performance on general benchmarks like MMLU.
Two-stage training paradigm featuring SMILES-GRPO

Key Results

  • Molecular Understanding: ChemCRAFT achieved near-perfect precision, scoring a Mean Absolute Error (MAE) of 0.03 on Function-Group-Detection (outperforming Qwen2.5-32B's MAE of 0.36) and attaining 100% accuracy on Ring-System-Detection.
  • Molecular Optimization: In solubility optimization, ChemCRAFT achieved a mean property improvement ($\Delta$) of 1.58, nearly quadrupling the baseline Qwen model ($\Delta = 0.42$) and outperforming Gemini-2.5-Pro ($\Delta = 1.38$).
  • Reaction Prediction: The framework achieved over 50% top-1 accuracy in complex by-product prediction and dominated the retrosynthesis task (>40% top-1 accuracy compared to <20% for specialized baselines).
  • Inference Efficiency: By internalizing agent roles into a single reasoning stream, ChemCRAFT reduced the average token length by approximately 65% compared to multi-agent frameworks like SciToolAgent.

Limitations and Future Work

Not discussed in the paper.

Summary updated

BibTeX
@misc{li2026agentic,
  author = {Hao Li and He Cao and Shenyao Peng and Zijing Liu and Bin Feng and Yu Wang and Zhiyuan Yan and Yonghong Tian and Yu Li and Li Yuan},
  title = {{Agentic reinforcement learning empowers next-generation chemical language models for molecular design and synthesis}},
  year = {2026},
  eprint = {2601.17687},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.17687},
}
Figure