Conditional Variational AutoEncoder to Predict Suitable Conditions for Hydrogenation Reactions
Abstract
1. Introduction
2. Results and Discussion
2.1. Performance of the Models Trained on Dataset S
2.2. Performance of the Models Trained on Dataset B
3. Materials and Methods
3.1. Dataset Acquisition and Curation
3.1.1. Chemical Structure Curation
3.1.2. Reaction Condition Curation
3.1.3. Datasets
3.2. Training and Test Sets
3.3. Descriptors
3.3.1. Descriptors of Chemical Transformations
3.3.2. Descriptors of Conditions for Dataset S
3.3.3. Descriptors of Conditions for Dataset B
3.4. Methods
3.4.1. Conditional Variational AutoEncoder
3.4.2. Other Models
- Null model predicts RCs by selecting the most frequently occurring combination of condition components from the training set. However, it should be noted that the training set of dataset B includes some records with unknown temperature or pressure (see Supplementary Materials, Figures S1 and S2); therefore, these conditions were ignored by the model during the definition of a metric of the model. This model serves as a baseline, reflecting the probability of correct predictions based solely on the frequency distribution of conditions in the dataset.
- The ranking k Nearest Neighbors (kNN) method [10] is employed to retrieve RCs from the training set that are most similar to the query transformation. The assessment of reaction similarity was conducted through the calculation of the Euclidean distance, utilizing CGR-based fragment descriptors that were compressed with the assistance of Incremental Principal Component Analysis [27], as described in Section 3.3.1.
- A Likelihood Ranking Model (LRM) [10] applies to a feed-forward neural network with a single hidden layer of 2000 neurons and a ReLU activation function to predict reaction conditions. The output layer has sigmoid activation and predicts each condition component’s probabilities and ranks them according to likelihood [10].
- The model from ASKCOS proposed by Gao H. et al. [6] is available on GitHub (version 1.0, commit ec2a858) https://github.com/Coughy1991/Reaction_condition_recommendation (accessed on 13 March 2019). and predicts the catalyst, first solvent, second solvent, first reagent, second reagent, and temperature as a continuous value. The predicted temperature value was then mapped to the corresponding range based on the criteria outlined above (see Section 3.3.2 and Section 3.3.3). The default option is to enumerate 18 conditions based on the best two catalysts, the first three solvents, one second solvent, the first three reagents, and one second reagent. Given that the output of the ASKCOS model is represented by the Reaxys® chemical ID, SMILES, or compound name, the name standardization procedure is required. The complete match of the combination of conditions was checked; in our assessments, the pressure was always considered to be correctly predicted because the ASKCOS model proposed by Gao et al. does not predict it. Predicted solvents were ignored as proposed models do not predict solvents. So, the provided values were somehow biased toward the overestimation of ASKCOS model performance. Nonetheless, it is worth mentioning that the ASKCOS model was trained on the whole reaction dataset and, unlike the other models, was not specifically tailored to the hydrogenation reaction case, which likely explains its lower predictive performance in this study.
3.5. Evaluation Metric
4. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| RC | Reaction conditions |
| AE | Autoencoder |
| VAE | Variational autoencoder |
| CASP | Computer-aided synthesis planning |
| CDF | Cumulative distribution function |
| CGR | Condensed graph of reaction |
| EMD | Earth Mover’s Distance |
| ELBO | Evidence Lower Bound |
| FL | Focal loss |
| g-CVAE | Gaussian conditional variational autoencoder |
| h-CVAE | Hyperspherical conditional variational autoencoder |
| rnf-CVAE | Riemannian Normalizing Flow conditional variational autoencoder |
| HTE | High-throughput experimentation |
| kNN | k Nearest Neighbors |
| KL | Kullback–Leibler Divergence |
| LRM | Likelihood Ranking Model |
| MMD | Maximum Mean Discrepancy |
| PCA | Principal Component Analysis |
| p@k | Precision at k |
| ReLU | Rectified Linear Unit |
| vMF | von Mises–Fisher Distribution |
Appendix A
Appendix A.1. Structure Standardization of Dataset B
- Gaseous hydrogen as a reagent;
- The number of stages is equal to 1;
- There are not the keyword “steps”.
Appendix A.2. Condition Standardization of Dataset B

