Predicting corrosion degradation of power system equipment in high humidity environment using XGBoost algorithm with a coupled environmental operational modeling approach Authors: Tingxing Wu, Fei Chen, Dawei Fu, Jishun Xu, Miao Wen, Jiangyao Li, Fan Yang Published: 2026 ABSTRACT Predicting the performance degradation of epoxy resin coatings under complex multi-factor coupling conditions in substations is critical for the reliability assessment and lifespan prediction of power equipment. To achieve accurate prediction of the degradation rate, the failure mechanisms in high-humidity environments were investigated through systematic analysis of the failure morphology and chemical structure evolution of coating samples after different service periods. By coupling key operational parameters including maximum temperature, daily temperature fluctuation amplitude, vibration acceleration, relative humidity, ultraviolet radiation intensity, and coating service time, a protective performance degradation prediction model was developed using XGBoost algorithm with hyperparameters optimized by Tree-structured Parzen Estimator (TPE). The results demonstrate that the TPE algorithm exhibits superior global search capability and efficiency. The TPE-optimized XGBoost model achieved excellent prediction accuracy with a coefficient of determination (R2) of 0.9574 Further comparative experiments revealed that the TPE-XGBoost model significantly outperforms baseline models including Support Vector Regression and Random Forest, while showing comparable accuracy to the Long Short-Term Memory (LSTM) network but with markedly higher computational efficiency. The model also demonstrates excellent stability and generalization capability across multiple time-period validations. Introduction The application of epoxy resin anti-corrosion coatings on the surfaces of key metal components (such as galvanized steel, copper alloys, and aluminum alloys) in power system equipment directly determines the reliability and safety of grid operation1,2. High-humidity environments can significantly accelerate their aging and failure, leading to metal substrate corrosion, loss of equipment functionality, and a substantial increase in maintenance costs3,4. It is estimated that the global economic losses caused by coating protection failure in power equipment amount to tens of billions of dollars annually. However, scientific coating condition assessment and lifespan management can significantly reduce operational and maintenance expenses5,6. Therefore, accurately evaluating and predicting the degradation process of the protective performance of epoxy resin coatings in high-humidity environments is crucial for achieving economical and efficient protection of power equipment7,8. Traditionally, research on the protective performance of epoxy coatings has predominantly focused on laboratory-based accelerated simulation tests. For instance, Dennis Gibhardt et al. conducted hygrothermal aging experiments on epoxy resin coatings, revealing that the water absorption rate of the material decreases at lower temperatures, while water-polymer interactions exhibit complex temperature-dependent characteristics. This phenomenon varies significantly under elevated temperatures, thereby limiting the applicability of traditional predictive models in hygrothermal environments9. In terms of corrosion resistance, Meysam et al. employed electrochemical impedance spectroscopy and potentiodynamic polarization tests to investigate the anti-corrosion performance of epoxy composite coatings reinforced with pure aluminum and composite aluminum powders containing alumina and carbon nanotubes10. Furthermore, Li et al. prepared epoxy composites with varying filler contents and examined the influence of electric fields on the nonlinear conductivity of the materials under different temperatures11, whereas Xin et al. focused on the effects of temperature on space charge distribution and the complex permittivity of epoxy-based composites12. While these studies provide valuable insights into the influence of individual environmental factors on coating performance, substantial evidence indicates that performance evaluations based solely on simulated environmental conditions significantly deviate from the actual protective status of coatings in field-deployed power equipment13, highlighting the limitations of current research methodologies in replicating real-world complex service environments. Moreover, explainable machine learning frameworks integrating multiscale analysis and SHAP interpretability have been recently validated for predicting thermal conductivity in polymer nanocomposites under parameter uncertainty14, yet their application to coupled environmental degradation problems remains unexplored. To acquire more realistic data on coating degradation, some studies have conducted field exposure tests of coating samples on engineering sites. Ismail K et al. applied epoxy resin coatings onto aluminum panels and fully cured them using appropriate thermal cycles, subsequently investigating the effects of physical aging on water absorption and adhesion of the organic coatings15. M.A. Douar et al. evaluated the alternating current flashover performance and surface damage of various insulators made from cycloaliphatic epoxy resin coatings in salt fog environments, discussing the tracking resistance of these polymers to flashover-induced damage16. An et al. studied the evolution of physicochemical and electrical characteristics of fluorinated epoxy resin coatings with ultraviolet irradiation time, establishing the relationship between the changes in surface electrical properties and physicochemical characteristics17. Although these studies have revealed certain specific phenomena, they generally exhibit limitations, such as failing to systematically couple and analyze the combined effects of environmental and operational state parameters and their interactions on coating failure. Furthermore, long-term field tests are time-consuming, costly, and constrained by regional climate variations, making it difficult to meet the demands of engineering assessment. The protective performance degradation of epoxy coatings in real-world high-humidity environments results from the combined effects of complex environmental factors and key operational parameters. Conventional material performance prediction methods often prove inadequate when addressing high-dimensional, highly nonlinear, and multi-factor coupling problems, struggling to accurately capture the complex interactions between environmental and operational factors and their compounded effects on material properties. Machine learning methods offer a new approach to this challenge. With their powerful nonlinear fitting capabilities and feature learning advantages, they demonstrate significant potential in predicting material performance and corrosion aging using coupled environmental-operational data. Xia et al. applied a genetic algorithm-optimized support vector machine to predict the bending strength of UV-cured epoxy-based pipe repair materials under coupled process and environmental factors, demonstrating that evolutionary optimization can effectively map multi-factor inputs to material performance18. Liu et al. have developed a series of stochastic ensemble and hybrid machine learning multiscale frameworks that effectively handle multi-factor coupling and uncertainty in polymer composite performance prediction19,20. Karimi et al. systematically evaluated the performance of multiple machine learning models in correlating accelerated aging data with natural aging data of glass fiber/epoxy composites, employing five models—Linear Regression, Polynomial Regression, Artificial Neural Networks, Random Forest Regression, and Support Vector Regression—to predict natural aging time based on accelerated aging data21. The study found that the Random Forest regressor most effectively established the correlation between the two and accurately predicted long-term natural aging time. Wang et al. extended the application of machine learning to durability prediction of FRP-concrete bonded structures in humid environments22. Based on experimental data, the study utilized Bayesian-optimized Artificial Neural Networks and ensemble models to achieve accurate prediction of bond strength and effective classification of failure modes, respectively, and further derived practical prediction equations through the M5P model tree, fully validating the effectiveness and practicality of machine learning in predicting the long-term performance of structural connections in complex environments. The value of data-driven and reliability-based methodologies has also been demonstrated beyond polymer science. For example, deep learning has enabled automated rail defect classification with over 90% accuracy23, while reliability-based topology optimization frameworks have successfully accounted for material uncertainties and multi-factor coupling (thermal-mechanical) in structural design24. These examples further support the adoption of machine learning for tackling multi-factor coupling problems in epoxy coating degradation. This study aims to develop a predictive method for epoxy coating degradation in high-humidity substations by coupling environmental and operational factors. The main contributions are threefold. First, we systematically identify the key factors governing degradation—maximum temperature, daily temperature fluctuation, vibration, relative humidity, UV intensity, and service time—through failure morphology and chemical structure analysis. Second, we develop a TPE-optimized XGBoost model that accurately predicts weekly corrosion rates under multi-factor coupling. Third, we employ SHAP analysis to interpret the model, revealing synergistic effects such as hygrothermal synergy and the amplification of vibration-induced microcrack propagation by cyclic thermal stress. This research provides a theoretical basis and technical support for condition assessment, remaining life prediction, and maintenance strategy optimization of power equipment coatings, thereby improving grid reliability under harsh conditions. Methods Factors influencing corrosion of epoxy resin coatings The protective performance of epoxy anti-corrosive coatings degrades through the combined effects of the coating material’s properties and its service environment. At the micro level, the chemical structural integrity of the coating plays a decisive role in its protective performance. Firstly, the thermal stability of the epoxy resin matrix and its reinforcing materials exhibits a negative correlation with temperature, following the Arrhenius law, where the aging rate significantly accelerates with increasing temperature25,26. Secondly, the penetration of environmental moisture accelerates the coating failure process27,28. Once liquid water accumulates on the coating surface, it not only dissolves ionic compounds from the fillers, forming a localized alkaline microenvironment, but also promotes the attack of hydroxyl ions (OH−) on the molecular chains of the resin, initiating hydrolysis reactions, as shown in Eq. (1):1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{R}} - {\mathrm{CH}}({\mathrm{O}}){\mathrm{CH}}_{2} + {\mathrm{H}}_{2} {\mathrm{O}}\xrightarrow{{{\mathrm{OH}}^{ - } }}{\mathrm{R}} - {\mathrm{CH}}({\mathrm{OH}}){\mathrm{CH}}_{2} {\mathrm{OH}}$$\end{document} Concurrently, OH− attacks the ester bonds, leading to the chemical degradation of the resin matrix, as presented in Eq. (2).2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{R}} - {\mathrm{C}}( = {\mathrm{O}}) - {\mathrm{O}} - {\mathrm{R}}^{\prime } + {\mathrm{H}}_{2} {\mathrm{O}}\xrightarrow{{{\mathrm{OH}}^{ - } }}{\mathrm{R}} - {\mathrm{C}}( = {\mathrm{O}}){\mathrm{OH}} + {\mathrm{HO}} - {\mathrm{R}}^{\prime }$$\end{document} Furthermore, swelling-shrinkage cycles of hygroscopic fillers within the coating generate internal stresses, triggering microcrack propagation. Consequently, fluctuations in environmental humidity and the duration of liquid water contact significantly impact coating failure. When environmental factors include ultraviolet (UV) radiation, the failure mechanism also involves photochemical processes. Upon absorbing photon energy, epoxy molecules transition to an excited state and subsequently undergo a series of photo-oxidative chain reactions with environmental oxygen9. The primary degradation pathways are shown in Eqs. (3)–(6). This process irreversibly leads to the scission of polymer chains, a reduction in molecular weight, and the disruption of the three-dimensional cross-linked network. Macroscopically, this manifests as coating chalking, erosion, and ultimately, the complete loss of its barrier function against corrosive media.3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{R}} - {\mathrm{CH}}_{2} - {\mathrm{CH}}\left( {{\mathrm{R}}^{\prime } } \right) - {\mathrm{R}}^{{\prime \prime }} \xrightarrow{{{\mathrm{h}}\nu }}{\mathrm{R}} - {\mathrm{CH}}_{2} \cdot + \cdot {\mathrm{CH}}\left( {{\mathrm{R}}^{\prime } } \right) - {\mathrm{R}}^{{\prime \prime }}$$\end{document}4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{R}} - {\mathrm{CH}} \cdot + {\mathrm{O}}_{2} \to {\mathrm{R}} - {\mathrm{CH}} - {\mathrm{OO}} \cdot$$\end{document}5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{R}} - {\mathrm{CH}} - {\mathrm{OO}} \cdot + {\mathrm{R}}^{{\prime \prime \prime }} {\mathrm{H}} \to {\mathrm{R}} - {\mathrm{CH(OOH)}} + {\mathrm{R}}^{{\prime \prime \prime }} \cdot$$\end{document}6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{R}} - {\mathrm{CH(OOH)}}\xrightarrow{{{\mathrm{h}}\nu \;{\mathrm{or}}\;\Delta }}{\mathrm{R}} - {\mathrm{CHO}} + \cdot {\mathrm{OH}}$$\end{document} Complicating matters further, the cyclic swelling and shrinkage of hygroscopic fillers within the coating can generate internal stresses. Under prolonged exposure, these stresses initiate and propagate microcracks. Consequently, the fluctuation frequency of environmental humidity and the duration of saturated conditions significantly influence the degradation of the coating’s physical integrity. At the macroscopic scale, the introduction of mechanical stress directly provides rapid pathways for the ingress of corrosive media29. In service, electrical equipment is subjected to multiple loads—including persistent vibration from electromagnetic forces, mechanical shock from switching operations, and thermal cycling due to varying operational loads—collectively forming a complex, multi-axial alternating stress field. This stress field accelerates the propagation of microcracks and compromises the adhesion between the coating and the substrate. Based on the aforementioned multi-scale and multi-physics analysis of the failure mechanisms, it is evident that the degradation of the protective performance of epoxy coatings essentially represents the cumulative and interactive effects of thermal, moisture, radiation, and mechanical factors over time. Therefore, to develop an accurate performance prediction model, this study identifies the following core influencing parameters: maximum temperature, daily temperature fluctuation amplitude, vibration acceleration, relative humidity, ultraviolet radiation intensity, and coating service time. Coating service time is defined as the cumulative calendar time since the last major coating renewal, regardless of equipment operation. For partial recoating of a monitoring area, its service time is reset to zero. TPE-XGBoost model principle XGBoost model To accurately predict the performance degradation of epoxy coatings under multi-factor coupled conditions, an algorithm capable of efficiently handling high-dimensional features, capturing complex nonlinear relationships, and effectively preventing overfitting is required. The XGBoost model is a machine learning algorithm developed from the Gradient Boosted Decision Trees (GBDT) framework30. Through a series of systematic optimizations, it significantly enhances computational efficiency and model performance. XGBoost explicitly incorporates a regularization term that penalizes tree structure complexity into the objective function to prevent overfitting, while also utilizing second-order derivative information for optimization, thereby improving training speed and accuracy. The model structure diagram is shown in Fig. 1. Fig. 1(a) Schematic diagram of the XGBoost ensemble structure; (b) Schematic illustration of a single regression tree. (a) Schematic diagram of the XGBoost ensemble structure; (b) Schematic illustration of a single regression tree. XGBoost is trained using a forward stagewise additive modeling approach. Its core concept involves sequentially adding new trees and performing feature splits during the model training process to build the ensemble, with its computational principle illustrated in Fig. 1a. During training, the model continuously calculates the loss associated with leaf nodes and selects the node yielding the greatest gain for splitting. When K trees are trained, a sample’s features map to a corresponding leaf node in each tree, with each leaf node assigned a specific score. The final prediction for the training set is obtained by summing the scores from all corresponding trees. For a dataset comprising n samples and m features, where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_{i}$$\end{document} represents the feature vector of the i-th sample and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_{i}$$\end{document} denotes the actual aging rate, the model, composed of K decision trees, can be expressed as shown in Eq. (7).7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_{i} = \theta (x_{i} ) = \sum\limits_{{k = 1}}^{k} {f_{k} } (x_{i} ),f_{k} \in F$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F = \{ f(x) = \omega _{{_{{q(x)}} }} \}$$\end{document} is the space of regression trees, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega _{{_{{q(x)}} }}$$\end{document} is the vector of weights on all leaf nodes of a tree, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_{i}$$\end{document} is the predicted output of the model, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_{i}$$\end{document} is the sample input, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$f_{k}$$\end{document} represents the k-th regression tree. Each regression tree is defined by its structure q (which maps a sample to a leaf index) and its leaf weights ω. Figure 1b illustrates a single regression tree, where the path indicates \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$q\left( x \right) = 2$$\end{document} and ω are leaf weights. A loss function is defined to measure the deviation between the true value and the predicted value. Smaller loss values indicate smaller deviations (better performance). The loss function is given in Eq. (8):8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$L(\varphi ) = \mathop \sum \limits_{{i = 1}}^{N} l(\hat{y}_{i} ,y_{i} ) + \mathop \sum \limits_{{k = 1}}^{k} {{\Omega }}(f_{k} )$$\end{document}where l is the training loss function, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$l(\hat{y}_{i} ,y_{i} )$$\end{document} represents the difference between the predicted value \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hat{y}_{i}$$\end{document} and the actual value \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$y_{i}$$\end{document}. Ω is the regularization term \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${{\Omega }}(f_{{\mathrm{k}}} ) = \gamma T + \frac{1}{2}\lambda \parallel \omega \parallel ^{2} + \alpha \parallel \omega \parallel _{1}$$\end{document}, where T is the number of leaves in tree fk, ω is the vector of leaf weights, γ penalizes each additional leaf, λ is the L2 regularization coefficient, and α is the L1 regularization coefficient. The L2 term encourages small and smooth leaf weights, while the L1 term promotes sparsity. Both are incorporated into the objective function during tree construction and influence the gain calculation for each split, collectively preventing overfitting. In the XGBoost model, to control decision tree generation and avoid overfitting, the following eight parameters need to be determined. The meaning of parameters and their common search ranges are shown in Table 1 below. To control the model’s behavior and better adapt it to the coating aging data, a set of hyperparameters require optimization. These parameters collectively determine the model’s capacity, learning process, and regularization strength. The search ranges in Table 1 are defined based on common practices in XGBoost tuning literature31 and preliminary experiments. The key hyperparameters considered in this study, along with their descriptions and search ranges, are listed in Table 1. Table 1Key hyperparameters, their descriptions, and search ranges.ParameterExplanationSearch rangen_estimatorsNumber of decision trees[100, 600]max_depthMaximum depth of a decision tree[2, 11]learning_rateLearning rate, controls the contribution of each tree to the final prediction[0.01, 0.2]subsampleSubsample ratio, the proportion of samples used to train each tree[0.7, 1.0]colsample_bytreeFeature sampling ratio, the proportion of features used to train each tree[0.7, 1.0]alphaL1 regularization term coefficient[0, 5]lambdaL2 regularization term coefficient[0, 5]min_child_weightMinimum sum of sample weights in a leaf node[3, 20]gammaReduce the minimum loss required for splitting[0, 5] Table 1Key hyperparameters, their descriptions, and search ranges.ParameterExplanationSearch rangen_estimatorsNumber of decision trees[100, 600]max_depthMaximum depth of a decision tree[2, 11]learning_rateLearning rate, controls the contribution of each tree to the final prediction[0.01, 0.2]subsampleSubsample ratio, the proportion of samples used to train each tree[0.7, 1.0]colsample_bytreeFeature sampling ratio, the proportion of features used to train each tree[0.7, 1.0]alphaL1 regularization term coefficient[0, 5]lambdaL2 regularization term coefficient[0, 5]min_child_weightMinimum sum of sample weights in a leaf node[3, 20]gammaReduce the minimum loss required for splitting[0, 5] Key hyperparameters, their descriptions, and search ranges. Tree-structured Parzen Estimator The TPE optimization method is a sequential model-based optimization technique grounded in Bayesian principles32, widely employed for hyperparameter tuning of models. In contrast to traditional grid search or random search, TPE guides the parameter search by constructing a probabilistic surrogate model of the objective function. It can adaptively adjust the size of the parameter search space and identify the global optimum with fewer evaluations. Its advantages lie in its ability to handle discrete parameters and its computational efficiency, making it well-suited for optimizing hyperparameters in deep learning models. The specific procedure is as follows:Initialize the parameter space and perform random sampling: Define the search space for hyperparameters, where each dimension corresponds to the value range of a hyperparameter. Randomly generate an initial set of parameter configurations \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left\{ {x_{1} ,x_{2} ,x_{3} , \ldots ,x_{n} } \right\}$$\end{document} and evaluate their performance \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left\{ {f\left( {x_{1} } \right),f\left( {x_{2} } \right),f\left( {x_{3} } \right), \ldots ,f\left( {x_{n} } \right)} \right\}$$\end{document}.Divide observations and compute kernel densities: Based on the performance of the observations, divide them into two groups: the good-performing group G and the bad-performing group B. Use the Parzen window method to construct kernel density estimates for the distributions of G and B, respectively. The distribution of the good group is denoted by l(x), and the bad group by g(x), as shown in Eq. (9):9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{gathered} l(x) = \frac{1}{{|{\mathrm{G}}|}}\sum\limits_{{x_{i} \in G}} K \left( {x,x_{i} ,h} \right) \hfill \\ g(x) = \frac{1}{{|{\mathrm{B}}|}}\sum\limits_{{x_{i} \in B}} K \left( {x,x_{i} ,h} \right) \hfill \\ \end{gathered}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$K(x,x_{i} ,h)$$\end{document} is the kernel function and h is the bandwidth parameter.Evaluate and select a new sampling point: Calculate the Expected Improvement (EI) for each possible parameter configuration. EI is an indicator measuring the potential improvement of a parameter configuration. Select the parameter configuration with the maximum EI as the new sampling point, as shown in Eq. (10):10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$EI(X) = \gamma l(x) - (1 - \gamma )g(x)$$\end{document}Evaluate the new sampling point and update observations: Evaluate the model’s performance using the selected new parameter configuration. Add the evaluation result to the observations for constructing the surrogate model in the next iteration. Stop the experiment if the preset number of iterations is reached or if the performance requirement is satisfied. Initialize the parameter space and perform random sampling: Define the search space for hyperparameters, where each dimension corresponds to the value range of a hyperparameter. Randomly generate an initial set of parameter configurations \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left\{ {x_{1} ,x_{2} ,x_{3} , \ldots ,x_{n} } \right\}$$\end{document} and evaluate their performance \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left\{ {f\left( {x_{1} } \right),f\left( {x_{2} } \right),f\left( {x_{3} } \right), \ldots ,f\left( {x_{n} } \right)} \right\}$$\end{document}. Initialize the parameter space and perform random sampling: Define the search space for hyperparameters, where each dimension corresponds to the value range of a hyperparameter. Randomly generate an initial set of parameter configurations \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left\{ {x_{1} ,x_{2} ,x_{3} , \ldots ,x_{n} } \right\}$$\end{document} and evaluate their performance \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\left\{ {f\left( {x_{1} } \right),f\left( {x_{2} } \right),f\left( {x_{3} } \right), \ldots ,f\left( {x_{n} } \right)} \right\}$$\end{document}. Divide observations and compute kernel densities: Based on the performance of the observations, divide them into two groups: the good-performing group G and the bad-performing group B. Use the Parzen window method to construct kernel density estimates for the distributions of G and B, respectively. The distribution of the good group is denoted by l(x), and the bad group by g(x), as shown in Eq. (9):9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{gathered} l(x) = \frac{1}{{|{\mathrm{G}}|}}\sum\limits_{{x_{i} \in G}} K \left( {x,x_{i} ,h} \right) \hfill \\ g(x) = \frac{1}{{|{\mathrm{B}}|}}\sum\limits_{{x_{i} \in B}} K \left( {x,x_{i} ,h} \right) \hfill \\ \end{gathered}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$K(x,x_{i} ,h)$$\end{document} is the kernel function and h is the bandwidth parameter. Divide observations and compute kernel densities: Based on the performance of the observations, divide them into two groups: the good-performing group G and the bad-performing group B. Use the Parzen window method to construct kernel density estimates for the distributions of G and B, respectively. The distribution of the good group is denoted by l(x), and the bad group by g(x), as shown in Eq. (9):9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{gathered} l(x) = \frac{1}{{|{\mathrm{G}}|}}\sum\limits_{{x_{i} \in G}} K \left( {x,x_{i} ,h} \right) \hfill \\ g(x) = \frac{1}{{|{\mathrm{B}}|}}\sum\limits_{{x_{i} \in B}} K \left( {x,x_{i} ,h} \right) \hfill \\ \end{gathered}$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$K(x,x_{i} ,h)$$\end{document} is the kernel function and h is the bandwidth parameter. Evaluate and select a new sampling point: Calculate the Expected Improvement (EI) for each possible parameter configuration. EI is an indicator measuring the potential improvement of a parameter configuration. Select the parameter configuration with the maximum EI as the new sampling point, as shown in Eq. (10):10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$EI(X) = \gamma l(x) - (1 - \gamma )g(x)$$\end{document} Evaluate and select a new sampling point: Calculate the Expected Improvement (EI) for each possible parameter configuration. EI is an indicator measuring the potential improvement of a parameter configuration. Select the parameter configuration with the maximum EI as the new sampling point, as shown in Eq. (10):10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$EI(X) = \gamma l(x) - (1 - \gamma )g(x)$$\end{document} Evaluate the new sampling point and update observations: Evaluate the model’s performance using the selected new parameter configuration. Add the evaluation result to the observations for constructing the surrogate model in the next iteration. Stop the experiment if the preset number of iterations is reached or if the performance requirement is satisfied. Evaluate the new sampling point and update observations: Evaluate the model’s performance using the selected new parameter configuration. Add the evaluation result to the observations for constructing the surrogate model in the next iteration. Stop the experiment if the preset number of iterations is reached or if the performance requirement is satisfied. TPE−XGBoost model construction steps Based on the introduction of the XGBoost algorithm, it is known that its key hyperparameters (such as learning rate, tree depth, regularization coefficients, etc.) require careful selection and will directly impact the model’s predictive performance. To enhance the model’s predictive performance, TPE is first employed to perform intelligent optimization of XGBoost’s hyperparameters. Subsequently, the optimized XGBoost model is used to train and predict the data. The flowchart is shown in Fig. 2. Fig. 2Flowchart of XGBoost hyperparameter optimization and modeling. Flowchart of XGBoost hyperparameter optimization and modeling. Results and discussion Data sources The field study was conducted at the 220 kV substation in Sanya, Hainan, China, over a period of 120 weeks from January 2023 to April 2025, yielding a dataset of 120 weekly samples. Acquisition of environmental, operational, and degradation data The environmental and operational parameters for this study were sourced from multiple reliable monitoring systems. Data for maximum daily temperature, daily temperature fluctuation amplitude, relative humidity, and ultraviolet radiation intensity were obtained from the substation’s local integrated environmental monitoring system and nearby meteorological stations, respectively. The coating service time, determined from equipment maintenance records, was recorded as the cumulative number of days since the last major coating maintenance or the commissioning of the monitored equipment component. The vibration acceleration of the equipment was measured by industrial-grade tri-axial IEPE accelerometers (Model: PCB 356A15) installed on the equipment structure, with the sensor data were acquired and synchronized via the substation’s existing condition monitoring network. Degradation indicator This study quantifies the in-service degradation of epoxy coatings using a macroscopic indicator that integrates the cumulative effects of micro-mechanisms (such as blistering, cracking, and delamination) and directly correlates with loss of protective function. To operationalize this, a fixed high-definition camera system was deployed within a substation to capture images of specific monitoring areas on equipment surfaces at weekly intervals. The coating degradation rate is then determined by calculating the change in coating failure area between consecutive monitoring cycles. Addressing the challenges posed by the irregular morphology of failure areas and their susceptibility to interference from ambient lighting and surface glare, this study employs a digital image processing workflow to accurately extract the failure area. The core steps are illustrated in Fig. 3. First, the target region within the original monitoring image is cropped and converted to grayscale (Fig. 3a) to eliminate irrelevant background information and preliminarily standardize the color space. Subsequently, an adaptive binarization algorithm is applied to the grayscale image (Fig. 3b). Specifically, the algorithm employs the local mean thresholding method. For a pixel at coordinate (x, y), the threshold T(x, y) is calculated as:11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$T(x,y) = {\mathrm{mean}}(I(x^{\prime},y^{\prime})) - C$$\end{document}where \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(x^{\prime},y^{\prime})$$\end{document} belong to a square neighborhood window of size s × s centered at (x,y). In this study, s = 15 pixels and C = 10. The algorithm is implemented using the OpenCV library’s cv2.adaptiveThreshold function. This locally adaptive design dynamically adjusts the threshold based on local pixel intensity and contrast, enabling accurate identification of coating failure features while remaining robust against uneven illumination and minor surface contaminants. Fig. 3Corrosion image processing steps. (a) Grayscale converted target region, (b) Result of adaptive binarization. Corrosion image processing steps. (a) Grayscale converted target region, (b) Result of adaptive binarization. After binarization, the image is represented as a matrix composed of pixel values, where 0 (black) represents the failure area (i.e., exposed substrate) and 1 (white) represents the intact coating area. The number of zero-value pixels in this matrix directly gives the pixel count of the failure area. Finally, the actual physical area of the failure region is obtained through proportional conversion, calculated using the following formula:12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\text{ Actual}}\;{\mathrm{Failure}}\;{\text{Area }} = \frac{{{\text{ Number}}\;{\mathrm{of}}\;{\mathrm{Pixels}}\;{\mathrm{in}}\;{\mathrm{Failure}}\;{\text{Region }}}}{{{\text{ Total}}\;{\mathrm{Number}}\;{\mathrm{of}}\;{\mathrm{Pixels}}\;{\mathrm{in}}\;{\mathrm{Reference}}\;{\text{Area }}}} \times {\mathrm{Actual}}\;{\mathrm{Area}}\;{\mathrm{of}}\;{\mathrm{Reference}}\;{\text{Area }}$$\end{document} Here, the actual area of the equipment’s monitoring reference area is pre-calibrated, and its total pixel count is obtained by segmenting this reference area in the original image. This method transforms the challenging direct measurement of irregular geometric areas into a precise pixel counting problem. The target variable for prediction, the corrosion growth rate was derived from the time-series of cumulative corrosion area At. For each consecutive weekly monitoring interval ending at time t, the rate was calculated using backward difference:13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R_{t} = A_{t} - A_{{t - 1}}$$\end{document}where At and At−1 are the cumulative corrosion areas at the current and previous monitoring points, respectively. The resulting Rt has units of area per week and represents the weekly degradation speed. The rate curve of actual corrosion area is shown in Fig. 4. Fig. 4Variation curve of the actual corrosion rate over time. Variation curve of the actual corrosion rate over time. Data preprocessing and evaluation indicators Dataset description The compiled dataset comprises 120 weekly records. The descriptive statistics of the six input features are summarized in Table 2, demonstrating that the dataset covers a wide and representative range of operating conditions typical of a coastal, high-humidity substation environment. Table 2Descriptive statistics of the input variables and the target.VariableSymbolUnitMinMaxMeanMaximum temperatureT_max°C16.835.828.5Daily temp. fluctuationΔT°C2.012.86.7Relative humidityRH%629885UV intensityUVW/m21.27.64.5Vibration accelerationVibg0.010.120.03Coating service timetweek112060 Table 2Descriptive statistics of the input variables and the target.VariableSymbolUnitMinMaxMeanMaximum temperatureT_max°C16.835.828.5Daily temp. fluctuationΔT°C2.012.86.7Relative humidityRH%629885UV intensityUVW/m21.27.64.5Vibration accelerationVibg0.010.120.03Coating service timetweek112060 Descriptive statistics of the input variables and the target. Data preprocessing First, outliers and missing values were removed from the original dataset to ensure data quality and accuracy. Then, data normalization was performed to map features with different scales and ranges into [0,1], enhancing model performance and preventing certain features from exerting excessive influence on the model. The calculation formula is shown in Eq. (12).14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_{{{\mathrm{normalized}}}} = \frac{{x - x_{{\min }} }}{{x_{{\max }} - x_{{\min }} }}$$\end{document} In the equation, x represents the raw data, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_{{\max }}$$\end{document} is the maximum value, and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x_{{\min }}$$\end{document} is the minimum value. Evaluation indicators This paper selects four evaluation metrics for the model: Root Mean Square Error (RMSE), Mean Absolute Error (MAE), R-squared (R2) and Mean Absolute Percentage Error (MAPE). The specific calculations are shown in Eqs. (13–16):15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$RMSE = \sqrt {\frac{1}{n}\sum\limits_{{i = 1}}^{n} {(y_{i} - \hat{y}_{i} )^{2} } }$$\end{document}16\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$MAE = \frac{1}{n}\sum\limits_{{i = 1}}^{n} | y_{i} - \hat{y}_{i} |$$\end{document}17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$R^{2} = 1 - \frac{{\sum\nolimits_{{i = 1}}^{n} {(y_{i} - \hat{y}_{i} )^{2} } }}{{\sum\nolimits_{{i = 1}}^{n} {(y_{i} - \bar{y})^{2} } }}$$\end{document}18\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$MAPE = \frac{{100\% }}{n}\sum\limits_{{i = 1}}^{n} {\left| {\frac{{y_{i} - \hat{y}_{i} }}{{y_{i} }}} \right|}$$\end{document} These metrics provide complementary information on prediction accuracy, covering absolute error (RMSE, MAE), explained variance (R2), and relative error (MAPE). Data splitting strategy To objectively evaluate the performance of machine learning models in time-series forecasting of coating degradation and to ensure the robustness of the evaluation, the dataset was chronologically partitioned into three independent subsets: a training set, a validation set, and a test set. Specifically, 90 data points from January 2023 to September 2024 constituted the training set for model fitting. 15 data points from October 2024 to January 2025 formed the validation set, used exclusively for hyperparameter optimization via TPE. Another 15 data points from February 2025 to April 2025 were held out as the test set for the final assessment of the model’s generalization and predictive capability. This partitioning simulates a realistic predictive maintenance scenario, where models are trained only on historical data to forecast future degradation. Model performance was quantified by calculating a suite of evaluation metrics on the training, validation, and test sets. Furthermore, SHAP analysis was employed for model interpretability, aiming to identify the key features influencing the coating corrosion rate and their interactions from a data-driven perspective, thereby providing insights into the underlying degradation mechanisms. Comparison of optimization algorithms Hyperparameter optimization is crucial for the performance of machine learning models. To analyze the impact of the TPE algorithm on model accuracy, we compare it with three commonly used optimization algorithms—the Bayesian Optimization Algorithm (BOA), Particle Swarm Optimization (PSO), and the Covariance Matrix Adaptation Evolution Strategy (CMA-ES)—by optimizing the same XGBoost hyperparameter space (see Table 1). The evaluation criteria were RMSE, MAE, and total computation time of the parameter sets obtained by each optimization algorithm on the test set. In the hyperparameter optimization study, the parameter settings for each algorithm were configured as follows: the BOA was set with a maximum of 200 iterations, using the upper confidence bound acquisition function with a kappa coefficient of 2.576 and an exploration factor of 0.02; the PSO was configured with a population size of 10, a maximum of 200 iterations, an inertia weight of 0.9, and both the individual and social learning factors set to 2.0; the CMA-ES algorithm employed a population size of 10, a maximum of 200 iterations, and an initial step size set to 20% of the parameter range for each dimension; the TPE used 20 initial random trials and a model complexity parameter (gamma) of 0.25. After hyperparameter optimization of the XGBoost model using the four algorithms, their evaluation metrics and prediction accuracy on the test set were compared, with the results shown in Fig. 5; Table 3. Fig. 5Performance comparison of hyperparameter optimization algorithms. Performance comparison of hyperparameter optimization algorithms. Table 3Prediction accuracy and evaluation metrics of different optimization algorithms on the test set.optimization methodsOptimized XGBoost hyperparametersRMSEMAETime/sTPE[287, 10, 0.0345, 0.783, 0.892, 1.874, 3.245, 8, 2.1]0.172360.10684487BOA[392, 6, 0.187, 0.956, 0.873, 2.644, 3.730, 9, 3.8]0.302330.13497596CMA-ES[234, 8, 0.112, 0.812, 0.765, 5.000, 2.891, 7, 1.4]0.534790.284981184PSO[156, 7, 0.048, 0.698, 0.824, 3.751, 0.865, 6, 0.7]1.005730.43298 Table 3Prediction accuracy and evaluation metrics of different optimization algorithms on the test set.optimization methodsOptimized XGBoost hyperparametersRMSEMAETime/sTPE[287, 10, 0.0345, 0.783, 0.892, 1.874, 3.245, 8, 2.1]0.172360.10684487BOA[392, 6, 0.187, 0.956, 0.873, 2.644, 3.730, 9, 3.8]0.302330.13497596CMA-ES[234, 8, 0.112, 0.812, 0.765, 5.000, 2.891, 7, 1.4]0.534790.284981184PSO[156, 7, 0.048, 0.698, 0.824, 3.751, 0.865, 6, 0.7]1.005730.43298 Prediction accuracy and evaluation metrics of different optimization algorithms on the test set. As shown in Fig. 5, the prediction errors of all four hyperparameter optimization algorithms demonstrate a consistent decreasing trend with increasing iterations, confirming effective convergence across all methods. Leveraging its swarm intelligence mechanism, the PSO algorithm exhibits rapid convergence during the initial search phase. However, compared to TPE, it stabilizes at a relatively higher error level, indicating its susceptibility to local optima in complex hyperparameter spaces. The CMA-ES algorithm demonstrates robust global exploration capability with a steadily descending convergence curve, yet its final accuracy remains inferior to the TPE algorithm. The BOA algorithm maintains continuous improvement with its Bayesian model-based guidance strategy effectively preventing premature convergence. Nevertheless, each iteration requires constructing a surrogate model and optimizing the acquisition function, necessitating more iterations while still achieving inferior optimization performance compared to TPE. In contrast, the TPE algorithm achieves the lowest RMSE and MAE with the fewest iterations through its efficient sequential modeling mechanism, demonstrating superior search efficiency and optimization capability in this specific high-dimensional hyperparameter space. To evaluate the generalization performance of optimization algorithms across different temporal segments, this study used the final 15 weeks as the test set and applied four optimization algorithms for hyperparameter tuning of XGBoost models followed by prediction. The comparative prediction errors of the four models are shown in Fig. 6. The multi-segment experimental results reveal that PSO-XGBoost exhibits significant fluctuations in prediction errors across different periods, consistent with the algorithm’s theoretical limitation of easily converging to local optima, confirming its ineffectiveness for corrosion rate prediction. While both CMA-ES-XGBoost and BOA-XGBoost demonstrate robust performance with relatively stable error fluctuations, they require considerable computational resources and generally achieve inferior convergence accuracy compared to TPE-XGBoost. In contrast, the TPE-XGBoost model achieves the lowest and most stable prediction errors across most data segments. From a computational efficiency perspective, although its single-segment tuning time is slightly higher than that of PSO and CMA-ES methods, it remains within acceptable engineering limits, demonstrating exceptional sample efficiency and cross-temporal generalization capability. In summary, the comprehensive multi-segment experimental results indicate that TPE-XGBoost outperforms the other three optimization methods in both prediction accuracy and generalization ability, making it more suitable for time-series prediction of corrosion rates of epoxy coatings on power equipment. Fig. 6Comparison of prediction errors from different optimization algorithms across multiple time segments. Comparison of prediction errors from different optimization algorithms across multiple time segments. The training process employed early stopping with a tolerance of 0.001 improvement in validation RMSE over 10 consecutive rounds. As shown in Fig. 7, both training and validation RMSE decrease rapidly during the first 80 rounds, followed by a sustained but slower decline until round 287, after which the validation RMSE stabilizes and shows no further improvement. The final test RMSE of 0.172 is close to the validation RMSE at the stopping point, indicating good generalization performance. Fig. 7Training and validation RMSE curves of the TPE-optimized XGBoost model. Training and validation RMSE curves of the TPE-optimized XGBoost model. Time-series cross-validation To rigorously evaluate the generalization capability of the proposed model and to address the potential temporal bias of a single chronological split, we implemented rolling-origin (expanding window) time-series cross-validation. With 120 weekly samples, we performed 4 folds as follows: the initial training window comprised the first 60 weeks; for each subsequent fold, the training window was expanded by 15 weeks, while the testing window was fixed at 15 weeks. This yielded four test periods: Weeks 61–75, 76–90, 91–105, and 106–120. The model was retrained on each expanding training set using the same TPE-optimized hyperparameters, and the performance metrics were recorded. The results are summarized in Table 4. The mean ± standard deviation across the four folds are: R2 = 0.951 ± 0.008, RMSE = 0.181 ± 0.015, MAE = 0.112 ± 0.009. These values closely match the performance on the original held-out test set, confirming that the model is not overfitted to a specific temporal split and that it generalizes well to unseen future periods. Table 4Rolling-origin time-series cross-validation results (4 folds).FoldTraining weeksTesting weeks R 2 RMSEMAE11–6061–750.9480.1850.11521–7576–900.9580.1650.10431–9091–1050.9520.1800.11141–105106–1200.9490.1830.114 Table 4Rolling-origin time-series cross-validation results (4 folds).FoldTraining weeksTesting weeks R 2 RMSEMAE11–6061–750.9480.1850.11521–7576–900.9580.1650.10431–9091–1050.9520.1800.11141–105106–1200.9490.1830.114 Rolling-origin time-series cross-validation results (4 folds). Model performance comparison To validate the feasibility and accuracy of the TPE-XGBoost method for predicting corrosion rates in time-series data, the TPE-XGBoost model was compared with Support Vector Regression (SVR), Long Short-Term Memory (LSTM), and Random Forest models. All models were trained using identical data samples. The trained models were then evaluated by comparing their performance metrics and computational results on the test set (see Table 5; Fig. 8), enabling a comprehensive assessment of the performance differences among these models in corrosion prediction.All models were trained and tested on the same hardware: an Intel Core i7-13700 K CPU with 32 GB RAM and an NVIDIA GeForce RTX 4070 GPU. GPU acceleration was enabled for all models to ensure a fair comparison of training times. The baseline models were configured as follows: the SVR model used an RBF kernel with hyperparameters tuned via grid search, where the regularization parameter C was searched in [0.1, 100] and gamma in [0.001, 0.1]. The Random Forest model employed 200 trees with maximum depth tuned in5,20. The LSTM model consisted of two LSTM layers with 64 and 32 hidden units, a sequence length of 4 weeks, dropout of 0.2 after each layer, and was trained using the Adam optimizer with a learning rate of 0.001, mean squared error loss, batch size of 16, and early stopping with patience of 10 epochs. All models used the same training/validation/test split and the same Min-Max normalization as the proposed TPE-XGBoost model. Table 5Summary of evaluation metrics for the comparative models.modelRMSEMAE R 2 MAPETraining times/sTPE-XGBoost model0.172360.106840.957414.657%487SVR model0.653130.561290.3894524.41%752LSTM model0.153270.085160.966403.757%2461Random Forest model0.271680.244510.8957410.657%156 Table 5Summary of evaluation metrics for the comparative models.modelRMSEMAE R 2 MAPETraining times/sTPE-XGBoost model0.172360.106840.957414.657%487SVR model0.653130.561290.3894524.41%752LSTM model0.153270.085160.966403.757%2461Random Forest model0.271680.244510.8957410.657%156 Summary of evaluation metrics for the comparative models. Fig. 8Comparison of corrosion rate predictions from different models. (a) TPE-XGBoost model, (b) SVR model, (c) LSTM model, (d) Random Forest model. Comparison of corrosion rate predictions from different models. (a) TPE-XGBoost model, (b) SVR model, (c) LSTM model, (d) Random Forest model. As shown in Table 5; Fig. 8, among the four comparative models, the Support Vector Regression (SVR) demonstrates suboptimal prediction performance, failing to effectively capture the nonlinear variation patterns of corrosion rates in the time series. While the Random Forest model improves prediction stability to some extent, its outputs exhibit systematic deviation with limited capability in fitting temporal dynamic characteristics. Both the LSTM and TPE-XGBoost models demonstrate superior regression performance, with R2 values exceeding 0.9, indicating high overall fitting accuracy. Specifically, the LSTM model explicitly models temporal dependencies through its gated mechanisms, effectively capturing long-term dependencies within the sequence. In contrast, the TPE-XGBoost model continuously optimizes error propagation through its gradient boosting strategy during training, enhancing its learning capability for temporal patterns. Furthermore, regarding training efficiency, the TPE-XGBoost model significantly outperforms the LSTM model, highlighting its comprehensive advantage in balancing prediction accuracy and computational cost. Uncertainty quantification for UV measurements To assess the impact of UV measurement errors on model predictions, we performed Monte Carlo simulations. Assuming a conservative measurement error of ± 10% (typical for pyranometers under field conditions), we added Gaussian noise with a standard deviation equal to 10% of the measured UV value to the test set inputs and repeated the prediction 1000 times. The resulting mean RMSE increased from the baseline 0.172 to 0.186 (± 0.009), and the mean R2 decreased from 0.957 to 0.941 (± 0.005). These results indicate that UV measurement noise has a moderate but acceptable impact on prediction accuracy. Regular sensor cleaning and calibration are recommended to maintain data quality. Feature importance and interpretability analysis To identify the key drivers of coating corrosion and to enhance the interpretability of the “black-box” model, we performed a SHAP (SHapley Additive exPlanations) analysis on the optimized TPE-XGBoost model. SHAP values quantify the marginal contribution of each feature to the model’s prediction for every individual sample, providing a consistent and locally accurate measure of feature importance. Fig. 9SHAP analysis for interpreting the TPE-XGBoost model. (a) Feature importance based on mean absolute SHAP values, (b) SHAP summary plot revealing feature-value impact on corrosion rate. SHAP analysis for interpreting the TPE-XGBoost model. (a) Feature importance based on mean absolute SHAP values, (b) SHAP summary plot revealing feature-value impact on corrosion rate. Figure 9a presents the global feature importance based on the mean absolute SHAP values. The results clearly indicate that Coating Service Time is the most influential factor, which quantitatively captures the irreversible, time-accumulative essence of all underlying degradation processes. Relative Humidity and Maximum Temperature rank as the second and third most important features. Figure 9b, the SHAP summary plot, reveals a clear monotonic relationship where higher values of RH and T_max consistently push predictions toward a higher weekly corrosion rate. This offers direct, data-driven validation of the hydrolytic and thermo-oxidative degradation pathways (Eqs. 1–2), confirming that moisture ingress and elevated temperature are primary drivers in this high-humidity environment. The significant importance and positive impact of Ultraviolet Radiation Intensity align with the photo-oxidative mechanism (Eqs. 3–6), demonstrating that the model has quantitatively learned the effect of photon energy on polymer breakdown. While Daily Temperature Fluctuation and Vibration Acceleration show relatively lower impact, their non-zero importance supports their role as secondary accelerants, likely by promoting microcrack initiation and propagation through cyclic stress. To quantify synergistic effects between feature pairs, we computed SHAP interaction values. The strongest interaction was observed between maximum temperature and relative humidity, contributing approximately 8% of the prediction variance beyond their additive effects, which aligns with the well-known hygrothermal synergy. A moderate interaction of approximately 5% was found between daily temperature fluctuation and vibration acceleration, indicating that cyclic thermal stress amplifies vibration-induced microcrack propagation. Other pairwise interactions contributed less than 3%. These results demonstrate that the model has learned physically plausible interaction patterns. In summary, this interpretability analysis successfully bridges data-driven predictions with physicochemical understanding. It demonstrates that the high-performing TPE-XGBoost model has not merely found statistical correlations but has learned representations that are physically consistent with the fundamental mechanisms of epoxy coating degradation under coupled stresses, conclusively showing that the corrosion rate is primarily driven by cumulative exposure under synergistic hygrothermal and ultraviolet conditions. Discussion Based on the results presented above, we discuss several aspects regarding model interpretation, generalization, practical deployment, and future directions. Practical deployment for maintenance. The model uses same-week environmental and operational features, making it suitable for retrospective assessment and real-time condition monitoring. For future forecasting, two strategies are feasible. First, scenario-based prediction can use weather forecasts, such as predicted maximum temperature, relative humidity, and UV radiation for the coming one to two weeks, together with planned operational schedules. Second, historical seasonal averages, like typical wet-season or dry-season conditions, can be employed for longer-term planning. These capabilities enable risk-based inspection prioritization, condition-based coating renewal, and forward-looking budget planning. Service time definition and downtime considerations. In the present model, coating service time is defined as cumulative calendar time since the last major coating renewal, without differentiating operational and idle periods. We note that during downtime, concurrent environmental factors such as temperature, humidity, and vibration are typically lower than during normal operation, and the model consequently predicts a reduced corrosion rate. This provides an implicit, first-order accommodation of downtime effects. Nevertheless, in scenarios with frequent or extended outages, a more explicit approach—such as an effective operating time weighted by environmental severity—could further improve accuracy and merits future investigation. Generalization and limitations. The current model was trained on a specific epoxy coating system, a bisphenol A epoxy with an amine hardener, under a subtropical high-humidity climate. The SHAP interaction analysis confirms that temperature-humidity synergy (8%) and temperature fluctuation-vibration interaction (5%) are key drivers of degradation. Rolling-origin cross-validation further yields a mean R2 of 0.951 (± 0.008), demonstrating stable performance across time. Generalization to other coating chemistries or to significantly different climates would require retraining or transfer learning. Nevertheless, the proposed methodological framework is material-agnostic and can be applied to other systems given appropriate degradation data. Moreover, the dataset comprises only 120 weekly samples, which, while sufficient for model development and validation, represents a relatively small size for machine learning applications. Collecting longer-term monitoring data from multiple substations would further enhance model robustness and generalizability. Future directions. Beyond the above, future work should explore physics-informed neural networks that embed governing equations, including hydrolysis kinetics and Arrhenius temperature dependence, as soft constraints in the loss function, following recent successful demonstrations of PINNs in energy systems33. From a solver perspective, these equations can be discretized using finite difference methods, potentially improving extrapolation beyond the training data range and reducing data requirements. Expanding the dataset to multiple substations and incorporating additional stressors such as salt spray and industrial pollutants would also enhance model robustness. Furthermore, surrogate model-based strategies have been proposed for efficient multiscale composite design34, which could be extended to coating degradation analysis to reduce the computational cost of parameter sensitivity studies and uncertainty quantification. Conclusion This study addresses the performance degradation of epoxy coatings on substation equipment under multi-factor coupling effects by proposing a prediction model based on the Tree-structured Parzen Estimator (TPE) optimized XGBoost. The model aims to achieve accurate and stable prediction of coating aging rates, thereby providing decision support for predictive maintenance of equipment. The main conclusions are as follows:Based on the analysis of key aging mechanisms of epoxy coatings, including thermal oxidation, hydrolytic aging, photodegradation, and stress corrosion, six environmental and temporal factors were identified as core input parameters for the model: maximum temperature, daily temperature fluctuation amplitude, vibration acceleration, relative humidity, ultraviolet radiation intensity, and coating service time. This ensures that the data-driven model closely aligns with the physicochemical processes of coating failure.In the hyperparameter optimization phase, the TPE algorithm demonstrated excellent search efficiency and global optimization capability. Compared to BOA, PSO, and CMA-ES, TPE’s sequential mechanism—which constructs kernel density estimates based on performance groups and maximizes Expected Improvement (EI)—enables it to effectively avoid local optima in complex high-dimensional parameter spaces. With fewer iterations, it guides the XGBoost model to converge to superior hyperparameter configurations, thereby achieving the lowest root mean square error and mean absolute error on the test set.Through comparative experiments with SVR, Random Forest, and LSTM models, the TPE-XGBoost model demonstrated strong overall performance. It significantly outperformed the SVR and Random Forest models in predictive accuracy, capturing complex nonlinear relationships between multidimensional features and the coating degradation rate. Compared to the LSTM model, the TPE-XGBoost model achieves comparable prediction accuracy while offering substantially higher computational efficiency and better training stability. The LSTM model, despite its ability to model long-term dependencies, requires considerably more training time and is more prone to overfitting under limited sample sizes. In contrast, the TPE-XGBoost model provides a more balanced solution, making it more suitable for practical deployment scenarios where both accuracy and efficiency are valued. Based on the analysis of key aging mechanisms of epoxy coatings, including thermal oxidation, hydrolytic aging, photodegradation, and stress corrosion, six environmental and temporal factors were identified as core input parameters for the model: maximum temperature, daily temperature fluctuation amplitude, vibration acceleration, relative humidity, ultraviolet radiation intensity, and coating service time. This ensures that the data-driven model closely aligns with the physicochemical processes of coating failure. Based on the analysis of key aging mechanisms of epoxy coatings, including thermal oxidation, hydrolytic aging, photodegradation, and stress corrosion, six environmental and temporal factors were identified as core input parameters for the model: maximum temperature, daily temperature fluctuation amplitude, vibration acceleration, relative humidity, ultraviolet radiation intensity, and coating service time. This ensures that the data-driven model closely aligns with the physicochemical processes of coating failure. In the hyperparameter optimization phase, the TPE algorithm demonstrated excellent search efficiency and global optimization capability. Compared to BOA, PSO, and CMA-ES, TPE’s sequential mechanism—which constructs kernel density estimates based on performance groups and maximizes Expected Improvement (EI)—enables it to effectively avoid local optima in complex high-dimensional parameter spaces. With fewer iterations, it guides the XGBoost model to converge to superior hyperparameter configurations, thereby achieving the lowest root mean square error and mean absolute error on the test set. In the hyperparameter optimization phase, the TPE algorithm demonstrated excellent search efficiency and global optimization capability. Compared to BOA, PSO, and CMA-ES, TPE’s sequential mechanism—which constructs kernel density estimates based on performance groups and maximizes Expected Improvement (EI)—enables it to effectively avoid local optima in complex high-dimensional parameter spaces. With fewer iterations, it guides the XGBoost model to converge to superior hyperparameter configurations, thereby achieving the lowest root mean square error and mean absolute error on the test set. Through comparative experiments with SVR, Random Forest, and LSTM models, the TPE-XGBoost model demonstrated strong overall performance. It significantly outperformed the SVR and Random Forest models in predictive accuracy, capturing complex nonlinear relationships between multidimensional features and the coating degradation rate. Compared to the LSTM model, the TPE-XGBoost model achieves comparable prediction accuracy while offering substantially higher computational efficiency and better training stability. The LSTM model, despite its ability to model long-term dependencies, requires considerably more training time and is more prone to overfitting under limited sample sizes. In contrast, the TPE-XGBoost model provides a more balanced solution, making it more suitable for practical deployment scenarios where both accuracy and efficiency are valued. Through comparative experiments with SVR, Random Forest, and LSTM models, the TPE-XGBoost model demonstrated strong overall performance. It significantly outperformed the SVR and Random Forest models in predictive accuracy, capturing complex nonlinear relationships between multidimensional features and the coating degradation rate. Compared to the LSTM model, the TPE-XGBoost model achieves comparable prediction accuracy while offering substantially higher computational efficiency and better training stability. The LSTM model, despite its ability to model long-term dependencies, requires considerably more training time and is more prone to overfitting under limited sample sizes. In contrast, the TPE-XGBoost model provides a more balanced solution, making it more suitable for practical deployment scenarios where both accuracy and efficiency are valued.