Application of Machine Learning in Constitutive Relationship Prediction of Porous Titanium Materials for Artiﬁcial Bone

: Artiﬁcial bone porous titanium materials are widely used in orthopedic implants. However, the traditional constitutive model is often limited by the complexity and accuracy of the model, and it is diﬃcult to accurately and eﬃciently describe the constitutive relationship of porous titanium materials. In this study, structured data were established based on experimental data from published papers, and goodness of ﬁt ( � � ), mean absolute error ( ��� ) and mean absolute percentage error ( ���� ) were used to evaluate the model. The prediction eﬀect of random forest (RF), multi-layer perceptron (MLPR) and support vector machine (SVR) on the constitutive relationship of porous titanium materials was discussed. Through comprehensive comparison, it can be seen that the RF model with max_depth of 24 and n_estimators of 160 has the best performance in prediction, and the average absolute percentage error is less than 4.4%, which means it can accurately predict the temperature sensitivity and strain rate sensitivity of porous titanium materials. And its predictive ability is be�er than that of the traditional constitutive model, which provides a new idea and method for the constitutive modeling of porous titanium materials.


Introduction
In today's engineering field, the research and application of porous materials have been paid more and more a ention.In particular, as an important functional material, porous titanium has excellent mechanical properties and biocompatibility, so it is widely used in orthopedic implants [1][2][3].The research on the mechanical properties of porous titanium materials is the basis for further research and application of porous titanium.At present, the constitutive model of porous titanium materials is mainly based on the traditional theoretical model [4,5].
In recent years, with the rapid development of machine learning, it has been widely used in various fields, such as Reka using machine learning with machine vision to identify the degree of fruit decay [6], Zheng et al. using machine learning to optimize the installation position of hydraulic cylinders on medical robots [7] and so on.For material prediction, machine learning is also widely used in this field because of its characteristics of learning the laws contained in a wide range of data sets [8][9][10][11].At present, scholars at home and abroad have launched a certain exploration in this field.In 2023, Lei et al. [12] established a fatigue test data set containing Hastelloy material characteristics, and then built a machine learning framework for fatigue life prediction based on the data set.After comparison, it was found that the prediction effect of the model built based on machine learning was greatly improved compared with traditional prediction methods.Some scholars have tested the prediction effect of common machine learning algorithms such as SVM, RF, AdaBoost and DNN on material prediction and found the most suitable machine learning algorithm corresponding to material properties and the optimal parameters of each algorithm through comprehensive comparison [13][14][15][16][17].For hyperelastic porous materials, Liu Zhentao et al. [18] built a constitutive model based on artificial neural networks to predict their mechanical behavior.Meanwhile, some scholars have improved the algorithm model for different cases.For example, Zhao [19] and Ismail [20] used the genetic algorithm and particle swarm optimization algorithm, respectively, to optimize the neural network and predict the creep fatigue life of metal oxides and the wear rate of nanocomposites.In 2021, Guo et al. [21] combined convolutional neural networks and an improved long short-term memory neural network to propose a deep learning model that can quickly identify constitutive model parameters and has good denoising performance.Some scholars [22,23] combined intelligent optimization algorithms such as Gray Wolf optimizer and the particle swarm optimization algorithm with support vector machine and XGBoost algorithms to form a hybrid model, and obtained a be er model by comparing the performance differences between different hybrid models.
To sum up, machine learning has been used to predict the properties of materials.However, the traditional constitutive model is often based on phenomenology or physics, which is limited by its own explicit mathematical description ability, and it is very difficult to find a constitutive model that can accurately describe the complex mechanical behavior of materials under the combined action of multiple effects [24].Therefore, when describing some materials with complex properties, it is necessary to optimize and modify the classical constitutive model based on the current material properties, such as introducing dislocation dynamics, grain evolution and crystal plasticity theories [25].In addition, the prediction range of the traditional constitutive model is limited, and it does not have enough predictive properties to describe the properties of materials under certain conditions of high temperature or high strain rate [4,26].In contrast, the data set of the constitutive model based on machine learning can be continuously expanded, and the training and verification time of the new model is shorter [27]; so, the flexibility and prediction range of the model are more advantageous than those of the traditional constitutive model.However, the construction of a constitutive model using machine learning relies on a large amount of data to capture the nonlinear, complex and multivariate behavior of materials; so, the application of machine learning in this construction model relies heavily on the training database [26,28].Moreover, the machine learning algorithm has difficulties in parameter adjustment and convergence, and poor algorithm parameter adjustment will lead to problems such as model convergence failure and overfi ing.Although machine learning still has some problems in the field of material prediction, it has great prospects for development.At present, the research on porous materials, especially porous titanium materials, is still limited, and the adaptability and prediction accuracy of different models for porous titanium materials have not been systematically studied.
In this study, a structured data set containing four characteristic parameters was established through missing value processing, outlier processing and standardization processing, and the prediction effect of RF, MLPR and SVR algorithms on the constitutive relationship of porous titanium materials was discussed.Through comprehensive comparison, the RF model was found to be the best.Then, the RF model was compared with the traditional constitutive model, and the prediction accuracy of the RF model was found to be higher.The purpose of this study was to provide new ideas and methods for the establishment of the constitutive model of porous titanium materials, promote the development of porous materials, and promote the research of related fields to make new breakthroughs and more progress.

