Machine Learning-Based Prediction and Optimisation System for Laser Shock Peening

: Laser shock peening (LSP) as a surface treatment technique can improve the fatigue life and corrosion resistance of metallic materials by introducing signiﬁcant compressive residual stresses near the surface. However, LSP-induced residual stresses are known to be dependent on a multitude of factors, such as laser process variables (spot size, pulse width and energy), component geometry, material properties and the peening sequence. In this study, an intelligent system based on machine learning was developed that can predict the residual stress distribution induced by LSP. The system can also be applied to “reverse-optimise” the process parameters. The prediction system was developed using residual stress data derived from incremental hole drilling. We used artiﬁcial neural networks (ANNs) within a Bayesian framework to develop a robust prediction model validated using a comprehensive set of case studies. We also studied the relative importance of the LSP process parameters using Garson’s algorithm and parametric studies to understand the response of the residual stresses in laser peening systems as a function of different process variables. Furthermore, this study critically evaluates the developed machine learning models while demonstrating the potential beneﬁts of implementing an intelligent system in prediction and optimisation strategies of the laser shock peening process.


Introduction
Laser shock peening (LSP) is an advanced surface enhancement technique that has been used extensively in aerospace industries to improve the fatigue life of metallic alloys [1,2]. In LSP, high-power laser pulses interact with the surface of metal parts, resulting in the generation of a high-temperature plasma. The pressure generated by the expansion of the plasma generates shock waves that propagate into the material causing plastic deformation, leading to the surface having a compressive residual stress of high magnitude and depth [3,4]. From a structural integrity standpoint, this can be potentially beneficial as it can extend the life of engineering components [5,6]. Recent developments of industrial systems and feasibility studies illustrating the application of LSP in an industrial environment make it an amenable process for use in the production line [7].
Importantly, the extent of improvement in the fatigue life from the LSP process relies on the magnitude of the induced residual stresses, hence the choice of peening parameters is critical. The distribution of the LSP-induced residual stresses can play a significant role in fatigue crack initiation and propagation. At present, the process parameters for a new application are often determined using a trial-and-error approach. Hence, there are serious gaps in comprehending the evolution of residual stress field resulting from the plastic deformation and material hardening characteristics. These aspects represent a major challenge for inclusion of LSP in structural design, as it can be potentially expensive and time-consuming. Furthermore, the residual stress distribution resulting from LSP exhibits a complex response to the process parameters, such as the spot diameter, power density and number of layers [8][9][10]. However, a clear understanding of the effect of these individual parameters on the induced residual stress distribution is lacking and can vary with different laser systems. Considering all these factors, selection of optimal process parameters depending on the service condition can represent an arduous task in laser shock peening.
Several analytical models of laser peening based on finite element modelling have been developed to predict the residual stress distribution and to optimise the process parameters in a range of materials [11][12][13][14][15][16]. These models suffer from the drawback of being inherently complex and highly biased on the assumptions of the analyst and involve excessive computational cost and requirements. Experimental methods based on diffraction [17] and strain relaxation [18] are used for characterisation of the residual stress distribution and to validate simulation models. However, the diffraction-based methods can be expensive and difficult to perform due to logistical challenges and limitations to acquire beam time at large-scale facilities. On the contrary, methods based on strain relaxation can be performed in situ but are at least semi-destructive in nature. It is precisely in this context that machine learning techniques, namely artificial neural networks (ANNs) and genetic algorithms (GA), can be used as surrogate models within an integrated system for prediction and optimisation purposes using experimental data. ANNs are applied successfully in a range of applications, including the prediction of welding-induced residual stresses using data acquired from diverse residual stress measurement techniques [19,20]. In the area of laser peening, the application of ANNs has been demonstrated to model the response of the laser peening process [21] and to predict the residual stress profile using finite element data [22]. The Taguchi multi-objective optimisation approach has been used for parameter design and optimisation of laser peening parameters with limited success [23,24]. The major drawbacks are that the mathematical formulation of the objective function is undefined in an industrial setting and there are limitations associated with solving optimisation problems where process parameters have discretised values. The combination of Artificial intelligence (AI) techniques has been found to be very useful for prediction and optimisation problems, for instance, the application of ANNs and GA within an integrated system is reported in a range of manufacturing processes [25][26][27]. Sticchi et al. [28] reported a parametric study showing the effect of laser spot size and coverage on the LSP-induced residual stresses. Such studies can also be undertaken using ANNs by generating data from artificial single-variable experiments that could provide valuable insights into understanding the relationships existing in the data.
One criticism with applying ANNs is that they lack objective grounding: A complex model can fit the training data well but fail to provide acceptable generalised predictions in the unseen data. MacKay [29,30] introduced the concept of using an ANN within a Bayesian framework where the scalar hyperparameters of a network are estimated using the evidence program. The inclusion of a regularization term with the weight matrix in the error function reduces the possibility of overfitting and enables marginalisation of the network predictions.
In this study, we present neural network models developed within a Bayesian framework that can reliably predict the residual stress distribution induced by LSP, as well as GA models that can optimise the laser peening process parameters. This study aims to develop a data based cost-effective prediction and optimisation methodology without having to consider the complex physics involved in LSP process. Section 2 presents the LSP process data used in this work and the collated residual stress measurement data using hole drilling. Section 3 discusses the Bayesian neural networks and estimation of contribution of the input variables using Garson's algorithm [31] that takes into account the weights in the different layers of ANN architecture. Section 4 describes the developed GA model to optimise the process parameters based on the trained neural network. In the results and discussion (Section 5), we characterise the relative importance of the process variables and investigate the variation of induced residual stresses as a function of different process parameters using parametric studies. We critically evaluate the efficacy of the developed machine learning models using different case studies and recommend strategies for the implementation of the developed system.

