Prediction of Corrosion Inhibition Efficiency Based on Machine Learning for Pyrimidine Compounds: A Comparative Study of Linear and Non-linear Algorithms


The corrosion of materials poses a significant challenge in various industries, leading to substantial economic impacts. In this context, pyrimidine compounds emerge as promising, non-toxic, cost-effective, and versatile corrosion inhibitors. However, conventional methods for identifying such inhibitors are typically time-consuming, expensive, and labor-intensive. Addressing this challenge, our study leverages machine learning (ML) to predict pyrimidine compounds corrosion inhibition efficiency (CIE). Using a quantitative structure-property relationship (QSPR) model, we compared 14 linear and 12 non-linear ML algorithms to identify the most accurate predictor of CIE. The bagging regressor model demonstrated superior performance, achieving a root mean square error (RMSE) of 5.38, a mean square error (MSE) of 28.93, a mean absolute error (MAE) of 4.23, and a mean absolute percentage error (MAPE) of 0.05 in predicting the CIE values for pyrimidine compounds. This research marks a significant advancement in corrosion science, offering a novel and efficient ML-based approach as an alternative to traditional experimental methods. It shows that machine learning can quickly and accurately determine how well organic chemical inhibitors like pyrimidine stop material corrosion. This method gives the industry a new perspective and a workable solution to a problem that has existed for a long time.

Keywords: machine learning, corrosion inhibition, pyrimidine, QSPR model, predictive analysis

[1] Wanli Wu FL, Chen R, Yang Z, He Z, Zhou Y. Corrosion resistance of 45 carbon steel enhanced by laser graphene-based coating, Diamond and Related Materials. Diamond Related Materials. 2021;116:108370.

[2] Bupesh Raja PG, Palanikumar K, Rohith Renish R, Ganesh Babu AN. Jashwanth Varma, “Corrosion resistance of corten steel – A review,” Mater. Today Proc., vol. 46 Part 9, p. Pages 3572-3577, 2021,

[3] Ichchou I, Larabi L, Rouabhi H, Harek Y, Fellah A; I. I. and L. L. and H. R. and Y. H. and A. Fellah. Electrochemical evaluation and DFT calculations of aromatic sulfonohydrazides as corrosion inhibitors for XC38 carbon steel in acidic media. J Mol Struct. 2019;1198:126898.

[4] Gutiérrez E, Rodríguez JA, Cruz-Borbolla J, Alvarado-Rodríguez JG, Thangarasu P; E. G. and J. A. R. and J. C.-B. and J. G. A.-R. and P. Thangarasu. Development of a predictive model for corrosion inhibition of carbon steel by imidazole and benzimidazole derivatives. Corros Sci. 2016;108:23–35.

[5] Koch G. 1-Cost of Corrosion. Trends in Oil and Gas Corrosion Research and Technologies. 2017;108:3–30.

[6] Marzorati S, Verotta L, Trasatti SP. Green corrosion inhibitors from natural sources and biomass wastes. Molecules. 2018 Dec;24(1):48.

[7] Quraishi MA, Chauhan DS, Saji VS; M. A. Q. and D. S. C. and V. S. Saji. Heterocyclic biomolecules as green corrosion inhibitors. J Mol Liq. 2021;341:117265.

[8] Sutojo T, Rustad S, Akrom M, Syukur A, Shidik GF, Dipojono HK. “A machine learning approach for corrosion small datasets,” npj Mater. NPJ Mater Degrad. 2023;7(1):18.

[9] Budi S, Akrom M, Trisnapradika GA, Sutojo T, Aji W, Prabowo E. Optimization of Polynomial Functions on the NuSVR Algorithm Based on Machine Learning: Case Studies on Regression Datasets. Sci. J. Informatics. 2023;10(2):151–8.

[10] Akrom M, Rustad S, Saputro AG, Dipojono HK; M. A. and S. R. and A. G. S. and H. K. Dipojono. Data-driven investigation to model the corrosion inhibition efficiency of Pyrimidine-Pyrazole hybrid corrosion inhibitors. Comput Theor Chem. 2023;1229:114307.

[11] M. A. and S. R. and H. {Kresno Dipojono}, “Machine learning investigation to predict corrosion inhibition capacity of new amino acid compounds as corrosion inhibitors,” Results Chem., p. 101126, 2023,

[12] Alamri AH, Alhazmi N. Development of data driven machine learning models for the prediction and design of pyrimidine corrosion inhibitors. J Saudi Chem Soc. 2022;26(6):101536.

[13] Quadri TW, Olasunkanmi LO, Fayemi OE, Lgaz H, Dagdag O, Sherif EM, et al. Predicting protection capacities of pyrimidine-based corrosion inhibitors for mild steel/HCl interface using linear and nonlinear QSPR models. J Mol Model. 2022 Aug;28(9):254.

[14] Zhao H, Zhang X, Ji L, Hu H, Li Q. Quantitative structure-activity relationship model for amino acids as corrosion inhibitors based on the support vector machine and molecular design. Corros Sci. 2014;83:261–71.

[15] Du L, Zhao H, Hu H, Zhang X, Ji L, Li H, et al. Quantum chemical and molecular dynamics studies of imidazoline derivatives as corrosion inhibitor and quantitative structure-activity relationship (QSAR) analysis using the support vector machine (SVM) method. J Theor Comput Chem. 2014;13(2):1450012.

[16] Khan PW, Park SJ, Lee SJ, Byun YC. Electric Kickboard Demand Prediction in Spatiotemporal Dimension Using Clustering-Aided Bagging Regressor. J Adv Transp. 2022;2022:1–15.

[17] Nasir Amin M, Iftikhar B, Khan K, Faisal Javed M, Mohammad AbuArab A, Faisal Rehman M; M. Nasir A. and B. I. and K. K. and M. Faisal J. and A. Mohammad A. and M. Faisal Rehman. Prediction model for rice husk ash concrete using AI approach: boosting and bagging algorithms. Structures. 2023;50:745–57.

[18] Jacob Creutzig P. Wojtaszczyk, “Linear vs. nonlinear algorithms for linear problems,”. J Complexity. 2004;20(6):807–20.

[19] Pedregosa F, et al. “Scikit-learn: Machine Learning in Python,” J. Mach. Learn. Res., vol. 12, no. 85, pp. 2825–2830, 2011,

[Online]. Available:

[20] Al Mamun A, Sohel M, Mohammad N, Haque Sunny MS, Dipta DR, Hossain E. A Comprehensive Review of the Load Forecasting Techniques Using Single and Hybrid Predictive Models. IEEE Access. 2020;8:134911–39.

[21] Hu M, Zhao Y, Khushi M. Zexin and Zhao, Yiqi and Khushi, “A Survey of Forex and Stock Price Prediction Using Deep Learning,”. Appl Syst Innov. 2021;4(1):1.