## 4 Experiment and Results
### Gradient/Deep Explainer Based Strategy for Feature Selection  
The feature vectors extracted from the InceptionResNetV2 have a very high dimension that leads to intractable workload and curse of dimensionality problem. However, developing a strategy for selecting an optimal subset of features is a challenge, as food recognition has many domain-specific challenges, such as no spatial layout information. We tackled this challenge by employing Gradient Explainer to visualize and understand the insight details. Figure 15 shows the red pixels have a positive contribution, and blue pixels have a negative contribution towards the most likely class. Similarly, for multilabel classification, Figure 16 shows that the SHAP values of the pixels from the visible portions of the ingredients in the food photo have a positive contribution towards the output. In the second common scenario, When the food ingredients are not visible in the image as shown in Figure 17. They are either hidden beneath the food or simply not visible. The SHAP values indicate that the model activates regions for various ingredients without any visually clear explanation. The key finding from our visualizations is that it shows the pixels from all the visually relevant regions in the food image do not contribute equally towards the desired category or ingredient. Following this idea, the proposed strategy selects the best features, with positive contributions towards the most likely food classes or food ingredients. We have selected the top 500 attributes from the feature vectors of the food images using our algorithm based on Deep Explainer and Gradient Explainer as in Algorithm 1. Table 4 shows the comparison of the classification performance on the PKELM classifier. It shows that the features selected by our method improve performance on the average of three trials in contrast to Relieff. The reduction in training time for food category and ingredient detection (51.73%) is at par with the Relieff method [1]. The advantage of the proposed feature selector is that it uses an explainable AI approach to analyze the importance of the features in contrast to classical techniques such as Relieff, which do not have any visual explanations of selected features.  
Figure 14: t-SNE visualization shows overlapping among the feature vectors of low-quality images extracted (**A**) from the model fine-tuned with pristine images, (**B**) model fine-tuned using all low-quality images and (**C**) model fine-tuned using our proposed strategy.  
Figure 15: (**A**) Randomly selected image from Pakistani food dataset (**B**) Randomly selected image from UECFOOD256 dataset. Red pixels present the SHAP values of the image having a positive contribution towards the class while blue pixels show the pixels that reduce the probability of class.  
Figure 16: (**A,B**) Randomly selected images with visually visible ingredients. The visualization shows that the SHAP values of the pixels from the visible portions of the ingredients in the food image have the highest contribution towards the most likely outputs. By using ranked_outputs = 5 we explain only the five most likely ingredients. Bold indicates the actual ingredients.  
\begin{table}
\begin{tabular}{l l l l} \hline \hline
**Datasets** & **ReliefF** & **Deep Explainer** & **Gradient Explainer** \\ \hline Food101 & 85.54 & 85.09 & 86.05 \\ UECFOOD100 & 90.63 & 90.71 & 90.98 \\ UECFOOD256 & 75.85 & 79.56 & 79.34 \\ PFID & 100 & 100 & 100 \\ PFID-Baseline & 69.97 & 70.64 & 71.15 \\ Pakistan Food & 76.01 & 75.70 & 77.43 \\ VireoFood-172 & 91.88 & 91.97 & 92.09 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Comparison of average classification performance on incrementally trained classifier PKELM (RBF) by using different feature selection methods.  
Figure 17: Red pixel shows the SHAP values that increase the probability of the ingredients. The blue pixels show the SHAP values that decreases the probability of the ingredients. By using ranked_outputs = 5 we explain only the five most likely ingredients.