Laser Peening Residual Stress Data
A schematic of the LSP process is shown in Figure 1. During the LSP process, the surface of the target is typically covered with an ablative medium (usually aluminium or vinyl tape). The laser-generated plasma is confined using a transparent layer (usually water) on top of the ablative layer to direct the high-pressure shock waves into the target material. The experimental samples used in this work were manufactured from aluminium 2624-T39 grade alloy, which was subjected to cold working and aging post solution heat treatment. The material was received as large plates of thickness 25 mm. The mechanical properties of Al-2624 alloy in the T39 heat treatment condition are given in Table 1.  In this dataset, peen spots were applied in each location using 100% overlap, that is, subsequent laser spots were applied directly on top of the preceding spot. The power density was varied by changing the laser spot size at constant pulse energy and duration: A larger spot size led to a reduction in the power density and vice versa. However, in reality, there are fluctuations in the energy and pulse duration. Henceforth, both laser spot size and power density were treated independently and were considered as input variables for modelling the resulting residual stress distribution.
Peening was undertaken by Metal Improvement Company at Earby, UK. The peening parameters for the single-shot configuration are given in Table 2, and more detailed experimental studies have been described by the authors of [8]. Test coupons were machined from the parent material to a size of 70 × 70 mm 2 and thickness of 12.7 mm. A total of 12 specimens were prepared, with each specimen containing 4 single square spots spaced to enable repeat measurement of residual stress. In this dataset, laser spots (circular shape) were offset from and overlapped with proceeding spots to generate a patch of peened material. The experimental laser peening facilities available at Universidad Politécnica de Madrid (UPM), Madrid, Spain, were used. The pulse energy was approximately 2.4 J, with a time duration of about 9.4 ns full width at half maximum (FWHM). The spatial profile of the final pulse incident on the treated surface was nearly Gaussian. The samples were a size of 60 mm × 60 mm and thickness of 12 mm. A total of 16 LSP processing parameters covering a range of laser spot diameter and pulse overlapping distance were used as shown in Table 2. The LSP patch, sized 30 mm × 30 mm, was located centrally on the surface of the samples and the laser tracking direction was perpendicular to the material rolling direction as shown in Figure 2a.

