## 3 Methodology
### XAI Models through Metaheuristic Optimization  
The XAI model under consideration hinges on the interpretation of features that have undergone a metaheuristic-based optimization process. This optimization ensures that the selected features are not only relevant but also contribute significantly to the model's overall performance. The feature interpretation within our framework is a two-pronged approach aimed at enhancing both robustness and interpretability. First, we utilize Shapley Additive exPlanations (SHAP) to quantify the importance of individual features. This provides a metric for assessing the robustness of the selected features in influencing model outcomes. Second, we implement a visual interpretation strategy by mapping the selected features back onto the original images. This visual mapping facilitates a more intuitive understanding of the role played by specific features in the model's decision-making process. By juxtaposing selected features against their corresponding images, this method provides a tangible link between abstract mathematical representations and real-world visual elements. The combination of these two approaches--quantitative assessment through SHAP and qualitative understanding through visual mapping--not only fortifies the robustness of the XAI model but also introduces a layer of interpretability. Observing and comprehending the features that underpin model decisions is paramount for building trust and facilitating informed decision-making in applications, especially ones related to diagnostic systems such as breast cancer detection, for which this study is undertaken.  
Figure 5a-c below illustrate the feature interpretation process. Figure 5b shows the Canny Edge and LBP extraction for given sample images. Figure 5c portrays the same features post feature selection, effectively mapped back for interpretation. This juxtaposition allows for a direct comparison, showcasing the impact of the feature selection process on the extracted features. It serves as a visual narrative of how the model prioritizes and refines features, shedding light on the interpretability of the chosen features.  
Figures 6 and 7 show the quantifiable aspects of features in the image data. The upper part of Figure 6 presents a chart depicting the extracted features. Complementing these features, the lower part of Figure 6 exhibits a feature graph of the selected features after the metaheuristic-based optimization process. This clear differentiation between the extracted and selected features allows for a look into the model's preference for certain features over others. Within both figures, the blue bars represent features of the sample healthy image, while the red bars are for a different sample image of the sick category.  
The integration of SHAP values into the optimization process allows for a more informed selection of features based on the importance of individual features as determined for distinguishing between classes. Figure 7 is an example of a feature impact visualization, using a SHAP dependency plot.  
Figure 5: (**a**) Original cropped image; (**b**) feature extract image: top using canny edges, middle LBP extractor and bottom using HOG; and (**c**): selected features mapped back to extracted features.  
Figure 6: Example feature selection; top: extracted features using LBP extractor; bottom: selected features using HSMO.  
Figure 7: Example of explaining prediction using SHAP plot: the left side after applying HSMO optimization; the right side without optimization, both using an HOG feature extractor. The X-axis represents the value of Feature 4, and the Y-axis shows its SHAP value, indicating its contribution to the model’s prediction. The color gradient represents secondary features (Feature 21 in the left plot and Feature 25 in the right plot), showing their interaction with Feature 4. The optimized model (left) displays a clearer and more structured relationship between features.