Table of Contents
Fetching ...

Atom-anchored LLMs speak Chemistry: A Retrosynthesis Demonstration

Alan Kai Hassen, Andrius Bernatavicius, Antonius P. A. Janssen, Mike Preuss, Gerard J. P. van Westen, Djork-Arné Clevert

TL;DR

This work presents atom-anchored LLMs for chemistry to address data scarcity by grounding reasoning in atom-mapped SMILES. It introduces a two-stage framework with a zero-shot Position Model for identifying disconnection sites and an optional few-shot Transition Model for applying transformations, all without task-specific training. Across public benchmarks and real drug molecules, the approach achieves high disconnection-site identification ($\geq 90\%$), meaningful reaction-class labeling ($\geq 40\%$), and solid reactant predictions ($\geq 74\%$), while enabling synthetic-data generation by mapping chemical knowledge to molecular structures. The methodology provides a general, data-efficient blueprint for applying LLMs to molecular design and synthesis planning, with practical implications for drug discovery and automated synthesis.

Abstract

Applications of machine learning in chemistry are often limited by the scarcity and expense of labeled data, restricting traditional supervised methods. In this work, we introduce a framework for molecular reasoning using general-purpose Large Language Models (LLMs) that operates without requiring labeled training data. Our method anchors chain-of-thought reasoning to the molecular structure by using unique atomic identifiers. First, the LLM performs a one-shot task to identify relevant fragments and their associated chemical labels or transformation classes. In an optional second step, this position-aware information is used in a few-shot task with provided class examples to predict the chemical transformation. We apply our framework to single-step retrosynthesis, a task where LLMs have previously underperformed. Across academic benchmarks and expert-validated drug discovery molecules, our work enables LLMs to achieve high success rates in identifying chemically plausible reaction sites ($\geq90\%$), named reaction classes ($\geq40\%$), and final reactants ($\geq74\%$). Beyond solving complex chemical tasks, our work also provides a method to generate theoretically grounded synthetic datasets by mapping chemical knowledge onto the molecular structure and thereby addressing data scarcity.

Atom-anchored LLMs speak Chemistry: A Retrosynthesis Demonstration

TL;DR

This work presents atom-anchored LLMs for chemistry to address data scarcity by grounding reasoning in atom-mapped SMILES. It introduces a two-stage framework with a zero-shot Position Model for identifying disconnection sites and an optional few-shot Transition Model for applying transformations, all without task-specific training. Across public benchmarks and real drug molecules, the approach achieves high disconnection-site identification (), meaningful reaction-class labeling (), and solid reactant predictions (), while enabling synthetic-data generation by mapping chemical knowledge to molecular structures. The methodology provides a general, data-efficient blueprint for applying LLMs to molecular design and synthesis planning, with practical implications for drug discovery and automated synthesis.

Abstract

Applications of machine learning in chemistry are often limited by the scarcity and expense of labeled data, restricting traditional supervised methods. In this work, we introduce a framework for molecular reasoning using general-purpose Large Language Models (LLMs) that operates without requiring labeled training data. Our method anchors chain-of-thought reasoning to the molecular structure by using unique atomic identifiers. First, the LLM performs a one-shot task to identify relevant fragments and their associated chemical labels or transformation classes. In an optional second step, this position-aware information is used in a few-shot task with provided class examples to predict the chemical transformation. We apply our framework to single-step retrosynthesis, a task where LLMs have previously underperformed. Across academic benchmarks and expert-validated drug discovery molecules, our work enables LLMs to achieve high success rates in identifying chemically plausible reaction sites (), named reaction classes (), and final reactants (). Beyond solving complex chemical tasks, our work also provides a method to generate theoretically grounded synthetic datasets by mapping chemical knowledge onto the molecular structure and thereby addressing data scarcity.
Paper Structure (20 sections, 2 equations, 14 figures, 6 tables)

This paper contains 20 sections, 2 equations, 14 figures, 6 tables.

Figures (14)

  • Figure 1: Adaptation of our general framework to the task of retrosynthesis. First, the Zero-Shot Position Model ($f_{\text{position\_retro}}$ or $f_{\text{p\_retro}}$, guided by $r_{\text{position}}$) analyzes an atom-mapped product $m_0$ together with the reaction ontology $O$ to identify and rank disconnection candidates $(S_i, \beta_i, \iota_i, \rho_i)$. Second, the (optional) Few-Shot Transition Model ($f_{\text{transition\_retro}}$ or $f_{\text{p\_retro}}$, guided by $r_{\text{transition}}$ and a library $L_{\text{retro}}$ of $\beta_i$ reaction examples) applies the selected reaction $\beta_i$ at the site $S_i$ to generate plausible reactant molecules ($R_k$) with validity assessment ($\gamma_k$) and chemical rationale ($\omega_k$).
  • Figure 2: A) Position model performance on USPTO-LLM. The plot compares various foundation models on the task of reaction position prediction, measured by four evaluation metrics: achieving a partial positional match, maximizing the Jaccard metric, identifying the exact position, and predicting the correct reaction (conditional on a partial match). B) Confusion matrix of predicted versus ground-truth reaction classes for the Gemini 2.5 Pro model on USPTO-LLM. The analysis is conditional, including only predictions where the model successfully identified at least a partial positional match. For this visualization, reactions outside the defined reaction ontology were excluded. The matrix was generated using the original class-to-name mappings from the ground-truth data, with any unassigned reactions grouped into the 'Miscellaneous' category.
  • Figure 3: Transition Model Performance on USPTO-LLM. The plot evaluates various LLMs on their ability to predict chemical transformations. Accuracy is measured using three metrics: direct reactant prediction ('Reactants'), valid template generation ('Template'), and a combined approach where either is considered a success ('Combined').
  • Figure 4: Zero-shot position model prediction for compound LEI-515 jiangMonoacylglycerolLipaseInhibitor2023 using the PaRoutes reaction ontology highlighting reaction priority 1. See Table \ref{['table:appendix_disconnections-lei-515']} for all priorities (1-14).
  • Figure 5: Distribution of reaction names in the USPTO-50k test set. From this dataset, we created a balanced subsample (USPTO-LLM) for evaluation by selecting up to five examples per named reaction class, while maintaining the original proportion of the 'otherReaction' class.
  • ...and 9 more figures