•
Laser offset distance was measured from centre-to-centre of each laser spot. The number of laser spots per cm 2 is a function of offset distance (∆X, ∆Y) along X and Y directions as shown in Figure 2b. It can be expressed as: • The effective number of layers can then be calculated as a function of offset distance and spot diameter (Ø) using:

Analysis of Residual Stresses Using Incremental Hole Drilling
Incremental hole drilling [32] is commonly used for measuring residual strains on the surface and near the surface. The measurement procedure is described in the standardised version of the ASTM Standard Test Method E837 [33]. First, a hole is drilled concentrically at the location of interest, and then relaxed strains are measured at each increment in three directions using a strain gauge rosette attached on the surface of the component around the hole. The magnitude and directions of the in-plane stresses are calculated from these strains as a function of drilled depth. However, the hole-drilling method is limited by the measurement depth and is affected by plasticity when the magnitude of the residual stresses is close to the yield strength of the material. Laser peening typically introduces a compressive residual stress field with a relatively steep stress gradient. Therefore, holes were drilled in small increments in order to obtain a depth profile. Hole drilling measurement was undertaken using a setup developed by Stresscraft, UK. For reliable and accurate measurement, the UK NPL Good Practice Guide No. 53 and standard ASTM 837 were followed [32,33]. Hole-drilling rosettes contain three radial strain gages to identify the in-plane stress components σ x , σ y and τ xy . The strain gages are arranged as shown in Figure 3. A 2 mm-diameter hole was drilled in an orbital motion in a series of small increments. We drilled 4 increments each of 32 µm and 64 µm, followed by 8 increments of 128 µm, totalling 16 increments up to a depth of 1.4 mm.

Prediction Using Artificial Neural Networks
ANNs are abstract computational models connected layer-by-layer to form a network that replicates the behaviour of biological neurons in the human brain [34]. The multilayer perceptron (MLP) model [35] is a commonly used architecture consisting of interconnected neurons between the input, hidden and output layer that can be used to learn complex relationships existing in the input and output data. Figure 4 shows a schematic representation of the network architecture showing the input parameters and the output. All input parameters were normalised to a value ranging between −1 and +1 using a simple mathematical transformation. Residual stresses in the longitudinal and transverse directions (output parameters) were normalised between −1 and +1 by dividing them by the yield strength of the material. The ANNs work by adapting the network parameters (synaptic weights and bias) to minimise an error function using the backpropagation (BP) algorithm [36]. The network continues to fit the data to converge at a minimal state of the error function. The sum of the squares error E(x,w) is defined as the sum of squares of the actual (a k ) and predicted (p k ) output vectors: where x is the input matrix, w the weight matrix, and N the total number of measured residual stress data points at a given depth. Additionally, different statistical indicators were used to compare the performance of different models, and optimisation of neurons in the hidden layer were primarily based on the measure of root-mean-square error (RMSE). Performance indicators such as RMSE, absolute fraction of variation (R 2 ) and mean absolute percentage error (MAPE), as expressed in (4)-(6), were used for the evaluation of network performance. The performance indicators for different numbers of hidden neurons for developing prediction models of residual stresses using two datasets are summarized in Table 3. The best performance was achieved with 12 hidden neurons for the first dataset and 13 hidden neurons for the second dataset.
where a i is the actual residual stress, p i the predicted residual stress and N the sample size.

