# Language Models for Predicting Organic Synthesis Procedures
## 4 The Data  
This paper is structured to follow the standard flow of machine learning research applied to chemical synthesis tasks. Section 4 discusses the preparation of the dataset, which forms the foundation of this study. Section 5 describes the machine learning methods and model configurations used. Section 6 presents the results, including performance evaluations of the models. Finally, Section 7 provides a discussion of the implications of these findings and highlights directions for future research. In the preparation of our dataset, we utilized a compilation of synthesis procedures extracted from USPTO and EPO patents spanning from 1971 to 2022. Patents from the USPTO and EPO are detailed documentations that cover a variety of chemical processes and synthesis methods. The organized format of patents, with comprehensive descriptions of experimental methods, compounds, outcomes, and parameters, offers a uniform structure for extracting and converting data. Patents provide a simpler way to access chemical techniques, but the process of obtaining information is intricate. That is why we utilize an already processed dataset, named EPO/USPTO, which was created using a new methodology outlined in a study that utilizes a mix of ML algorithms, software tools, and specifically prepared scripts [48]. The processing consists of two main tasks: first, categorizing patent paragraphs to precisely recognize chemical procedures, and second, transforming these procedures into a structured and machine-readable format. Three examples are presented in Table 1 (original and structured format examples). The steps are essential, but the dataset mentioned earlier is not directly suitable for our task and needs additional processing. The data section outlines the steps required to prepare the dataset used in our study, referred to as _PRP-931k_. The abbreviation PRP stands for Patent Reaction Procedure, indicating that the extracted instances include both reactions and procedures. The _931k_ represents the dataset's total size, intended for discerning potential larger versions in the future. The final dataset is unique compared to the commonly utilized USPTO-50k [49] or USPTO-MIT [50] datasets as it contains reactants and products in SMILES format, along with simplified and machine-readable synthesis procedures. The refined dataset contains input and output instances. The inputs are represented as single lines of text, denoting reactants and products in SMILES notation, whereas the outputs describe a series of synthesis procedure steps and their respective parameters. Three examples from the dataset are presented in Table 1. This notation system simplifies the representation of molecular structures by using a linear text string, making it easy to encode and decode intricate molecular geometries, functional groups, and connectivity. It enables a clear representation of molecular structures, reducing the chance of misunderstanding or mistakes in the synthesis planning process. Additionally, when SMILES notation is utilized as input for predictive models, it allows for the direct implementation of data-driven methods in chemical synthesis without requiring complex translations or conversions of molecular representations. The output procedure is composed of actions that are constrained and presented in a methodical and simple manner: a single word denotes the action, followed by its parameters. The actions (24 in total) are as follows: _Add, Stir, Concentrate, Yield, MakeSolution, Wash, CollectLayer, Purify, Filter, DrySolution, Extract, SetTemperature, Reflux, PH, PhaseSeparation, DrySolid, Quench, Wait, Recrystallize, Partition, Degas, Triturate, Microwave_, and _Sonicate_. The schema used for action, parameter naming, and formatting was first introduced by [PERSON] [51] and later improved by IBM. The input SMILES notation requires case sensitivity, with aromatic atoms represented in lowercase and aliphatic atoms in uppercase.