Model Principle
Three algorithms, random forest, multi-layer perceptron and support vector machine, are used in this study.The random forest model is built by integrating multiple decision trees, which has good robustness and prediction accuracy, but it is easy to overfit the noisy data.Multi-layer perceptrons capture complex relationships in data through nonlinear changes in activation functions in hidden layers.They can learn complex nonlinear relationships and perform well on large-scale data sets.However, they require a lot of data and computational resources to train the model, and the model structure is complex and difficult to interpret.SVM uses the kernel function to capture complex relationships in data.It performs well in high-dimensional space and is suitable for highdimensional data.However, it has high computational complexity for large-scale data sets and high-dimensional data.

Random Forest Regression (RF)
The random forest algorithm is a supervised learning algorithm.Its main idea is to build a forest composed of decision trees in a random way, and the samples are classified by Information Gain, Gain Ratio and Gini Index at the nodes of each tree.The random forest algorithm achieves high prediction accuracy through random selection of samples, features and integrated prediction.
The implementation process of the random forest algorithm is as follows: 1. N′ (N > N′ > 2N/3) samples are selected each time through N random sampling for the full set D of samples with a capacity of N, so as to form n sample training sets.The samples that are not drawn are divided into test sets.

n weak learners are generated based on n sample training sets, but only S′ (S′ << S)
are randomly selected from S feature a ributes of the sample as feature variables.3. Therefore, the test set tests n weak learners and obtains n predicted values.After averaging them, the final predicted value can be obtained.

Multi-Layer Perceptron Regression (MLPR)
The multi-layer perceptron algorithm is a supervised learning algorithm.Its main idea is to build an algorithm model by simulating the connection mechanism of the human brain neural network.The multi-layer perceptron algorithm consists of three layers: input layer, hidden layer and output layer.The input layer has the same number of nodes as the feature variable and does not include the activation function.The output layer has the same number of nodes as the output variable; each layer of the activation function in the hidden layer is nonlinearly transformed to capture complex relationships in the input data.
The implementation process of the multi-layer perceptron algorithm is as follows: 1.The weight parameters and threshold parameters of each layer are initialized.The data are passed through the input layer to the first hidden layer.The weighted input is calculated in the hidden layer, the activation function is applied to pass the result to the next layer, and then propagated forward in turn until the result is finally obtained in the output layer.2. According to the gradient descent method, the connection weight parameters and threshold parameters between neurons are updated to minimize the total loss function.3. Steps (1) and ( 2) are repeated until a preset stop condition such as network convergence or the maximum number of iterations is reached.

Support Vector Regression (SVR)
Support vector regression is a supervised learning algorithm.The main idea is to map the feature variables to the high-dimensional feature space by using the kernel function, and then perform linear regression in the high-dimensional feature space and nonlinear regression in the low-dimensional space.
The implementation process of the support vector machine algorithm is as follows [29]: 1.One must estimate the sample data ( − ). . . . . .( , ), , ∈ which defines the regression function as follows: where f(x) is the predicted value, w is the weight vector and b is the bias term.
2. In order to find the minimum w, the relaxation factor , * is introduced to avoid underfi ing the model.The optimization objectives are as follows: where C is the penalty coefficient.The Lagrange function is introduced, , * is introduced for each constraint, and then the kernel function ( , ) is introduced in the process of solving , * .3. The regression function is as follows [30]:

Model Building
In this work, a constitutive model of porous titanium materials was constructed according to Figure 1.The input characteristics in the model are strain, porosity, temperature and strain rate, and the response variable is stress.