Garson's Algorithm Theory
ANNs are often criticised as being 'black box' models, as the network structure provides limited insights on the objective function being approximated. Moreover, interpretation of the network parameters consisting of synaptic weights and bias represents a major challenge. Hence, methods for quantifying the input variable contributions are required to increase transparency and confidence in the model predictions. The contribution of each independent variable on the predicted response depends mostly on the magnitude of the synaptic weights of the neural network. For instance, input variables with large positive weights represent greater intensities of signal transfer and show excitatory effects on neurons. Conversely, they also show negative weights signify inhibitory effects. Garson's algorithm [31] provides a quantitative assessment of statistically significant input variables by calculating the relative importance of the inputs using the weight matrix. The application of Garson's algorithm has been reported to predict ecological phenomena with reasonable success [37,38]. A schematic representation of Garson's algorithm showing the different steps involved in the calculation of the relative importance (RI) of input parameters is shown in Figure 5. First, the matrix containing weights of the input and hidden layer and the hidden and output layer are obtained from the connecting neurons. The contribution of each input neuron to the output via the hidden neuron is evaluated as the product of the input-hidden layer (Hidden JI ) and hidden-output layer (Hidden KJ ) connection weights. The relative contribution is consequently obtained by normalising the signal of each hidden neuron by the sum of individual input neuron contributions given by: The RI of each input can then be calculated using the expression:

Bayesian Neural Networks
One of the major drawbacks in the conventional ANN search algorithm is the tendency to get entrapped in local and global minima that can adversely affect the generalisation ability of the network. In a Bayesian framework [29], training the neural network entails minimizing an error function using hyperparameters in order to regularise the weight matrix and control the noise parameters. Such network-pruning algorithms can effectively maximize the likelihood function to obtain the best set of parameters to prevent overfitting. The principle of Occam's razor [30] emphasizes the importance of preferring simpler models to complex ones. This is realised within the Bayesian framework and is especially useful for weight regularisation and marginalisation of the network output [29,30].
The generalisation ability of the network is determined by the error function E(w) expressed as: where β is the hyperparameter controlling the variance in noise, α is the regularisation coefficient and w the weight vector. E S is same as the term E(x,w) described in Equation (3). The regularisation term (E R ) favours small values of network parameters, thereby eliminating the possibility of overfitting noise in the training data.
ANNs can perform poorly when the 'weights' are reported to have unrealistically large values to fit the details in the training data. A suitable prior distribution of weights P(w) was considered before observing the data instead of a single set of weights. Using Bayes' rule, the posteriori probability distribution of the weights can be expressed as described by the authors of [29], where P(D/w) is a dataset likelihood function and P(D) is a normalization factor.
We can express the distribution as an exponential of the form if a Gaussian prior is assumed using [34]: where Q R (α) is a normalisation factor. Hence, when |w| 2 is large, E R is large, and P(w) is small. Thus, the choice of prior distribution suggests that smaller weight values lessen the chances of overfitting the data. In this study, a prior distribution of weights following a Gaussian distribution was used with the mean centred around 0 and standard deviation of 0.1. The evidence program [29] that assumes a Gaussian approximation of the Bayesian neural network was used to develop an iterative algorithm for determining optimal weights and hyperparameters. The evidence procedure estimates the posterior density of the hyperparameters as: This was undertaken by evaluating hyperparameters that increased the posterior probability of the weight matrix, and the subsequent calculations were carried out with hyperparameters set to these values.
In neural network regression problems where the outputs happen to be very close to the target values, the Hessian matrix (H), defined as the second-order partial derivatives of the error function (E), can be calculated using the outer-product approximation [35] given by: where y is the predicted output, and w ji and w kj denote the first-and second-layer connection weights. The inverse Hessian (H −1 ) and Eigen value spectrum (ψ i ) can be then calculated to evaluate parameter γ using: The evidence procedure considers the posterior density of the hyperparameters to be sharply peaked around α MLP and β MLP , i.e., the most probable values of the hyperparameters. Since the Hessian is evaluated at w MLP , it should satisfy the equations [29]: The new values of α and β can be evaluated using: To improve the model accuracy and reliability, the hyperparameters were independently reiterated four times separately for the two datasets (see Table 4). The Bayesian framework can marginalise the output predictions to coincide with the predictions made by the most probable weight vector, thereby minimizing overfitting. Subsequently, ensemble networks consisting of output prediction using six models were used to evaluate the mean and standard deviation of the predicted residual stress distribution. In principle, multiple networks can be combined to constitute an ensemble or "committee" that can significantly improve the generalisation ability [39]. Parametric studies (see Section 5.2) comprising artificial single-variable illustrations were undertaken to study the effect of LSP process parameters on the induced residual stresses. Case studies demonstrating the efficacy of the Bayesian neural network model were undertaken using the 'leave-one-out' cross validation method (discussed in Section 5.3). Table 4. Optimisation of the hyperparameters α and β using the Bayesian evidence framework. The hyperparameters α and β control other parameters (weight and biases) of the multilayer perceptron (MLP) network. The hyperparameters were estimated four times.

