Source-linked AI summary

Large Language Models to Accelerate Organic Chemistry Synthesis

Yu Zhang, Yang Han, Shuai Chen, Ruijie Yu, Xin Zhao, Xianbin Liu, Kaipeng Zeng, Mengdi Yu, Jidong Tian, Feng Zhu, Xiaokang Yang, Yaohui Jin, Yanyan Xu

arXiv:2504.18340v1physics.chem-ph

TL;DR

Chemical synthesis still relies on trial-and-error, and AI assistants are sought to accelerate the work. Chemma, a fine-tuned language model for chemical reactions, achieved strong results across multiple tasks, including 72.2% top-1 accuracy in single-step retrosynthesis.

Abstract

from arXiv · show

Chemical synthesis, as a foundational methodology in the creation of transformative molecules, exerts substantial influence across diverse sectors from life sciences to materials and energy. Current chemical synthesis practices emphasize laborious and costly trial-and-error workflows, underscoring the urgent need for advanced AI assistants. Nowadays, large language models (LLMs), typified by GPT-4, have been introduced as an efficient tool to facilitate scientific research. Here, we present Chemma, a fully fine-tuned LLM with 1.28 million pairs of Q&A about reactions, as an assistant to accelerate organic chemistry synthesis. Chemma surpasses the best-known results in multiple chemical tasks, e.g., single-step retrosynthesis and yield prediction, which highlights the potential of general AI for organic chemistry. Via predicting yields across the experimental reaction space, Chemma significantly improves the reaction exploration capability of Bayesian optimization. More importantly, integrated in an active learning framework, Chemma exhibits advanced potential for autonomous experimental exploration and optimization in open reaction spaces. For an unreported Suzuki-Miyaura cross-coupling reaction of cyclic aminoboronates and aryl halides for the synthesis of $α$-Aryl N-heterocycles, the human-AI collaboration successfully explored suitable ligand and solvent (1,4-dioxane) within only 15 runs, achieving an isolated yield of 67%. These results reveal that, without quantum-chemical calculations, Chemma can comprehend and extract chemical insights from reaction data, in a manner akin to human experts. This work opens avenues for accelerating organic chemistry synthesis with adapted large language models.

a streamlined closed-loop workflow that leveraged machine learning algorithms to guide robotic

Chemma is presented as a generative assistant for organic synthesis, with an experiment on an unreported Suzuki–Miyaura reaction demonstrating open-reaction-space exploration in 15 runs.

a streamlined closed-loop workflow that leveraged machine learning algorithms to guide robotic

  • Prior reaction-exploration methods are described as relying on DFT, expert feature selection, and high-throughput experimentation, while focusing on predefined condition pools that can miss better open-space conditions.The passage also notes that these methods remain trial-and-error and generalize less well to new reactions.Source: a streamlined closed-loop workflow… · p. 4
  • LLMs are proposed because SMILES can encode molecular structure, reaction data can teach relationships among reactants, products, and conditions, and generation can support novel molecule design.The authors connect these capabilities to chemical knowledge learning and ligand recommendation for reaction discovery.Source: a streamlined closed-loop workflow… · p. 4
  • Chemma, a fully fine-tuned LLaMA-2-7b model, is designed as a generative assistant for chemists and an assistant for human-AI interaction and experimentation.The model addresses forward reaction prediction, retrosynthesis, reaction performance prediction, condition generation, and reaction exploration and optimization.Source: a streamlined closed-loop workflow… · p. 4
  • Within 15 runs, Chemma-assisted exploration identified suitable conditions for an unreported Suzuki–Miyaura coupling of cyclic aminoboronates and aryl halides to synthesize α-Aryl N-heterocycles.The authors state that these results confirm Chemma’s capability to explore open reaction space.Source: a streamlined closed-loop workflow… · p. 5

Design of Chemma as a chemistry assistant

Chemma combines SMILES molecular strings with natural language to support four chemistry tasks and both chemist interaction and experiment assistance. Its active-learning workflow iteratively proposes reaction conditions from experimental feedback, while task-specific training supports generation and yield or selectivity prediction.