Data Description
The sample data come from the experimental data in a previously published paper [4].The experimental data are the stress-strain curves of porous titanium materials at different temperatures and strain rates, which are obtained by conducting orthogonal experiments using the split Hopkinson pressure bar (SHPB).The raw material of the experiment is high-purity titanium powder provided by Shijiazhuang Yida Co., Ltd.(Shijiazhuang, China), and the experimental material is made of cylindrical samples with a diameter of 8 mm and a height of 3 mm, 4 mm and 6 mm by using the powder sintering method.The sintering additive uses a 2 wt% polyvinyl alcohol aqueous solution.Considering the high chemical activity of titanium, it can react with oxygen, hydrogen, nitrogen and other elements, so the vacuum sintering method is used, and the vacuum degree is 10 −4 Pa.The sintering temperature of titanium powder with a particle size less than or equal to 27μm is 1200 °C, the holding time is 2 h and natural cooling is achieved.The sintering temperature of titanium powder with a particle size less than or equal to 74 µm is 1100 °C, the holding time is 2 h and natural cooling is achieved.In the split Hopkinson pressure bar experiment, the sample size was adjusted according to different loading strain rates.A pressure bar with a diameter of 15 mm was used in the experiment, and the experimental conditions of different strain rates were achieved by adjusting the speed of the impact bar.The experiment was repeated 2 to 3 times for each group, and the average value of the effective data of the experimental results was taken to reduce the experimental error.The specific parameters of porous titanium materials are shown in Table 1, which shows the percentage of each element of the experimental material in the overall mass, particle size, pore size and porosity, and the sample data are shown in Table 2.A JSM-6480 scanning electron microscope (Nihon Technology Co., LTD., Osaka, Japan) was used to observe the surface morphology of the sample, and the results are shown in Figure 2. Pearson correlation coefficient is used to view the degree of linear correlation between features.Its value ranges from −1 to +1.The larger the value, the stronger the correlation.Its expression [30] is as follows: where cov( , ) X Y is the covariance of the data set , X Y ;    are the deviation of , X Y , respectively.It can be seen from Figure 3 that most of the features are nonlinear.However, there is a certain positive correlation between stress and strain, which is caused by the proportional increase in stress in the plastic deformation stage and the nonlinear increase in the elastic stage.The porosity will reduce the mechanical strength of the material, so there is a weak negative correlation between porosity and stress.

Data Preprocessing
In order to improve the final prediction quality of the data quality assurance model, it is necessary to carry out data cleaning on the sample set, such as missing value processing, outlier processing and standardization processing.Among them, standardization processing can eliminate the dimension gap between the data and accelerate the convergence rate of the model.Here, the Z-score standardization method is used, and its expression [30] is as follows: where X is the value after data standardization; x is the value before data standardization;  is the average value of the sample;  is the standard deviation of the sample.Because the activation function in the MLPR model has scale requirements on the data, if the scale difference between features is large, it will affect the convergence speed of the gradient descent method; so, the data used to construct the MLPR model need to be standardized.Because the calculation of the kernel function in the SVR model depends on the distance between features, the calculation accuracy of the kernel function will be affected if the feature scale is different, so the data used to construct the SVR model needs to be standardized.The prediction result of the RF model is mainly related to the distribution of variables and the conditional probability between variables, and has nothing to do with the size of the value itself; so, the data used to build RF model do not need to be standardized.

Data Set Partitioning and Model Evaluation
On the basis of data preprocessing, the sample set is divided into a training set and a test set.The training set is used to train the model, and the test set is used to test the model's performance.In general, the more data used to train the model, the higher the prediction accuracy of the model, but excessive training will lead to a decline in the overfitting generalization ability of the model; so, the ratio of the training set to the test set is 8:2.
Goodness of fit , mean absolute error and mean absolute percentage error were used to evaluate the performance of regression models.The best fit represents the degree to which the regression curve fits the experimental value, and the closer the goodness of fit is to 1, the be er the regression curve fits the predicted value.The mean absolute error represents the mean of the absolute error between the predicted value and the experimental value.The calculation formula [31] is as follows: ( )