Genetic Algorithm for Optimisation of Process Parameters
Genetic algorithms are evolutionary algorithms inspired from Darwin's theory of natural selection. GAs have been effectively used to optimise several industrial processes in welding [40,41], energy consumption [42] and shop scheduling [43]. Figure 6 shows a flowchart of the ANN-GA system where the ANN is a forward prediction model used to determine the residual stress distribution based on the process parameters of laser peening and the GA is a reverse optimisation model used to determine the optimum process parameters for the desired residual stress level.
For the use of optimisation algorithms, it is critical that a sufficiently accurate model be developed that can predict outputs from a set of inputs. The GA uses such prediction models to reverse the process in order to generate optimised parameters that can be used to obtain the desired outputs. The algorithm starts with assuming several random solutions known as chromosomes. Each of these solutions is then used to calculate the outputs using the developed prediction model to calculate the error between the desired and the obtained outputs. The chromosomes are accordingly assigned a fitness value and ranked. The fittest chromosomes are then used to generate a new population of chromosomes through a series of crossover and mutation operations. Crossover refers to interchanging some of the values in the chosen chromosomes. This has the potential to lead to fitter sections in the chosen chromosomes to form the new population. Generating such chromosomes through multiple crossovers can lead to a solution close to the global minimum of the error function. Crossover is performed at a predetermined rate obtained through trial-and-error during the development of algorithm parameters. However, it is possible that through crossover, the search process is trapped in a local minimum, which has an unacceptably high value of the error function. In order to introduce randomness in the solutions and for the search to avoid getting trapped in a local minimum, mutation is performed at a predetermined rate. Mutation includes randomly changing the values of some of the chromosomes in the solutions. In some cases, one copy of the best chromosome (solution) is reserved to pass to the next generation unaltered. This mechanism is called elitism. Elitism ensures that the best solution is never lost in the process of crossover and mutation. It is also important to note here that all the parameters used in the GA are optimised between [−1, 1] to be consistent with the prediction models. Figure 6. Flowchart of the ANN-genetic algorithm (GA) system. The ANN model is a forward prediction model used to determine the residual stress distribution based on the process parameters of the laser peening, and the GA model is a reverse optimisation model used to determine the optimum process parameters for the desired residual stress level.
For the implementation of GA in optimising the LSP process, the previously developed ANN models were used. The GA applied for the optimisation tasks used the underlying principles of elitism, crossover and mutation. The objective of the GA is to obtain the desired residual stresses in a sample through various combinations of the input parameters. For the evaluation of every solution, the error function was calculated using: where E i is the error in solution for chromosome i, T d is the desired transverse residual stress, T o is the obtained transverse residual stress, L d is the desired longitudinal residual stress and L o is the obtained longitudinal residual stress. The pseudo-code for elitism and generation of next population used in the applied GA is shown below:
Loop till termination criteria is met • Evaluate every Cs for its fitness using the validated ANN • Rank Cs according to the fitness (f) • Save solution with best f for next generation • Use rank-based selection for crossover and mutation • Generate new population using crossover and mutation rate 4. Take elite chromosome as the solution 5.
End Program The parameters of the GA model used for the optimisation studies of single-shot laser peening (dataset 1) are given in Table 5. The case studies provided in the next section demonstrate the application of GA for optimisation of the process parameters to obtain the desired parameter (residual stress) by fixing one or more input parameters. In these cases, the assigned values of the GA chromosome were reverted to the desired values before generating the new population.