Design of Chemma as a chemistry assistant

  • Chemma integrates SMILES molecular strings with natural language and addresses forward prediction, retrosynthesis, condition generation, and yield or selectivity prediction.These tasks support Chemma’s use as a chemistry assistant.Source: Design of Chemma as a chemistry… · p. 5
  • Chemma supports instruction-prompted human–AI interaction and an experiment-assistant scenario that uses active learning to accelerate reaction exploration and optimization.Chemists submit task-specific queries, and Chemma generates potential solutions.Source: Design of Chemma as a chemistry… · p. 5
  • Reaction data from ORD and USPTO-50k support a GPT-4-assisted prompt-generation system that creates diverse, task-specific instructions.The passages identify these public data sources and describe a template for generating instruction prompts.Source: Design of Chemma as a chemistry… · p. 5

Chemma into an active learning framework to facilitate reaction exploration and optimization

  • Chemists propose initial conditions, Chemma suggests subsequent conditions using wet-experiment feedback, and the model is fine-tuned after each suggestion-feedback round.This iterative workflow adapts Chemma to the specific reaction being explored.Source: Chemma into an active learning… · p. 5
  • The base LLaMA-2-7b model is fine-tuned on multi-task Q&A data to create Chemma-SFT, then pair-wise ranking Q&A data supports Chemma-RM for condition optimization.Ranking questions have multiple answers reflecting different preference levels.Source: Chemma into an active learning… · p. 6
  • For yield or selectivity prediction, Chemma uses two-stage training: reaction embeddings from Chemma-SFT feed regression networks that predict these outcomes.The second-stage regression networks are described as domain projector layers.Source: Chemma into an active learning… · p. 6

Performance of Chemma on open benchmark data

This section evaluates Chemma on public organic-synthesis benchmarks spanning retrosynthesis, ligand recommendation, yield prediction, regioselectivity, and enantioselectivity, and examines its use in reaction optimization. The reported results include strong retrosynthesis and ligand-recommendation performance, varying prediction quality across yield and selectivity tasks, improved yield prediction with little observed data, and accelerated optimization.

single-step retrosynthesis as a sequence-to-sequence problem. For a fair comparison, we build

  • Chemma achieved 72.2% top-1 accuracy in template-free single-step retrosynthesis and exceeded NAG2G’s 55.1% by 17.1% in top-1 accuracy.The comparison used the same USPTO-50k dataset for training and testing.Source: single-step retrosynthesis as a… · p. 7
  • In tests on five drug molecules, Chemma mostly generated proper synthetic steps across the full multistep retrosynthesis routes.Examples included reductive amination, aryl substitution, and nitro reduction.Source: single-step retrosynthesis as a… · p. 7
  • For 15 of 16 base–solvent combinations, Chemma’s recommended ligand had the best median reaction yield.Ligand recommendation was evaluated on Pd-catalysed imidazole C–H arylation reactions from ORD.Source: single-step retrosynthesis as a… · p. 8
  • Yield prediction achieved RMSE 6.59% and R2 0.74 for imidazole C–H arylation, and RMSE 6.56% and R2 0.79 for Buchwald–Hartwig [ELN].The authors report these results as slightly weaker than for Suzuki–Miyaura, possibly because of yield-distribution imbalance, product diversity, and sparse reaction conditions.Source: single-step retrosynthesis as a… · p. 9
  • Chemma’s yield predictions consistently outperformed random forest across varying training-data proportions, and its R2 was 0.74 on literature-derived Pd-catalyzed carbonylation reactions.The authors attribute acceptable performance across the evaluated reactions partly to pretraining on large amounts of reaction data.Source: single-step retrosynthesis as a… · pp. 9–10