Random Forest Model (RF)
The number of weak learners (n_estimators) and the maximum depth (max_depth) are tuned in the RF model.In this study, the number of weak learners ranged from 10 to 235, with steps of 15, and the maximum depth ranged from 10 to 38, with steps of 2, respectively; and were used to evaluate the influence of parameter values on the predicted results.According to Figure 4a,b, it is found that increases with the increase in the number of weak learners and the maximum depth, and decreases with the increase in the number of weak learners and the maximum depth.However, after the number of weak learners reaches 70, fluctuation greatly occurs at 70 and 160, respectively, and 160 is taken as the minimum value after comparison.When the maximum depth is greater than 24, and• converge gradually; so, the optimal parameters of the number of weak learners and the maximum depth are 160 and 24, respectively.Multi-Layer Perceptron Model (MLPR) We now discuss how to tune the solver, activation and hidden_layer_sizes in the MLPR model.The solvers used for weight optimization include lbfgs, which is a quasi-Newtonian optimization method; sgd, which is a stochastic gradient descent method; adam, which is an optimization method based on stochastic gradient.Excitation functions include Rectified Linear Unit function (relu), hyperbolic tangent function (tanh), logistic function and identity function.The identity function is suitable for tasks with linear relationships that lack nonlinearity, but it limits the representation of the model.Both tanh and logistic belong to generalized S-type activation functions, both of which have bidirectional saturation, but there are still some problems such as gradient disappearance and large computation in the derivation process.The relu function solves the gradient disappearance problem and is fast to compute, but it may result in the "death" of neurons.The formula for these four activation functions are as follows: : ( ) max(0, ) relu f x x  (9) tanh : ( ) identity: f ( ) where x is the input value.
In order to improve the computational efficiency and generalization ability of the model, the multi-layer perceptron here uses only one hidden layer.As shown in Figure 5a,b, in the combination of 12 solvers and excitation functions, the relu function and lbfgs solver have the best performance; so, the MLPR model should use the relu function and lbfgs solver.According to Figure 5c, it is found that increases with the increase in the number of hidden layer elements, and decreases with the increase in the number of hidden layer elements.When the number of hidden layer elements is greater than 70, and• gradually converge, so the optimal parameter of the number of hidden layer elements is 70.In the SVR model, the error penalty coefficient (C) and kernel function are optimized, and the influence of parameter changes on the prediction results is evaluated by using and , respectively.C is an important parameter used to balance the complexity of the model and the accuracy of the fi ed data.The larger the value, the more accurately the model learns from the sample, but the easier it is to overfit.The kernel includes linear kernel functions (linear), polynomial kernel functions (poly), radial basis kernel functions (rbf) and S-type kernel functions (sigmoid).The linear kernel function is fast to calculate, but its ability to fit nonlinear data is limited.The polynomial kernel function can handle nonlinear data to some extent, but the computational complexity is high.The radial basis kernel function has a strong ability to fit nonlinear data, but it is easy to overfit.Because the error penalty coefficient is too large, the model is easy to overfit, so C is taken from 0.1 to 100. Figure 6a

Comprehensive Analysis of Model Prediction Ability
Comparing and of the optimized model, the results are shown in Figure 7.After tuning, of the three models is relatively different, and of the RF model is the highest.However, of the three models is quite different, among which the RF model has the smallest .Compared with the three optimized models, the RF model has excellent comprehensive performance, so the RF model should be used for the establishment of a porous titanium constitutive model.Porous titanium is temperature-sensitive due to its substrate material.As shown in Figure 8, when the temperature is less than 300 °C, the yield limit and flow stress of porous titanium decrease with the increase in temperature, indicating that the material has a temperature-softening effect.The RF model predicted the data well, and MAPE did not exceed 3.5%.The predicted value of the DP model can reflect the temperature sensitivity, but the error is large, and the average MAPE is as high as 11.4%.
Affected by the microstructure strain efficiency and the matrix material, porous titanium has strain rate sensitivity due to the influence of its matrix material [5,[32][33][34].From the perspective of the microstructure, the pore wall of porous titanium has plastic bending during the compression process, so the strain rate effect will be produced.As shown in Figure 9, when the strain rate is less than 3000/s −1 , the yield limit and flow stress of the porosity increase with the increase in the strain rate.When the strain rate reaches 3000/s −1 , the distribution of the stress-strain curve is irregular.The predicted results of the RF model can reflect the strain sensitivity of porous titanium materials, and the average MAPE is 3.8%.However, the prediction results of RF show small errors in part of the stress-strain curve.The predicted value of the DP model can reflect the strain rate sensitivity of porous titanium materials when the strain rate is less than 3000/s −1 , but the error is large, and the average MAPE is as high as 27.5%.
As shown in Figure 10, the presence of pores significantly reduces the mechanical strength of porous titanium materials.The RF model can predict the data well.The prediction results of the DP model can show that the existence of pores significantly reduces the mechanical strength of porous titanium materials, but the error is large.Funding: This research received no external funding.

Figure 1 .
Figure 1.Flow chart of machine learning algorithm model establishment and analysis.
value of the model, i Y represents the experimental value, Y represents the average of the experimental value, and n represents the number of samples.

Figure 6 .
Figure 6.Hyperparameter tuning of SVR model: (a) using for evaluation; (b) using MAE for evaluation.

Figure 7 .
Figure 7.Comparison between R 2 and MAE after three models are optimized.

Table 1 .
Specific parameters of materials.

Table 2 .
Sample data information.