Abstract
Experimental procedures for chemical synthesis are commonly reported in prose in patents or in the scientific literature. The extraction of the details necessary to reproduce and validate a synthesis in a chemical laboratory is often a tedious task requiring extensive human intervention. We present a method to convert unstructured experimental procedures written in English to structured synthetic steps (action sequences) reflecting all the operations needed to successfully conduct the corresponding chemical reactions. To achieve this, we design a set of synthesis actions with predefined properties and a deep-learning sequence to sequence model based on the transformer architecture to convert experimental procedures to action sequences. The model is pretrained on vast amounts of data generated automatically with a custom rule-based natural language processing approach and refined on manually annotated samples. Predictions on our test set result in a perfect (100%) match of the action sequence for 60.8% of sentences, a 90% match for 71.3% of sentences, and a 75% match for 82.4% of sentences.
Introduction
In the field of chemistry, experimental procedures are predominantly documented as unstructured prose. While this format is accessible to human researchers, it poses a significant barrier to laboratory automation and large-scale data analysis. To enable robotic synthesis or computational reaction modeling, these natural language descriptions must be converted into structured, machine-readable action sequences—such as "Add reagent," "Stir," or "Filter."
Historically, this conversion has relied on rule-based systems. However, the inherent variability of human language—including typos, grammatical inconsistencies, and diverse phrasing found in patent literature—often causes these rigid systems to fail. There is a critical need for a flexible and robust methodology to extract the underlying logic of chemical experiments from raw text.
Methodology
The researchers framed the extraction of synthesis actions as a sequence-to-sequence (seq2seq) translation task. Rather than translating between natural languages, the model translates English sentences into a specialized "action language."
Action Schema and Architecture
The team defined a comprehensive set of synthesis actions (e.g., Add, Stir, Filter, Quench), each associated with specific properties like duration and temperature. The core of the translation engine is a Transformer model, the same architecture underpinning state-of-the-art large language models.
Training Strategy
To overcome the scarcity of high-quality manually annotated data, the authors employed a multi-stage training process:
- Pretraining: The model was first trained on millions of reactions where actions were extracted using a "noisy" rule-based system (referred to as "silver data").
- Refinement: The pretrained model was then fine-tuned on a smaller, high-quality dataset of manually annotated sentences ("gold data").
- Data Augmentation: Robustness was further enhanced by generating synthetic variations of training data, swapping chemical names and quantities to ensure the model learned the structure of the actions rather than specific chemical entities.
Datasets
The study utilized two primary data sources:
- Pistachio Dataset: A massive repository of over 8.3 million chemical reactions from patents. A subset of 1.0 million procedures was used to generate 4.05 million sentence-action pairs for pretraining.
- Manual Annotation Set: A benchmark of 1,764 manually annotated sentences was created to serve as the gold standard for final refinement and evaluation.
Results and Discussion
The deep-learning approach demonstrated superior resilience to linguistic noise compared to traditional rule-based systems. The model's accuracy across common chemical operations is visualized in the confusion matrix below.
Performance Metrics
The refined Transformer model significantly outperformed rule-based benchmarks:
- Perfect Accuracy: The model achieved a 100% match for the entire action sequence in 60.8% of test sentences, compared to just 21.9% for the rule-based approach.
- High Similarity: Over 82% of sentences resulted in action sequences with at least a 75% match to human-annotated ground truth.
- Action Distribution: The model effectively captured a wide spectrum of laboratory operations. The frequency of these actions across the dataset is shown in the following figure.
Limitations and Future Outlook
Despite these advancements, several challenges remain. The current model assumes a linear sequence of actions and struggles with complex, branching workflows (e.g., simultaneous preparation of multiple solutions). Additionally, the model extracts only what is explicitly written; it cannot yet infer implicit information that a human chemist might assume, such as unstated solvents.
Future research will focus on expanding the action schema to support non-linear workflows and integrating the model with robotic control systems to achieve fully autonomous, closed-loop chemical synthesis.
Summary updated