surpassing the traditional machine learning methods (Supplementary Note 4 and Extended Data

  • On the regioselectivity dataset, Chemma’s predicted results had R2 0.93, RMSE 0.74 kcal · mol−1, and site accuracy 78.74%, close to RF model (60); on enantioselectivity, R2 was 0.89 and RMSE 0.25 kcal · mol−1.Source: surpassing the traditional machine… · p. 10
  • For selectivity prediction, Chemma used only molecular SMILES, without selected physical-organic features or DFT descriptors.This result suggests that Chemma learned chemically informed molecular representations.Source: surpassing the traditional machine… · p. 10
  • Chemma outperformed all traditional machine-learning baseline models in yield prediction for the enantioselective addition of diethyl zinc to benzaldehyde.The reaction used a racemic catalyst and an enantiopure chiral additive.Source: surpassing the traditional machine… · p. 10

Chemma-generated data benefits yield prediction and reaction optimization

  • With 5% real data, Chemma-enhanced RF achieved R^2 values of 0.53 for Suzuki and 0.72 for Buchwald–Hartwig, approaching 0.6 and 0.8 with 90% real data.The reported results support generated data as an alternative to experimental observations, particularly in few-shot settings.Source: Chemma-generated data benefits yield… · p. 11
  • Chemma-BO achieved 98.5% yield within 15 experiments (three batches), while BO and GPT-4 required at least 50 for similar results; on Buchwald–Hartwig, it reached 98.7% within 10 and 99.8% within 25, versus BO’s at least 50.Source: Chemma-generated data benefits yield… · p. 12

reason is that Buchwald–Hartwig reaction includes more uncertain variables such as reactants,

  • Buchwald–Hartwig reactions involve more uncertain reactants, conditions, and products than Suzuki–Miyaura reactions, which may limit GPT-4’s prior knowledge for optimization.Chemma-BO and BO could still optimize Buchwald–Hartwig reactions using DFT descriptors; generated yields can also hasten baseline BO.Source: reason is that Buchwald–Hartwig… · p. 13

Exploring and optimizing open reaction spaces with Chemma

Chemma is used in an active-learning framework to explore and optimize reaction conditions, including open reaction spaces where expert-dependent predefined conditions can limit discovery. In an unreported Suzuki–Miyaura coupling, the human–Chemma collaboration identified conditions for α-aryl N-heterocycle synthesis within 15 runs.

without predefined condition pools, a.k.a. open reaction space?”

  • Chemma generated initial conditions, while chemists iteratively ran experiments and provided feedback; fine-tuning between rounds let the model learn about the new reaction.The framework was applied to both closed and open reaction spaces.Source: without predefined condition pools,… · p. 13

interacting with Chemma, we conduct more wet experiments with varying solvents including

  • For the unreported coupling, all initial ligands L1–L9 performed poorly; after fine-tuning, Chemma recommended PAd3, which gave a 67% yield.The tests of generated ligands L1 and L3 gave 6% and 16% yields, respectively, while L6 showed weak reactivity, indicating difficulty generating reactive ligands for unseen reactions.Source: without predefined condition pools,… · pp. 15–16
  • Within 15 runs, the human–Chemma collaboration identified conditions for the unreported coupling, achieving 67% isolated yield and product yields of 45%–67%.The team changed the solvent to 1,4-dioxane after low initial yields; it performed best among the evaluated solvents.Source: without predefined condition pools,… · p. 16, interacting with Chemma, we conduct… · p. 16

Discussion

Chemma learns chemistry through reaction data and supports synthesis tasks, but its limitations and potential misuse call for expert oversight and safeguards. The authors also identify future directions for understanding its chemical explanations and integrating it with embodied AI.

Discussion

  • Chemma learns reactions in natural language and achieves state-of-the-art performance across multiple chemical tasks, while helping instruct synthesis experiments.Source: Discussion · p. 16

Limitations

  • With limited observations, Chemma may produce suboptimal outcomes and cannot effectively answer unreported-reaction questions without chemist feedback.The authors describe iterative condition generation from wet-experiment feedback and fine-tuning; after human–AI collaboration rounds, Chemma improved.Source: Limitations · p. 17

better understand the specific reaction. Moreover, when tasked with specific chemical problems,

  • Diverse responses can require extra selection effort, while hallucinations may produce non-viable routes or incompatible conditions.The authors propose standardized prompts and data protocols, and recommend chemist oversight and adding expert experience or chemical mechanisms.Source: better understand the specific… · p. 17

the other hand, some Chemma-generated hypotheses might be valuable, e.g. designing new

Unintended risks

  • Misuse could enable harmful compounds, so the authors recommend prompt safeguards, automated screening, and experienced-chemist review before experiments.Source: Unintended risks · p. 18
  • The authors identify intellectual property as another concern and call for clear policies on ownership of model-generated structures and materials.Source: Unintended risks · p. 18

Outlook

  • Chemma is designed to assist with retrosynthesis, reaction-performance prediction, condition generation, and reaction exploration and optimization.The authors plan to investigate chemical explanations through reaction or molecule embeddings and identify integration with embodied AI as a possible path toward an autonomous chemical laboratory.Source: Outlook · p. 19
  • Within 15 runs, Chemma explored optimized conditions for a previously unreported N-heterocycle Suzuki reaction, achieving a 67% yield.The paper presents this as an example of exploration through an active-learning pipeline.Source: Outlook · p. 19

Methods

Chemma combines a chemistry language model with Bayesian optimization and an active-learning workflow for reaction exploration and optimization. Its methods cover prompt-based interaction, model training, yield prediction, and iterative experimental feedback.

these reaction data are collected from the literature, patents, and high-throughput experiments

  • In Chemma’s human–AI interaction, task-specific queries are constructed via instruction prompts, such as requesting an optimized reaction ligand, and the model generates potential solutions.The task templates are designed for diversity, consistency, and completeness.Source: these reaction data are collected from… · p. 20

Model architecture; by learning the performance differences between various reactions. Thus, pair-wise ranking; ment learning training strategy from human feedback (RLHF) and proximal policy optimization

  • Chemma-SFT fully fine-tunes LLaMA-2, while Chemma-RM learns reaction-condition preferences from pairwise comparisons based on yield and selectivity.For example, the comparison “XPhos > tBuXPhos” labels XPhos as better for the reaction; Chemma-RM is trained with PPO using a cross-entropy objective based on preference comparisons.Source: Model architecture · p. 21, by learning the performance… · p. 21

ment learning training strategy from human feedback (RLHF) and proximal policy optimization

  • For yield or selectivity regression, Chemma extracts reaction embeddings from Chemma-SFT and feeds them to a five-layer MLP trained with mean squared error.The model is trained with PPO for the reward-model component; Chemma-SFT minimizes next-token cross-entropy.Source: ment learning training strategy from… · p. 21

Implementation of Chemma-BO

  • Classical Bayesian optimization iteratively selects experiments by an acquisition function, updates its probabilistic surrogate with measured yields, and repeats until resources or exploration limits are reached.Chemma-BO adapts this process by using Chemma-generated yields to guide candidate selection, with wet-lab experiments providing yield data during new explorations.Source: Implementation of Chemma-BO · p. 22
  • Chemma-BO predicts yields across reaction conditions, validates top-5 candidates experimentally, and uses a Gaussian-process surrogate to correct bias in Chemma-generated yields.The surrogate is trained on previously observed and Chemma-generated yields with DFT descriptors; its output updates predictions across the reaction space before another top-5 experimental round.Source: Implementation of Chemma-BO · p. 22, previously observed and… · pp. 22–23

Active learning framework of Chemma for reaction optimization

  • Chemma’s active-learning workflow uses prompts to generate initial conditions, tests them experimentally, and can fine-tune the model on collected data for subsequent rounds.It supports both predefined (closed) reaction spaces and open spaces without a fixed set of conditions; optimization ends when acceptable performance is reached.Source: Active learning framework of Chemma… · p. 23

Data and model availability

The paper identifies open datasets used for training and testing, provides retrosynthesis source data via Zenodo, and states that Chemma is available for free use.

Data and model availability

Inclusion & ethics

The paper lists all contributors who meet its authorship criteria as co-authors and acknowledges contributors who do not meet all criteria.

  • Contributors meeting the authorship criteria are listed as co-authors, while those who do not meet all criteria are listed in the Acknowledgements.Source: Inclusion & ethics · p. 31

Competing interests

The authors declare that they have no competing interests.

Competing interests

B A Suzuki–Miyaura [HTE] reaction

Chemma is evaluated across open-benchmark and high-throughput-experiment (HTE) synthesis tasks, including reaction recommendation, yield prediction, and selectivity prediction. A separate evaluation tests whether Chemma-generated yields can augment reaction data for yield prediction and optimization.

generated data on Suzuki and Buchwald–Hartwig reaction, respectively. Chemma-enhanced

The section describes Chemma-driven reaction optimization and exploration in predefined and open reaction spaces, including comparisons with GPT-4 and conventional Bayesian optimization.

Chemma-enhanced reaction optimization

Active-learning workflow

  • Chemma’s active-learning workflow supports predefined or open reaction spaces, with chemists testing suggestions, recording results in ELNs, and fine-tuning the model if the target yield is unmet.After each experimental round, the process can begin another exploration round.Source: generated data on Suzuki and… · p. 40

Predefined reaction spaces

  • For predefined spaces, zero-shot Chemma prompts recommended ligands for Pd-catalysed imidazole C–H arylation and Buchwald–Hartwig reactions, with 16 experimental runs for each.The optimizations used high-throughput-experiment data.Source: generated data on Suzuki and… · p. 41

Open reaction spaces

  • In an unreported Pd-catalysed N-heterocycle reaction, experts’ and Chemma’s nine initial ligand choices were followed by RLHF, three suggested ligands, then three solvents suggested via ICL.Chemists conducted wet experiments in the successive rounds.Source: generated data on Suzuki and… · p. 41

Substrate compatibility

  • Substrate compatibility was tested for PAd3/Pd-catalysed C–C coupling of a (1-benzoylpiperidin-2-yl)boronic acid ester with diverse aryl bromides.The stated conditions include 1,4-dioxane (2 mL), Cu2O, NaOH (0.6 mmol), and 120 °C.Source: generated data on Suzuki and… · p. 41

distribution of the yields for Pd-catalysed Suzuki–Miyaura [HTE], Buchwald-Hartwig [ELN], · catalysed Buchwald-Hartwig reaction, and our unreported synthesis of aryl-substituted

Chemma is evaluated for yield prediction across varying data and reaction-space splits, and is integrated into active-learning workflows for reaction exploration and optimization. The supplied passages also describe closed-loop experiments and wet testing of Chemma-designed ligands.

distribution of the yields for Pd-catalysed Suzuki–Miyaura [HTE], Buchwald-Hartwig [ELN],

  • Yield-prediction accuracy gradually eroded as training data decreased from 90% to 5% of the full dataset.The training proportions were selected randomly from the original dataset.Source: distribution of the yields for… · p. 49
  • Substrate-scope tests evaluated 20 Suzuki–Miyaura substrate types and 15 Buchwald–Hartwig aryl chlorides across four scenarios with ten-fold validation.Scenarios varied the substrates used for training and testing.Source: distribution of the yields for… · p. 49
  • Condition-scope tests split Suzuki–Miyaura reactions by 11 ligand types and Buchwald–Hartwig reactions by four additive-scope scenarios.The Buchwald–Hartwig scenarios tested held-out additives.Source: distribution of the yields for… · p. 49
  • In selectivity examples, Chemma matched the labeled reactive site in successful cases but mispredicted a failure case’s target site.For the failure case, measured target-product probability at the meta site was 0.7652, while Chemma predicted 0.6016 for the ortho site.Source: distribution of the yields for… · p. 52, Figure 6 · p. 52
  • Chemma was integrated into active learning, using wet-experiment feedback to suggest conditions and fine-tune for both closed and open reaction spaces.The framework iterates through suggestion-feedback rounds; open spaces are not limited to experts’ prior knowledge.Source: distribution of the yields for… · p. 53

catalysed Buchwald-Hartwig reaction, and our unreported synthesis of aryl-substituted

  • Detailed prompts were provided for optimizing imidazole C–H arylation, Buchwald–Hartwig reactions, and a reported aryl-substituted nitrogen-heterocycle synthesis.The supplied passages describe prompt designs, but provide no optimization outcome for the latter synthesis.Source: catalysed Buchwald-Hartwig reaction,… · pp. 56, 59
  • A 16-experiment closed loop optimized imidazole C–H arylation, using zero-shot prompts to select a ligand and observed yields to request higher-yield suggestions through in-context learning.Initial solvent-base variables were randomly selected; previously tested suggested ligands prompted random changes to other reaction variables.Source: catalysed Buchwald-Hartwig reaction,… · p. 56
  • Wet experiments on Chemma-designed Buchwald–Hartwig ligands found yields of 6% for L1 and 16% for L3, while L6 showed no reactivity.The team synthesized L1, L3, and L6 to test the generated ligands.Source: catalysed Buchwald-Hartwig reaction,… · p. 57
Loading 2504.18340v1…