Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 8, No. 3, 2023 1 Mechanical Performance Forecast for BP Neural Network Materials Optimized by Genetic Algorithm Xiangxiang Wu1, *, Shihao Wang1 1School of Mechanical Engineering, Tianjin University of Technology and Education, Tianjin 300222, China * Corresponding author: WU xiangxiang (Email: wuxiangxiang0739@163.com) Abstract: The mechanical properties of steel materials play a crucial role in their design, selection, and application. In order to better predict the mechanical properties through chemical composition and process parameters, this paper uses genetic algorithm to optimize the BP neural network to establish a mechanical property prediction model for steel materials. The model can predict three mechanical properties, including yield strength, tensile strength, and elongation, through chemical composition and process parameters. After optimization by genetic algorithm, the problems of insufficient convergence effect, random initialization of weights and thresholds in the BP neural network model are improved, and the prediction error is significantly reduced. The experimental results show that the GA-BP algorithm model has excellent performance in predicting the mechanical properties of steel materials. Keywords: BP neural network, Genetic algorithm, Mechanical performance. 1. Introduction Since ancient times, steel, a material with excellent properties, has been widely used in various fields. In order to better utilize the properties of steel, people continue to explore and innovate to understand and predict its performance. With the development of technology, especially the advancement of materials science and computer technology, the methods for predicting steel performance have gradually become more scientific and accurate. In ancient times, the prediction of steel performance mainly relied on experience and practice. Craftsmen gradually mastered the smelting of iron ore and the forging technology of steel through continuous trial and error. They accumulated rich practical experience by observing and feeling the performance of steel in various environments, thereby gaining a preliminary understanding of steel's performance. These experiences were often handed down by word of mouth and passed on to later generations, becoming a valuable asset for them to learn from. With the arrival of the Industrial Revolution, the demand for steel increased significantly, and higher accuracy was required for predicting steel performance. At this time, materials science began to develop, and people gained a deeper understanding of the influence of steel's microstructure and chemical composition on its performance. Simultaneously, engineers began to use mathematical and physical models to describe and predict steel performance. These models were based on simple physical and chemical principles, such as elastic mechanics and plasticity mechanics, providing a more scientific basis for steel performance prediction. In the 20th century, the rapid development of computer technology brought revolutionary changes to steel performance prediction. Computers' powerful computational capabilities enabled complex physical and chemical models to be implemented and processed large amounts of data. During this period, methods such as finite element analysis (FEA) and finite difference analysis (FDA) began to be widely used for simulating and predicting steel performance. These methods can consider the influence of steel's microstructure and chemical composition on its performance, providing more accurate predictions. At the same time, the development of computer software also enabled researchers to easily design and optimize steel materials. For example, through finite element analysis, researchers can simulate the mechanical behavior of steel under various conditions to predict its strength, plasticity, and toughness. In addition, some computer software based on physical models has been developed to predict steel's electromagnetic performance, thermal performance, and so on. However, even with the support of computer technology, traditional physical and chemical models still have certain limitations and cannot fully consider the complex physical and chemical processes in steel. At this point, the rapid development of artificial intelligence (AI) brought a new breakthrough for steel performance prediction. Compared with traditional physical and chemical models, machine learning algorithms can process more influencing factors and automatically adjust model parameters to optimize prediction results[1,2]. The application of machine learning algorithms in steel performance prediction can be divided into two stages. In the first stage, machine learning is mainly used for feature extraction and classification. By analyzing the feature data of a large number of known performance steel samples, machine learning algorithms can learn the mapping relationship between features and performance and classify or predict new steel samples. For example, machine learning algorithms such as BP neural network and random forest are widely used for steel material classification and identification[3,4]. By analyzing material features such as composition, microstructure, and heat treatment process data, machine learning algorithms can determine the type, grade, or performance indicators of the material to provide guidance for material design and application. With the development of deep learning technology, the application of machine learning in steel performance prediction has entered the second stage. Deep learning algorithms can handle more complex features and models and can automatically learn and optimize model parameters. In steel performance prediction, deep learning 2 algorithms can better consider the influence of steel's microstructure and chemical composition on performance. At the same time, deep learning can also combine a large amount of historical data and real-time data for prediction and analysis, providing more accurate and real-time decision support for material design and optimization. For example, deep learning algorithms such as convolutional neural network (CNN) and recurrent neural network (RNN) have been widely used in steel material performance prediction and process optimization[5]. Overall, the prediction of steel performance is a continuous process of development and progress. From ancient empirical practices to modern applications of computer models and artificial intelligence algorithms, this field has been constantly pushed forward by technological advancements. With the continuous development and improvement of technology, the prediction of steel performance in the future will become more accurate, efficient, and innovative, with broader application scenarios. 2. Model Establishment 2.1. BP Neural Network Back Propagation Neural Network (BPNN) is a multilayer feedforward neural network that trains the network through the method of error backpropagation[6,7]. It consists of an input layer, a hidden layer, and an output layer, and approximates the target function by adjusting the network weights and thresholds. The core idea of BPNN is the learning rule, which approximates the target function by learning the characteristics of sample data. It uses the gradient descent method to adjust the weights and thresholds, and adjusts the weights and thresholds of the hidden layer by calculating the error of the output layer, so that the error between the output value of the network and the target value is minimized[8]. BPNN has the characteristics of self-learning, self- organization, and strong adaptability, and can handle complex nonlinear problems. It is widely used in classification, function approximation, optimization, and other fields, and has also been widely applied in steel property prediction[9]. BPNN includes input layer, hidden layer, and output layer. The number of nodes in the input layer is equal to the number of input data features, and the number of nodes in the hidden layer can be adjusted according to the complexity of the problem. The number of nodes in the output layer is equal to the number of predicted target variables. There are one or more layers of neurons between the hidden layer and the output layer, which are connected together through full connection. In the training process, the input data enters the network through the input layer, and is calculated and processed by the hidden layer and output layer to obtain the predicted results. Then, the predicted results are compared with the actual results, the error is calculated, and it is backpropagated to the hidden layer and input layer to adjust the weights and thresholds of neurons, so that the error between the network output value and the target value is minimized. The schematic diagram of BPNN is shown in Figure 1. Figure 1. BP Neural Network Schematic Diagram[10] Overall, BPNN is a widely applicable neural network model that can handle complex nonlinear problems and has the characteristics of self-learning, self-organization, and strong adaptability. In steel property prediction, BPNN can help researchers better understand and predict the performance of steel, providing important support for material design and optimization. 2.2. Genetic Algorithm Although BP neural network has extensive applications, it also has some drawbacks. Firstly, the learning convergence speed of BP neural network is slow, and even for a simple problem, it may require hundreds or even thousands of iterations to converge. Secondly, BP neural network cannot guarantee convergence to the global minimum point, which may lead to unsatisfactory training results. In addition, the selection of network structure, initial connection weights and thresholds has a great influence on network training, but the determination of these parameters often relies on experience and trial and error. Furthermore, BP neural network also has the problem of overfitting. When the training sample is insufficient or the network structure is too complex, the network may overfit the training sample, leading to a decrease in generalization ability. To avoid overfitting, it is necessary to select the network structure and parameters reasonably and use regularization methods to enhance the generalization ability of the network. In addition, the training process of BP neural network is easy to be affected by local minimum values, which may lead to the training results being trapped in local optimal solutions, rather than obtaining global optimal solutions. To solve this problem, this article proposes to use genetic algorithm optimization to optimize the drawbacks of traditional BP neural network[11]. Genetic algorithm is an optimization algorithm based on principles of biological genetics, which simulates natural selection and genetic mechanisms to find optimal solutions. It was proposed by American scientist John Holland in the 1970s and is widely used in various optimization problems, such as function optimization, machine learning, image processing, etc. The core idea of genetic algorithm is to regard the solution of the problem as a group of biological individuals and simulate the selection, crossover and mutation operations in the process of biological evolution to continuously optimize the quality of the solution. In each generation, the fitness function is used to evaluate the quality of each individual, and individuals with high fitness are selected for crossover and mutation operations to generate new individuals and gradually evolve towards better solutions. Genetic algorithm has the advantages of adaptability, parallelism and robustness, and can find optimal solutions in complex search spaces. It does not require explicit constraints 3 or restrictions on the problem, can automatically adjust the search direction and range, and has a strong global search ability. At the same time, genetic algorithm is also suitable for problems with multiple peak distributions and can find multiple optimal solutions. 2.3. Model Calculation In this experiment, the chemical composition and processing technology of steel materials are used as input values, and the output values are yield strength, tensile strength, and elongation. Based on the collected data, we conducted standardization processing and data division. We selected 80% of the data set as the training group, and the remaining 20% as the test group. Root mean square error (RMSE) and coefficient of determination R-square (R2) are commonly used methods to evaluate the quality of machine learning models, with expressions listed in Equations 1 and 2, respectively. Where n is the total number of samples, 𝑦 is the true value, and y is the machine learning prediction value. 𝑅𝑀𝑆𝐸 𝑦 𝑦 /𝑛 (1) 𝑅2 1 ∑ ∑ (2) The RMSE value indicates the error between the predicted value and the true value, and the smaller the error, the closer the predicted value is to the true value. The R2 value indicates the closeness of the model's predicted value to the true value, so the larger the R2 value, the more accurate the prediction result. In order to compare the optimization effect of genetic algorithms, this article predicts the optimized BP neural network model and the unoptimized BP neural network model separately. The number of iterations in the neural network training stage is 1000, the learning rate is set to 0.01, and the error threshold is set to 0.00001. The transfer function of the hidden layer is the tan-sigmoid function, and the transfer function of the output layer is the linear function. The fitness obtained by the optimized BP neural network model using genetic algorithms after 50 iterations is shown in Figure 4. In genetic algorithms, the parameter selection population size is 40, the genetic generation is 50, the crossover probability is 0.6, and the mutation probability is 0.05 for optimization. Table 1 presents the evaluation results of the prediction accuracy using RMSE and R2. It can be observed that the R2 of the BP neural network model for yield strength can be improved from 0.90 to 0.97 after genetic algorithm optimization, and the RMSE is reduced from 120.14 to 57.67. For tensile strength, the R2 is improved from 0.95 to 0.98, and the RMSE is reduced from 108.16 to 54.60. For elongation, the R2 is improved from 0.96 to 0.98, and the RMSE is reduced from 1.70 to 1.01. These results indicate that genetic algorithm optimization of BP neural network plays a good role in improving prediction accuracy. Genetic algorithm can be used to optimize the weights and thresholds of neural connections in BP neural network. The weights and thresholds of neural connections in BP neural network determine the performance and prediction ability of the neural network, and optimizing them can make the neural network more accurate in classification or prediction[12]. Genetic algorithm can encode the weights and thresholds of neural connections in BP neural network into gene sequences, and then use the evolutionary process of genetic algorithm, including selection, crossover and mutation operations, to continuously optimize gene sequences to find better weight and threshold combinations. In each generation of evolution, the fitness function is used to evaluate the adaptability of each individual, which is then selected, crossover, and mutated, ultimately obtaining more adaptogenic new individuals and optimizing the combinations of weights and thresholds. Table 1. Evaluation criteria R2 RMSE BP GA-BP BP GA-BP Yield Strength/MPa 0.90 0.97 120.14 57.67 Tensile Strength/MPa 0.95 0.98 108.16 1.70 Elongation/% 0.96 0.98 54.60 1.01 Figures 2, 3, and 4 show the prediction accuracy of the BP neural network for yield strength, tensile strength, and elongation before and after genetic algorithm optimization. It can be observed from the figures that the prediction results of the three properties have been optimized to a certain extent after genetic algorithm optimization. This indicates that genetic algorithm has a good effect on optimizing the BP neural network and improving prediction accuracy. However, several groups of prediction points have relatively large errors. One possible reason for this is that the amount of data collected in this experiment is relatively small, making it difficult to achieve better predictions. In subsequent optimization, we should continue to increase the amount of experimental data to improve the prediction accuracy[13]. Figure 2. Breeding Intensity Prediction Comparison of Aenetic Algorithms 4 Figure 3. The Comparison of the Hereditary Algorithm before and after the Tensile Strength Prediction Figure 4. Comparison of Elongation Prediction before and after Genetic Algorithm 2.4. Model Detection Table 2 presents the prediction results of two sets of experimental data using the genetic algorithm-optimized BP neural network model and the unoptimized BP neural network model for mechanical property prediction. It can be observed from the table that the genetic algorithm-optimized BP neural network model provides more accurate predictions than the unoptimized BP neural network model for the mechanical properties. This further confirms that genetic algorithm optimization can improve the prediction accuracy of BP neural network models. Table 2. Optimize the results of the Results before and after Ture BP GA-BP Yield Strength/MPa 990 1024.32 995.48 Tensile Strength/MPa 1039 1018.48 1022.83 Elongation/% 16.3 17.35 16.89 3. Conclusion Optimizing the BP neural network prediction of mechanical properties based on genetic algorithms, using the genetic algorithm's ability to select the fittest parameters, selecting chemical composition and processing technology to predict the yield strength, tensile strength, and elongation of steel materials. Demonstrating the prediction accuracy of the BP neural network and GA-BP neural network for the three mechanical properties through R2 and RMSE. Selecting data to verify the reliability of the RF algorithm model, the results show that the GA-BP prediction effect is better than the BP neural network for the yield strength, tensile strength, and elongation. GA-BP is feasible for the prediction of mechanical properties of steel materials. References [1] A. K. Tyagi, P.Chahal, “Artificial intelligence and machine learning algorithms. In Research Anthology on Machine Learning Techniques,” Methods, and Applications IGI Global, 2022, pp. 421-446. [2] Y. Juan, Y. Dai, and Y. Yang, “Accelerating materials discovery using machine learning [J]”. Journal of Materials Science & Technology, vol. 79, 2021, pp. 178-190. [3] Z. Xu, X. Huang, and L. Lin, “BP neural networks and random forest models to detect damage by Dendrolimus punctatus Walker[J] ”. Journal of forestry research, vol. 31, 2020, pp. 107-121. [4] W. Jin, Z. J. Li, and L. S. Wei, “The improvements of BP neural network learning algorithm[C]//WCC 2000-ICSP 2000”. 2000 5th international conference on signal processing proceedings. 16th world computer congress 2000. IEEE, vol. 3, 2000, pp.1647-1649. [5] I. Banerjee, Y. Ling, and M. C. Chen, “Comparative effectiveness of convolutional neural network (CNN) and recurrent neural network (RNN) architectures for radiology text report classification[J]”. Artificial intelligence in medicine, vol. 97, 2019, pp. 79-88. [6] A. Yang, Y. Zhuansun, and C. Liu,”Design of intrusion detection system for internet of things based on improved BP neural network[J]”. Ieee Access, vol. 7, 2019, pp. 106043- 106052. [7] D. E. Rumelhart, G. E. Hinton, and R. J. Williams, “Learning representations by back-propagating errors[J]”. nature, vol. 323, 1986, pp. 533-536. [8] S. L. yu, and J. Liu, “Convolutional recurrent neural networks for text classification[J]”. Journal of Database Management (JDM), vol. 32(4), 2021, pp. 65-82. 5 [9] S. Wu, J. Yang, and G. Cao, “Prediction of the Charpy V-notch impact energy of low carbon steel using a shallow neural network and deep learning[J]”. International Journal of Minerals, Metallurgy and Materials, vol. 28(8), 2021, pp. 1309- 1320. [10] F. He, and L. Zhang, “Mold breakout prediction in slab continuous casting based on combined method of GA-BP neural network and logic rules[J]”. The International Journal of Advanced Manufacturing Technology, vol. 95, 2018, pp. 4081-4089. [11] A. Lambora, K. Gupta, and K. Chopra, “Genetic algorithm-A literature review[C]//2019 international conference on machine learning, big data, cloud and parallel computing (COMITCon)”. IEEE, 2019, pp. 380-384. [12] S. Ding, C. Su, J. Yu, “An optimizing BP neural network algorithm based on genetic algorithm[J]”. Artificial intelligence review, vol. 36, 2011, pp. 153-162. [13] H. Wang, Z. Zhang, and L. Liu, “Prediction and fitting of weld morphology of Al alloy-CFRP welding-rivet hybrid bonding joint based on GA-BP neural network[J]”. Journal of Manufacturing Processes, vol. 63, 2021, pp. 109-120.