Generalisation Ability and Relevance of Input Parameters
The ANN model performance was evaluated using scatterplots showing the measured and predicted data using independent training and test datasets (see Figure 7). The datapoints displayed as squares and circles signify the residual stress measurements at a point (network outputs) in multiple samples at different depths in the longitudinal and transverse directions. The training data (75% of the partitioned experimental data) are shown on the left-hand plots, and the test data (25%) are shown on the right-hand plots for dataset 1 (Figure 7a,b) and dataset 2 (Figure 7c,d). It is often appropriate to evaluate the fitting uncertainty of the predictive model using the training data, whereas test data scatterplots can provide a reliable estimate of the generalisation ability of the network. Despite the underlying difference in the peening patterns, the ANN model is able to predict the residual stresses in both datasets with relatively few outlier points as demonstrated in the test data results (see Figure 7b,d).
Garson's algorithm is an effective method to illuminate the 'black box' architecture of the neural network by providing more explanatory insight into the contributions of the input parameters. In LSP research, there is consensus that the process variables have a significant influence on the resulting residual stress distribution. However, a quantitative estimate of the relative contribution of process parameters based on measured residual stress data has not yet been reported. The results showing the relative importance (RI) of input variables using Garson's algorithm are presented in Figure 8. In dataset 1, power density was the most dominant parameter, with a relative importance close to 40% RI, followed by spot size (~33%) and number of layers (~28%). However, in dataset 2, the effect of spot diameter was more predominant, with an RI~38%, followed by number of layers (~34%) and offset distance (27%). As envisaged, all the input parameters from both datasets had a substantial influence on the predicted residual stresses. However, it is considered beneficial if the relevance of the input parameters can be quantitatively determined, as the parameters having low relevance can then be eliminated from subsequent prediction models and design of experiments. Second, the process variables that show higher relevance can be closely monitored to achieve the desired goals during peening, for example, maximum compressive stresses on the surface. Figure 7. Comparison of predicted and measured residual stresses in longitudinal (datapoint denoted as square) and transverse (datapoint denoted as circle) directions with linear fitting for (a) training data and (b) test data using single-shot laser peening data (dataset 1), as well as (c) training data and (d) test data using multiple-shot laser peening data with overlap (dataset 2).

Figure 8.
Relative importance (RI) of inputs for the predicted residual stresses using the ANN model using Garson's algorithm for (a) single-shot laser peening data (dataset 1) and (b) multiple-shot laser peening data with overlap (dataset 2).

