RetroAgent is a 4B-parameter LLM agent for multi-step retrosynthesis planning. It decomposes a target molecule into commercially available building blocks by searching over an
AND-OR graph of molecules and reactions, driven entirely by tool calls. The policy is trained end-to-end with reinforcement learning (
GSPO) on top of the
Qwen/Qwen3-4B-Instruct-2507 backbone, using the
slime framework (Megatron + SGLang) with a reward shaped around search-budget efficiency rather than final success alone.
With a 4B model and no reranking by model probabilities, RetroAgent outperforms the 7B Retro-R1 on both benchmarks. The advantage is largest on the out-of-distribution ChEMBL-1000 set (+5.30 pass@1, +1.98 at N=500), indicating that the structured-memory interface yields transferable planning strategies rather than dataset-specific memorization.
RetroAgent is an
agent policy, not a standalone chat model. It perceives and acts only through tool calls served by the RetroAgent
tool server (AND-OR graph memory, single-step template model, building-block lookup, molecular scoring). To reproduce the reported results, run the model behind the tool server and evaluation harness from the
code repository; prompting it as a plain chat model outside the harness will not perform retrosynthesis.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("SXKDZ/RetroAgent", torch_dtype="bfloat16", device_map="auto")
4tokenizer = AutoTokenizer.from_pretrained("SXKDZ/RetroAgent")
1@inproceedings{zhu2026retroagent,
2 title = {RetroAgent: Harnessing {LLMs} to Search Over Structured Memory for Agentic Retrosynthesis Planning},
3 author = {Zhu, Yanqiao and Gan, Jingru and Sun, Xiaoqi and Sun, Fang and Shi, Yidan and Islam, Md Mofijul and Shang, Chao and Gao, Wenhao and Coley, Connor W. and Sun, Yizhou and Wang, Wei},
4 booktitle = {Conference on Language Modeling (COLM)},
5 year = {2026}
6}
Released under the Apache License 2.0, inherited from the Qwen3-4B-Instruct-2507 base model. The RetroAgent code is released separately under the MIT license (see the
code repository).