# Fault Diagnosis Across Aircraft Systems Using Image Recognition and Transfer Learning
## 5 Explanation and Evaluation of Results
### Grad-CAM Visualisation for 2D-CNN TL Result  
To understand how deep networks make decisions about classification, a useful visual explanation tool, the Gradient-Weighted Class Activation Mapping (Grad-CAM) [29], is used. Using the gradient information that flows into the last convolution layer of a CNN model, grad-CAM assigns a value of importance to each neuron for a given decision, thereby localising the regions in the input image that contribute most to the decision [29, 30]. Grad-CAM has been widely applied to address the 'black box' problem of deep models, and its success has also been seen in IFD applications [30]. Compared to other visual explanation tools, Grad-CAM is considered the state-of-the-art method that is applicable to any CNN without changing the CNN or requiring re-training [29]. Given a CNN model and input image, Grad-CAM generates a heatmap showing the concentration regions in the input image, which is useful to determine the fault patterns that the 2D-CNN-based TL solution has identified. In the scenario where only 15 cases were available for the ECS training set, the 2D-CNN-based TL solution generated the most significant improvement from the non-TL baseline. In this scenario, the 2D-CNN TL solution with ImageNet and fuel system data as the source gave 95.49% and 90.63% accuracy compared to 75.00% from the non-TL baseline. Therefore, this scenario has been \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Method**} & \multirow{2}{*}{\begin{tabular}{c} **Average Predictive Accuracy (\%) for Testing Set** \\ \end{tabular} } & \multicolumn{2}{c}{**Minimum Number of Cases in Training Set**} \\  & & **to Reach** & \\ \cline{2-5}  & \begin{tabular}{c} **1-30 Cases in ECS** \\ **Training Set** \\ \end{tabular} & \begin{tabular}{c} **1-50 Cases in APU** \\ **Training Set** \\ \end{tabular} & \
\begin{tabular}{c} **95\% Accuracy in ECS** \\ **Testing Set** \\ \end{tabular} &
\begin{tabular}{c} **75\% Accuracy in APU** \\ **Testing Set** \\ \end{tabular} \\ \hline
1D-CNN non-TL & & & & \\ baseline & 76.48 & 56.92 & 27 & 40 \\ \hline
2D-CNN TL solution & & & & \\ with ImageNet in source domain & & & & \\ \hline
2D-CNN TL solution & & & & \\ with fuel system in source domain & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Summary of results of 2D-CNN TL solution. selected to apply Grad-CAM to discover the reason for the improvement of the 2D-CNN TL solution. Using the ImageNet dataset to train the network in the source domain, the 2D-CNN transferred to ECS diagnosis was analysed by Grad-CAM. A case with six ESC-degraded modes was taken, and their Grad-CAM heatmap for the transferred 2D-CNN is plotted in Figure 14a-f. Here, red represents the most important regions, and blue represents the least important regions. Figure 14 shows that the transferred 2D-CNN focuses on the major fault patterns in all fault modes. The only exception is Figure 14d, which shows the healthy case. Since the ECS data are processed to be residual data from the healthy baseline, the input image of a healthy case is basically a horizontal line in a blank background, so the Grad-CAM heatmap also shows a concentration in the blank background, given that the blank background might be a more significant feature to catch instead of the thin line. Nonetheless, the identification of a largely blank background is effective enough to identify a healthy case. In summary, since the concentration regions for each health mode are different and coincide with the major distinguishing features of the input image, it can be concluded that the transferred 2D-CNN identified the fault patterns of each mode, which is the basis for its accurate diagnosis performance. Considering that the source domain, ImageNet, is an image dataset consisting of everyday items like pets, cars, fruits, etc., the target domain ECS datasets are composed of completely dissimilar pictures.