Parametric Studies
Parametric studies were undertaken using actual data and by bridging artificial single variable experiments via predicted data to exemplify the complex relationships existing in the process variables and residual stresses. Parametric studies were used to elucidate the data dependencies and to reveal complex mechanisms that can also aid in the mechanistic understanding of the LSP process. In single-shot laser peening (see Figure 9), the residual stresses are expressed as a function of number of layers for different spot size and power density combinations. In Figure 9i, for the spot size and power density combination (8.5 mm and 1 GW/cm 2 ), maximum compressive residual stresses of −200 MPa were observed at the surface. Importantly, the variation of the residual stresses along the depth was not significant for different number of layers (1-7). On the other hand, in Figure 9ii, relatively higher magnitude of residual stresses and extent of penetration were found both at the surface and deep into the material for the spot size and power density combination of 5 mm with 3 GW/cm 2 . This was possibly due to the generation of stronger shock waves propagated through the material, resulting in higher plastic deformation. It was also found that the magnitude of compressive stresses and the extent of penetration were much higher with increasing number of layers. Further, in Figure 9iii, for the spot size and power density combination of 3.5 mm with 6 GW/cm 2 , we see a decline in the magnitude of compressive stresses close to the surface in both longitudinal and transverse directions. However, in the transverse direction, there was considerable increase in the compressive residual stresses through the depth even with fewer number of layers. This was not consistent in the longitudinal direction, which could be attributed to the reverse plasticity effect as a result of over-peening and the generation of a large elastic strain field, causing a sharp decrease in the magnitude of compressive residual stresses near the surface. Furthermore, this analysis demonstrates the nonlinear nature of the process variables and justifies the use of data-based modelling approaches to extract non-evident relationships in the input and output data.
Results from the parametric studies in multiple-shot laser peening with overlap (dataset 2) are shown in Figure 10. Here, the residual stress distribution as a function of depth below the peened surface is presented as a function of spot size for different combinations of offset distance and layers. The offset distance also defines the overlapping density, i.e., the number of laser spots in a given area. It is important to note that with low offset distance, the overlapping density increased and vice versa. In Figure 10i,ii (offset distance = 0.4 mm and 0.5 mm), maximum compressive stresses of magnitude over −400 MPa were observed at the surface and up to a depth of 200 µm in the longitudinal direction for spot size range 1.8 mm-2.0 mm. In the transverse direction, maximum compressive stresses of about −300 MPa were observed up to a depth of 250 µm for spot size less than 1.8 mm. In Figure 10iii, there was a slight decrease in the compressive zone of residual stresses along the longitudinal direction and no significant changes in the transverse direction. However, in Figure 10iv, there was a clear decrease in the magnitude of compressive stresses both at the surface and into the depth. This pattern was consistently observed in both the longitudinal and transverse directions. Overall, we see a significant shift in the compressive residual stresses as a function of distance from the peened surface when the offset distance was varied from 0.4 mm to 0.7 mm.
In the multiple-shot laser peening data with overlap (dataset 2), there was considerably less scatter in the training data as opposed to the single-shot laser peening data (dataset 1) as evident in Figure 7a,c. Therefore, in comparison, we do not see the same extent of variation in the residual stress distribution from the parametric studies.
These studies help to improve the understanding of the residual stress response for a material subjected to different laser processing conditions and to enhance transparency and build confidence in the model predictions.

