Effective synthesis planning powered by deep learning (DL) can significantly accelerate the discovery of new drugs and materials. However, most DL-assisted synthesis planning methods offer either none or very limited capability to recommend suitable reaction conditions (RCs) for their reaction predictions. Currently, the prediction of RCs with a DL framework is hindered by several factors, including: (a) lack of a standardized dataset for benchmarking, (b) lack of a general prediction model with powerful representation, and (c) lack of interpretability. To address these issues, we first created 2 standardized RC datasets covering a broad range of reaction classes and then proposed a powerful and interpretable Transformer-based RC predictor named Parrot. Through careful design of the model architecture, pretraining method, and training strategy, Parrot improved the overall top-3 prediction accuracy on catalysis, solvents, and other reagents by as much as 13.44%, compared to the best previous model on a newly curated dataset. Additionally, the mean absolute error of the predicted temperatures was reduced by about 4 °C. Furthermore, Parrot manifests strong generalization capacity with superior cross-chemical-space prediction accuracy. Attention analysis indicates that Parrot effectively captures crucial chemical information and exhibits a high level of interpretability in the prediction of RCs. The proposed model Parrot exemplifies how modern neural network architecture when appropriately pretrained can be versatile in making reliable, generalizable, and interpretable recommendation for RCs even when the underlying training dataset may still be limited in diversity.
| 1. | We curated a large open-source dataset named USPTO-Condition based on the original USPTO reaction dataset [33] for benchmarking RC recommendation models. In addition, according to the specific data extraction strategy, another general RC dataset Reaxys-TotalSyn-Condition was also extracted from Reaxys for a comprehensive model evaluation. The general procedure regarding the curation of the benchmark RCs dataset is shown in Fig. 1B. |
| 2. | Leveraging the attention-based model architecture and training methodology specifically designed for enhanced reaction center, our method Parrot achieved an overall top-3 prediction accuracy of 2.64% and 13.44% higher than the RCs recommender (RCR) proposed by Gao et al. [26] for 2 large-scale general RC datasets mentioned above, respectively, and the temperature mean absolute error (MAE) was also reduced by about 4 °C. Figure 1C shows the model structure and strategy used by Parrot. |
| 3. | We also demonstrated that our method exhibits strong generalization ability, maintaining higher predictive accuracy and suffering less accuracy loss compared to RCR [26] when prediction across reaction space. |
| 4. | Finally, we utilized the attention mechanisms to illustrate the intrinsic correlation between the substructures in the reaction and the predicted catalysts and reagents. The model design of Parrot can capture reaction centers and characteristic functional groups well. The model interpretation provides more scientific insights. |
| 1. | The dataset USPTO-Condition is obtained from the US patent database, which exhibits certain limitations in terms of data quality. Specifically, the accuracy of the recorded reaction temperatures is subject to notable errors. Therefore, we did not include temperature information in USPTO-Condition. |
| 2. | Similar to the work of Gao et al. [29], this study also adopts the strategy of constructing a model to predict 5 categories of RCs, and (following their workflow) we omit rare data with more than 5 RCs in these 2 datasets. |
| 3. | Although this work has demonstrated that Parrot has stronger cross-reaction space prediction capabilities compared to other similar models for predicting RCs, similar to other works that treat RC prediction as a classification task, Parrot's predictions heavily rely on the quality of collected RC data. For novel RCs that are not present in the dataset, the model struggles to make accurate predictions. The approach of decoding RCs step by step at the character level can overcome the limitations of RC labels. However, it also brings the issues related to syntax effectiveness and the assignment of roles to RCs. |
| 4. | We did not take into account of the high and low chemical yields when curating the data and training the model. In other words, the model considered all combinations of RCs present in the dataset to be of equal value. However, the chemical reaction yields are strongly affected by the RCs. |
| 5. | Although this study made efforts to clean the RC data obtained from USPTO and Reaxys, the data size is still limited compared to large-scale commercial datasets. This limitation is also evident in the trained models' performance. Access to higher-quality and larger-scale RCs data can improve RC prediction model performance further. Presently, large language models such as GPT-4 [48,49] have excelled in literature summarization. Employing similar techniques, it is feasible to automatically extract chemical RC data from extensive chemical synthesis literature to enhance data quality. |
| 1. | Using only the reaction-condition cross-attention weights: |
| 1. | Using only Bert's reaction–reaction self-attention weights: First, the self-attention weight matrices extracted from Bert's encoder are inputted into the atom mapping algorithm implemented in rxnmapper [52]. To determine the optimal layer and head configuration, a methodology similar to that employed by Schwaller et al. [52] is adopted, using a dataset of 996 instances derived from the USPTO-50K. Subsequently, the atom mapping procedure is applied to the validation set of the USPTO-Condition, wherein the self-attention weights of Parrot's encoder serve as a guiding mechanism. The reaction templates are extracted using rdchiral [55]. Following that, rdkit is utilized to execute subgraph matching on the reactions, enabling the identification of indices associated with active atoms. Finally, a comparison is made between the indices of active atoms and the ground truth reaction center, upon which the OS and FPR are computed. |
| 2. | Simultaneously using cross-attention weights and Bert's self-attention weights: In this approach, we combine the cross-attention weights with the self-attention weights of the encoder to enhance the relevance between the attention mechanism and the reaction center. However, we adopt a stricter treatment for the cross-attention weights, and the calculation process is as follows: |
| 科 Family | 属数 Number of genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) | 属 Genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) |
|---|---|---|---|---|---|---|
| 鹅膏菌科Amanitaceae | 2 | 11 | 5.26 | 鹅膏菌属 Amanita | 10 | 4.78 |
| 小菇科 Mycenaceae | 2 | 12 | 5.74 | 丝盖伞属 Inocybe | 5 | 2.39 |
| 多孔菌科 Polyporaceae | 8 | 14 | 6.70 | 蜡蘑属 Laccaria | 5 | 2.39 |
| 红菇科 Russulaceae | 3 | 23 | 11.00 | 小皮伞属 Marasmius | 6 | 2.87 |
| 小菇属 Mycena | 11 | 5.26 | ||||
| 光柄菇属 Pluteus | 5 | 2.39 | ||||
| 红菇属 Russula | 17 | 8.13 | ||||
| 栓菌属 Trametes | 5 | 2.39 |