References
- Coley, C.W.; Thomas, D.A.; Lummiss, J.A.M.; Jaworski, J.N.; Breen, C.P.; Schultz, V.; Hart, T.; Fishman, J.S.; Rogers, L.; Gao, H.; et al. A Robotic Platform for Flow Synthesis of Organic Compounds Informed by AI Planning. Science 2019, 365, eaax1566. [Google Scholar] [CrossRef]
- Ihlenfeldt, W.; Gasteiger, J. Computer-Assisted Planning of Organic Syntheses: The Second Generation of Programs. Angew. Chem. Int. Ed. Engl. 1996, 34, 2613–2633. [Google Scholar] [CrossRef]
- Feng, F.; Lai, L.; Pei, J. Computational Chemical Synthesis Analysis and Pathway Design. Front. Chem. 2018, 6, 199. [Google Scholar] [CrossRef] [PubMed]
- Coley, C.W.; Rogers, L.; Green, W.H.; Jensen, K.F. Computer-Assisted Retrosynthesis Based on Molecular Similarity. ACS Cent. Sci. 2017, 3, 1237–1245. [Google Scholar] [CrossRef] [PubMed]
- Schwaller, P.; Petraglia, R.; Zullo, V.; Nair, V.H.; Haeuselmann, R.A.; Pisoni, R.; Bekas, C.; Iuliano, A.; Laino, T. Predicting Retrosynthetic Pathways Using Transformer-Based Models and a Hyper-Graph Exploration Strategy. Chem. Sci. 2020, 11, 3316–3325. [Google Scholar] [CrossRef]
- Gao, H.; Struble, T.J.; Coley, C.W.; Wang, Y.; Green, W.H.; Jensen, K.F. Using Machine Learning to Predict Suitable Conditions for Organic Reactions. ACS Cent. Sci. 2018, 4, 1465–1476. [Google Scholar] [CrossRef]
- Chen, L.-Y.; Li, Y.-P. Enhancing Chemical Synthesis: A Two-Stage Deep Neural Network for Predicting Feasible Reaction Conditions. J. Cheminform. 2024, 16, 11. [Google Scholar] [CrossRef]
- Fu, Z.; Li, X.; Wang, Z.; Li, Z.; Liu, X.; Wu, X.; Zhao, J.; Ding, X.; Wan, X.; Zhong, F.; et al. Optimizing Chemical Reaction Conditions Using Deep Learning: A Case Study for the Suzuki–Miyaura Cross-Coupling Reaction. Org. Chem. Front. 2020, 7, 2269–2277. [Google Scholar] [CrossRef]
- Kwon, Y.; Kim, S.; Choi, Y.-S.; Kang, S. Generative Modeling to Predict Multiple Suitable Conditions for Chemical Reactions. J. Chem. Inf. Model. 2022, 62, 5952–5960. [Google Scholar] [CrossRef]
- Afonina, V.A.; Mazitov, D.A.; Nurmukhametova, A.; Shevelev, M.D.; Khasanova, D.A.; Nugmanov, R.I.; Burilov, V.A.; Madzhidov, T.I.; Varnek, A. Prediction of Optimal Conditions of Hydrogenation Reaction Using the Likelihood Ranking Approach. Int. J. Mol. Sci. 2021, 23, 248. [Google Scholar] [CrossRef]
- Maser, M.R.; Cui, A.Y.; Ryou, S.; DeLano, T.J.; Yue, Y.; Reisman, S.E. Multilabel Classification Models for the Prediction of Cross-Coupling Reaction Conditions. J. Chem. Inf. Model. 2021, 61, 156–166. [Google Scholar] [CrossRef] [PubMed]
- Wang, X.; Hsieh, C.-Y.; Yin, X.; Wang, J.; Li, Y.; Deng, Y.; Jiang, D.; Wu, Z.; Du, H.; Chen, H.; et al. Generic Interpretable Reaction Condition Predictions with Open Reaction Condition Datasets and Unsupervised Learning of Reaction Center. Research 2023, 6, 0231. [Google Scholar] [CrossRef] [PubMed]
- Wigh, D.S.; Arrowsmith, J.; Pomberger, A.; Felton, K.C.; Lapkin, A.A. ORDerly: Data Sets and Benchmarks for Chemical Reaction Data. J. Chem. Inf. Model. 2024, 64, 3790–3798. [Google Scholar] [CrossRef] [PubMed]
- Lowe, D.M. Extraction of Chemical Structures and Reactions from the Literature. Ph.D. Thesis, University of Cambridge, Cambridge, UK, 2012. [Google Scholar]
- Struebing, H.; Ganase, Z.; Karamertzanis, P.G.; Siougkrou, E.; Haycock, P.; Piccione, P.M.; Armstrong, A.; Galindo, A.; Adjiman, C.S. Computer-Aided Molecular Design of Solvents for Accelerated Reaction Kinetics. Nat. Chem. 2013, 5, 952–957. [Google Scholar] [CrossRef]
- Marcou, G.; Aires de Sousa, J.; Latino, D.A.R.S.; de Luca, A.; Horvath, D.; Rietsch, V.; Varnek, A. Expert System for Predicting Reaction Conditions: The Michael Reaction Case. J. Chem. Inf. Model. 2015, 55, 239–250. [Google Scholar] [CrossRef]
- Lin, A.I.; Madzhidov, T.I.; Klimchuk, O.; Nugmanov, R.I.; Antipin, I.S.; Varnek, A. Automatized Assessment of Protective Group Reactivity: A Step Toward Big Reaction Data Analysis. J. Chem. Inf. Model. 2016, 56, 2140–2148. [Google Scholar] [CrossRef]
- Segler, M.H.S.; Waller, M.P. Modelling Chemical Reasoning to Predict and Invent Reactions. Chem. Eur. J. 2017, 23, 6118–6128. [Google Scholar] [CrossRef]
- Walker, E.; Kammeraad, J.; Goetz, J.; Robo, M.T.; Tewari, A.; Zimmerman, P.M. Learning to Predict Reaction Conditions: Relationships between Solvent, Molecular Structure, and Catalyst. J. Chem. Inf. Model. 2019, 59, 3645–3654. [Google Scholar] [CrossRef]
- Kingma, D.P.; Welling, M. Auto-Encoding Variational Bayes. arXiv 2013, arXiv:1312.6114. [Google Scholar]
- Pagnoni, A.; Liu, K.; Li, S. Conditional Variational Autoencoder for Neural Machine Translation. arXiv 2018, arXiv:1812.04405. [Google Scholar] [CrossRef]
- Gimadiev, T.R.; Lin, A.; Afonina, V.A.; Batyrshin, D.; Nugmanov, R.I.; Akhmetshin, T.; Sidorov, P.; Duybankova, N.; Verhoeven, J.; Wegner, J.; et al. Reaction Data Curation I: Chemical Structures and Transformations Standardization. Mol. Inform. 2021, 40, 2100119. [Google Scholar] [CrossRef] [PubMed]
- Nugmanov, R.I.; Mukhametgaleev, R.N.; Akhmetshin, T.; Gimadiev, T.R.; Afonina, V.A.; Madzhidov, T.I.; Varnek, A. CGRtools: Python Library for Molecule, Reaction, and Condensed Graph of Reaction Processing. J. Chem. Inf. Model. 2019, 59, 2516–2521. [Google Scholar] [CrossRef] [PubMed]
- ChemAxon Ltd. Chemical Structure Representation Toolkit. Available online: https://chemaxon.com/chemical-structure-representation-toolkit (accessed on 31 October 2025).
- Varnek, A.; Fourches, D.; Hoonakker, F.; Solov’ev, V.P. Substructural Fragments: A Universal Language to Encode Reactions, Molecular and Supramolecular Structures. J. Comput. Aided Mol. Des. 2005, 19, 693–703. [Google Scholar] [CrossRef] [PubMed]
- Rakhimbekova, A.; Madzhidov, T.I.; Nugmanov, R.I.; Gimadiev, T.R.; Baskin, I.I.; Varnek, A. Comprehensive Analysis of Applicability Domains of QSPR Models for Chemical Reactions. Int. J. Mol. Sci. 2020, 21, 5542. [Google Scholar] [CrossRef]
- Ross, D.A.; Lim, J.; Lin, R.-S.; Yang, M.-H. Incremental Learning for Robust Visual Tracking. Int. J. Comput. Vis. 2008, 77, 125–141. [Google Scholar] [CrossRef]
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Müller, A.; Nothman, J.; Louppe, G.; et al. Scikit-Learn: Machine Learning in Python. J. Mach. Learn. Res. 2012, 12, 2825–2830. [Google Scholar]
- Tevosyan, A.; Khondkaryan, L.; Khachatrian, H.; Tadevosyan, G.; Apresyan, L.; Babayan, N.; Stopper, H.; Navoyan, Z. Improving VAE Based Molecular Representations for Compound Property Prediction. J. Cheminform. 2022, 14, 69. [Google Scholar] [CrossRef]
- Alsenan, S.; Al-Turaiki, I.; Hafez, A. Autoencoder-based Dimensionality Reduction for QSAR Modeling. In Proceedings of the 2020 3rd International Conference on Computer Applications & Information Security (ICCAIS), Riyadh, Saudi Arabia, 19–21 March 2020. [Google Scholar]
- Thomas, J.J.; Tran, H.N.N.; Pérez Lechuga, G.; Belaton, B. Convolutional Graph Neural Networks: A Review and Applications of Graph Autoencoder in Chemoinformatics. In Deep Learning Techniques and Optimization Strategies in Big Data Analytics; IGI Global: Hershey, PA, USA, 2020. [Google Scholar]
- Karpovich, C.; Jensen, Z.; Venugopal, V.; Olivetti, E. Inorganic Synthesis Reaction Condition Prediction with Generative Machine Learning. arXiv 2021, arXiv:2112.09612. [Google Scholar] [CrossRef]
- Wang, P.Z.; Wang, W.Y. Riemannian Normalizing Flow on Variational Wasserstein Autoencoder for Text Modeling. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Minneapolis, MN, USA, 2–7 June 2019. [Google Scholar]
- Davidson, T.R.; Falorsi, L.; Cao, N.D.; Kipf, T.; Tomczak, J.M. Hyperspherical Variational Auto-Encoders. arXiv 2018, arXiv:1804.00891. [Google Scholar]
- Kobayashi, T.; Otsu, N. Von Mises-Fisher Mean Shift for Clustering on a Hypersphere. In Proceedings of the 20th International Conference on Pattern Recognition ICPR 2010, Istanbul, Turkey, 23–26 August 2010. [Google Scholar]
- Rezende, D.J.; Mohamed, S.; Wierstra, D. Stochastic Backpropagation and Approximate Inference in Deep Generative Models. In Proceedings of the ICML, Beijing, China, 21–26 June 2014. [Google Scholar]
- Chieng, H.H.; Wahid, N.; Pauline, O.; Perla, S.R.K. Flatten-T Swish: A Thresholded ReLU-Swish-like Activation Function for Deep Learning. Int. J. Adv. Intell. Inform. 2018, 4, 76–85. [Google Scholar] [CrossRef]
- Lin, T.-Y.; Goyal, P.; Girshick, R.; He, K.; Dollar, P. Focal Loss for Dense Object Detection. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 42, 318–327. [Google Scholar] [CrossRef]
- Talebi, H.; Milanfar, P. NIMA: Neural Image Assessment. IEEE Trans. Image Process. 2018, 27, 3998–4011. [Google Scholar] [CrossRef]
- Levina, E.; Bickel, P. The Earth Mover’s Distance Is the Mallows Distance: Some Insights from Statistics. In Proceedings of the Eighth IEEE International Conference on Computer Vision (ICCV 2001), Vancouver, BC, Canada, 7–14 July 2001. [Google Scholar]
- Gretton, A.; Borgwardt, K.M.; Rasch, M.J.; Schölkopf, B.; Smola, A. A Kernel Two-Sample Test. J. Mach. Learn. Res. 2012, 13, 723–773. [Google Scholar]
- Chollet, F. Keras. 2015. Available online: https://keras.io (accessed on 31 October 2025).
- Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR 2015), San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
- Ash, J.R.; Wognum, C.; Rodríguez-Pérez, R.; Aldeghi, M.; Cheng, A.C.; Clevert, D.-A.; Engkvist, O.; Fang, C.; Price, D.J.; Hughes-Oliver, J.M.; et al. Practically Significant Method Comparison Protocols for Machine Learning in Small Molecule Drug Discovery. J. Chem. Inf. Model. 2025, 65, 9398–9411. [Google Scholar] [CrossRef]
- Nugmanov, R. CGRdb. Available online: https://github.com/stsouko/CGRdb (accessed on 31 October 2025).
- Fryzuk, M. Heterogeneous Catalysis in Organic Chemistry, by Gerard V. Smith (Southern Illinois University) and Ferenc Notheisz (József Attila University, Szeged, Hungary). J. Am. Chem. Soc. 2000, 122, 5233–5234. [Google Scholar] [CrossRef]