Case Studies Using ANN and GA Models
Residual stresses were predicted as a function of the input parameters as a function of the depth below the peened surface using the Bayesian neural networks and applying a "leave-one-out" cross-validation method. Table 6 shows a summary of the input parameters used for the prediction model. Measured and predicted residual stresses are compared in Figure 11 for different cases. In Figure 11a,b, residual stresses are simulated for (spot size = 8.5 mm, layers = 4 and power density = 1 GW/cm 2 ) using dataset 1. The ANN prediction was found to overestimate the residual stresses by about −80 MPa along both directions, and the mismatch was observed at a depth range of 100-400 µm. Apart from this discrepancy, the predicted and measured stresses were in reasonable agreement. In further examples in Figure 11c,d, the predicted and measured residual stresses were in excellent agreement throughout the depth for input parameters (spot size = 3.5 mm, layers = 2 and power density = 6 GW/cm 2 ). In dataset 2, very good consensus was observed in all the predicted cases as shown in Figure 11e-h. The predicted stress profile was seen to closely follow the trend in the measured residual stress profiles, especially with the peak compressive stresses and the high stress gradients present near the surface. The scatter within the predictions was markedly low in dataset 2. Therefore, the error bars that were subsequently calculated using the standard deviation of predicted data of the ensemble networks were small in the simulated residual stress distribution. Overall, the ANN model predictions were consistently in good agreement with the measured residual stress profiles, with differences of less than 100 MPa between the measured and predicted data. In contrast, the amount of information required to develop the ANN model is not tedious, unlike mechanistic models, and does not involve comprehensive testing regimes to evaluate the material properties. Moreover, the ANN model covers the critical parameters such as LSP process variables and utilizes the measured residual stress data. The application of GA was demonstrated using multiple case studies from the singleshot laser peening data. In the first case study, the algorithm was given the freedom to optimise all the process parameters, namely spot size, layers and power density. The GA was used to obtain the values of the longitudinal and transverse residual stress at a given depth as shown in Table 7. On running the algorithm, the solutions for the input parameters obtained by the GA are shown in Table 8 alongside the predicted residual stresses from the ANN model. A mean RMSE of 7.61 was obtained with three degrees of freedom, suggesting that the GA efficiently optimised the input parameters. For the second case study (see Table 9), the number of layers was two, three and five for three independent iterations. The solutions showing the optimised process parameters obtained by applying the GA with fixed number of layers are shown in Table 10. The RMSE value (14.64) nearly doubled in the second case study with two degrees of freedom, suggesting that parameter design problems are challenging due to the nonlinear relationships between the output and input parameters. However, with the application of GA, any set of parameters can be efficiently optimised through convergence to a global solution within the corresponding parameter bounds. This approach is superior to the Taguchi optimisation methods [23,24] where the mathematical formulation of the objective function is undefined in an industrial paradigm. On the contrary, GA optimisation models are much more noise-resistant and can deal with complex systems, potentially improving the quality of surface treatment using LSP. However, this is based on the availability of adequate high-quality process and residual stress data to train the intelligent models. Figure 11. Case studies showing the predicted residual stresses as a function of depth using the ANN model. Uncertainty bounds calculated using mean ± standard deviation from the output distribution of six committee networks. Predictive results using dataset 1 shown in (a-d) and dataset 2 in (e-h), respectively. Acronyms stands for spot size (SS), layers (L), power density (PD) and offset distance (OD).  Table 8. Optimised input parameters using the GA to obtain the desired parameters in Table 7 with three degrees of freedom (only relative depth fixed as an input parameter).   Table 10. Optimised input parameters using the GA to obtain the desired parameters in Table 9 with two degrees of freedom (relative depth and number of layers fixed as input parameters).

Conclusions
The main findings in this study can be summarized in the following points:

1.
A data-based approach based on artificial neural-network was developed within a Bayesian framework for analysing residual stress data in laser shock peening. The ANN prediction model is capable of estimating the residual stress profile as a function of depth below the peened surface and using different process variables as inputs.

2.
The accuracy of the prediction model was evaluated using different performance indicators, such as root mean square error (RMSE), absolute fraction of variance (R 2 ) and mean absolute percentage error (MAPE). The ANN model was able to achieve the respective error values in the test data: Dataset 1-single-shot laser peening with square spots (RMSE = 0.0992, R 2 = 0.9719 and MAPE = 23.8603) and Dataset 2-multiple-shot laser peening with circular spots (RMSE = 0.0912, R 2 = 0.9894 and MAPE = 13.1025).

3.
The contributions of different process parameters on the resulting residual stress distribution were evaluated using Garson's algorithm and parametric studies. 4.
The ANN approach was validated using several case studies employing a 'leaveone-out' cross validation method. Very good agreement was observed between the predicted and measured results, suggesting that the model was able to identify the non-evident relationships between the process variables and residual stress distribution.

5.
The ANN-GA integrated system was used to optimise the process parameters for different case studies by specifying the desired residual stress magnitude at a given depth. The GA reported a mean RMSE of 7.61 and 14.64 in case studies with three and two degrees of freedom, respectively. The application of the ANN-GA system provides a reliable method for determining the optimal process parameters in laser shock peening with the caveat that vast amount of data covering a wide range of process parameters and extensive residual stress data are made available for training and validation of the machine learning models.