# Deep Learning Based Inversion of Locally Anisotropic Weld Properties from Ultrasonic Array Data
## 3 Results  
To initially test the performance of the trained DNNs, an additional set of 100 randomly generated weld models (not used in network training) are used as input to the AMSFMM forward model. The resulting ToF data was then used as input to the DNN to obtain predictions of the grain orientations (this is the inverse crime case where the model used to generate the training data and the test data is the same). Two examples of the predictions for grain orientation maps of the test models are compared against the true grain orientation maps in Figure 6, for each of the three transducer array configurations. For all cases, the predicted grain orientations (depicted by red arrows) closely resemble the true orientations (blue arrows), and in fact often lie on top of each other and are virtually indistinguishable. To examine these results further, the mean absolute error averaged across the 100 test models for each of the 91 sub-regions within the weld is shown in Figure 7 for each of the transducer array configurations. The DNN predictions in the through-transmission transducer array configuration case (Figures 6a and 7a) perform the best, with low MAE values generally less than \(2^{\circ}\), with particularly high accuracy in the centre of the weld where there the ultrasonic coverage is highest. The higher errors observed at the upper, outer edges of the weld can be attributed to the fact that few ray paths pass through these areas and so they are less well constrained by the ToF data. The offset through-transmission transducer array configuration (Figures 6b and 7b) also exhibits a strong correlation between prediction accuracy with ultrasonic coverage. The receiving elements in this configuration are offset to the right hand side of the weld root, therefore along the left boundary of the weld there is poor coverage by the ultrasonic waves, so the accuracy is lower in these sub-regions (MAE \(>4^{\circ}\)). Where coverage is good, to the right of the weld region, the prediction accuracy is high (MAE \(<2^{\circ}\)). Finally the grain orientation predictions for the pulse-echo transducer array configuration exhibits poorer accuracy (MAE values are approximately between 2 and \(4^{\circ}\)). In the pulse-echo configuration, waves travel longer along more complex paths and so the inverse problem becomes more challenging. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Hyperparameter**} & \multicolumn{2}{c}{**Through-**} & \multirow{2}{*}{**Offset TT**} & \multirow{2}{*}{**Pulse-Echo**} \\  & **Transmission (TT)** & & \\ \hline Learning rate & \(5\times 10^{-3}\) & \(2\times 10^{-3}\) & \(3.8\times 10^{-3}\) \\ Decay rate & \(5.4\times 10^{-3}\) & \(4.4\times 10^{-3}\) & \(4.5\times 10^{-3}\) \\ Nodes in layer 1 & 283 & 220 & 303 \\ Nodes in additional layers & 46 & 48 & 44 \\ Number of layers & 4 & 4 & 4 \\ Activation function & Sigmoid & Sigmoid & Sigmoid \\ \hline \hline \end{tabular}
\end{table} 
Table 1: DNN hyperparameters selected from stochastic optimisation. For the tests described above, the same mathematical model (AMSFMM) has been used for both the training data and the test data (a so called inverse crime [36]), and this is not a sufficient challenge of the methodology [42], particularly as we are using model-driven techniques to describe real-world phenomena. So, to further test the performance of this model trained DNN framework, we now consider more realistic ToF data \(\mathbf{T_{m}}\) generated using the FE model described in Section 2.3 for the set of grain orientations shown in Test Model 1 (plotted in Figure 6). We use only the pulse-echo transducer array configuration, as this single-sided inspection is closer to what may be achieved in practice (although for in situ application, we would need to consider the topography of the weld cap-see discussion in Section 4).