| No. | Precision at k | Models | ||
|---|---|---|---|---|
| g-CVAE | rnf-CVAE | h-CVAE | ||
| 1 | c@1 | 79.04 | 80.17 | 79.39 |
| 2 | c@3 | 87.11 | 87.89 | 86.94 |
| 3 | c@10 | 93.77 | 93.77 | 93.77 |
| 4 | ad@1 | 80.39 | 85.37 | 83.83 |
| 5 | ad@3 | 90.25 | 93.12 | 93.15 |
| 6 | ad@10 | 96.45 | 97.02 | 97.62 |
| 7 | t@1 | 91.68 | 92.44 | 92.77 |
| 8 | t@3 | 94.88 | 95.29 | 95.29 |
| 9 | t@10 | 98.51 | 98.21 | 98.02 |
| 10 | p@1 | 80.01 | 80.82 | 81.18 |
| 11 | p@3 | 95.23 | 92.42 | 93.91 |
| 12 | p@10 | 99.67 | 97.91 | 99.13 |
| No. | Precision at k | Models | ||
|---|---|---|---|---|
| g-CVAE | rnf-CVAE | h-CVAE | ||
| 1 | c@1 | 69.43 | 70.57 | 69.27 |
| 2 | c@3 | 79.93 | 83.41 | 79.23 |
| 3 | c@10 | 84.7 | 90.08 | 91.55 |
| 4 | ad@1 | 79.84 | 80.85 | 80.04 |
| 5 | ad@3 | 80.61 | 84.82 | 82.92 |
| 6 | ad@10 | 81.52 | 88.54 | 90.7 |
| 7 | t@1 | 82.34 | 83.19 | 82.46 |
| 8 | t@3 | 88.93 | 89.11 | 92.18 |
| 9 | t@10 | 92.06 | 93.08 | 98.88 |
| 10 | p@1 | 73.25 | 75.08 | 73.29 |
| 11 | p@3 | 89.48 | 84.46 | 95.72 |
| 12 | p@10 | 91.87 | 89.82 | 97.04 |
| No. | Datasets | ||
|---|---|---|---|
| S | B | ||
| 1 | Training set size (reactions) | 27,689 | 157,051 |
| 2 | Test set size (reactions) | 3692 | 39,261 |
| 3 | Descriptor space (PCA) | 500 | 1000 |
| 4 | Output dimension | 40 | 365 |
| 5 | Potential 1 condition space | 2232 | ~7 × 1042 |
| 6 | Number of conditions used in the training set | 477 | 3355 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Mazitov, D.; Gimadiev, T.; Poyezzhayeva, A.; Afonina, V.; Madzhidov, T. Conditional Variational AutoEncoder to Predict Suitable Conditions for Hydrogenation Reactions. Molecules 2026, 31, 75. https://doi.org/10.3390/molecules31010075
Mazitov D, Gimadiev T, Poyezzhayeva A, Afonina V, Madzhidov T. Conditional Variational AutoEncoder to Predict Suitable Conditions for Hydrogenation Reactions. Molecules. 2026; 31(1):75. https://doi.org/10.3390/molecules31010075
Chicago/Turabian StyleMazitov, Daniyar, Timur Gimadiev, Assima Poyezzhayeva, Valentina Afonina, and Timur Madzhidov. 2026. "Conditional Variational AutoEncoder to Predict Suitable Conditions for Hydrogenation Reactions" Molecules 31, no. 1: 75. https://doi.org/10.3390/molecules31010075
APA StyleMazitov, D., Gimadiev, T., Poyezzhayeva, A., Afonina, V., & Madzhidov, T. (2026). Conditional Variational AutoEncoder to Predict Suitable Conditions for Hydrogenation Reactions. Molecules, 31(1), 75. https://doi.org/10.3390/molecules31010075

