LLM-Augmented Chemical Synthesis and Design Decision Programs

Haorui Wang, Jeff Guo, Lingkai Kong, Rampi Ramprasad, Philippe Schwaller, Yuanqi Du, Chao Zhang

Abstract

Retrosynthesis, the process of identifying a sequence of chemical reactions to produce a target molecule from simpler precursors, is a fundamental challenge in organic chemistry. While specialized machine learning models excel at single-step predictions, they often fail at long-term planning. Conversely, Large Language Models (LLMs) possess extensive chemical knowledge but are prone to hallucinations. This paper introduces LLM-Syn-Planner, a framework that enables LLMs to solve complex retrosynthesis problems by treating them as an evolutionary optimization task. By representing reaction routes as linear sequences and employing a multi-level evaluation system, LLM-Syn-Planner matches or exceeds the performance of specialized state-of-the-art models on complex benchmarks without requiring fine-tuning.

Introduction

Retrosynthesis is essentially the "reverse engineering" of chemistry. Starting with a complex target molecule, chemists work backward to find a sequence of simpler, purchasable precursors. This task presents a massive combinatorial challenge; as the number of reaction steps increases, the possible pathways grow exponentially.

Current computational approaches often fall into two categories: specialized models that predict individual steps but lack long-term strategic vision, and LLMs that can reason about complex tasks but frequently propose chemically impossible reactions. The primary challenge addressed here is harnessing the reasoning power of LLMs for highly constrained, multi-step decision-making while ensuring the resulting pathways are chemically valid and practically feasible.

Methodology

The authors propose LLM-Syn-Planner, which shifts the paradigm from step-by-step prediction to an evolutionary search over entire reaction pathways. The framework consists of four main stages:

  1. Initialization: Using Retrieval-Augmented Generation (RAG), the system identifies similar molecules and their known synthesis routes from a database to provide the LLM with a starting point.
  2. Evaluation: A three-level check ensures validity at the molecule level (RDKit parsable, commercially available), reaction level (exists in database, product synthesizable from reactants), and route level (connectivity).
  3. Selection: Routes are ranked using a "partial reward" system based on the SCScore (Synthetic Complexity Score). This provides a smooth gradient for the search, rewarding the model for reducing complexity even if the full route is incomplete.
  4. Mutation: The LLM acts as a "professional chemist," prompted to analyze and fix specific invalid steps in a route rather than regenerating the entire sequence.
Overview of the LLM-Syn-Planner evolutionary workflow

A critical finding was that LLMs perform significantly better when reaction routes are represented as a linear sequence of decisions (Sequential format) rather than complex nested tree structures. This linear representation aligns better with the sequential reasoning capabilities of modern LLMs.

Experimental Results

The framework was evaluated on standard benchmarks including USPTO-Easy, USPTO-190, and the more challenging Pistachio datasets. The "finish line" for synthesis routes was defined by the eMolecules database, containing 23 million commercially available building blocks.

Quantitative results showing solve rates across different datasets

LLM-Syn-Planner demonstrated state-of-the-art performance, particularly on difficult tasks. On the "Pistachio Hard" dataset, the GPT-4o based version achieved an 87% solve rate, surpassing specialized models like RootAligned (82%) and LocalRetro (72%). Notably, when LLMs were used in traditional search algorithms like Monte Carlo Tree Search (MCTS), their solve rate on hard tasks dropped to near 0%. This highlights that the evolutionary "route-level" approach is the key to unlocking LLM potential in chemistry.

Furthermore, the system was extended into LLM-Syn-Designer, which can design new molecules with optimized biological properties while simultaneously ensuring a valid synthesis path exists.

Conclusion

LLM-Syn-Planner demonstrates that off-the-shelf LLMs can solve complex chemical planning tasks when embedded in an appropriate evolutionary framework. The shift from local step-wise prediction to global route-level optimization, combined with partial rewards and sequential formatting, overcomes the traditional limitations of LLMs in scientific domains. While the computational cost of multiple LLM calls remains a factor, the ability to generate high-quality, synthesizable chemical designs without specialized fine-tuning represents a significant advancement in computer-aided synthesis planning.

Summary updated

BibTeX
@inproceedings{wang2025llm,
  author = {Haorui Wang and Jeff Guo and Lingkai Kong and Rampi Ramprasad and Philippe Schwaller and Yuanqi Du and Chao Zhang},
  title = {{LLM-Augmented Chemical Synthesis and Design Decision Programs}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=NhkNX8jYld},
}
Figure