The stability and reliability of explainable artificial intelligence (XAI) explanations are unclear, despite the growing use of XAI. In this study, we evaluate the stability and faithfulness of class-activation mapping (CAM)-based explanations from CNNs and vision transformers (ViTs) when classifying keratoconus using corneal topography. CNNs (ResNet-50) and ViTs (B/16) were trained on a public dataset of corneal topography images classified as normal, suspect, or keratoconus. Grad-CAM was used for CNN, and Integrated Gradients (IG) was used for ViT to generate heat/attribution maps displaying regions important to a model’s diagnosis. Explanation reliability was measured with CAM/IG instability, structural similarity index (SSIM), confidence with CAM/IG and random pixel removal, and explanation dispersion values (EDV). CNN CAM instability was high (0.84 normal, 0.45 suspect, 0.71 keratoconus), but ViT IG instability was low (0.22 normal, 0.24 suspect, 0.23 keratoconus). Explanation agreement between models was low (SSIM = 0.29). CNN prediction confidence was more sensitive to the removal of CAM regions compared to random ones (0.110 vs. 0.339), while ViT had no significant difference (0.382 vs. 0.354). EDV values were lower for ViT (-0.019) compared to CNN (0.135). The CNN's faithfulness was higher since its confidence was more sensitive to CAM vs. random removal, while ViT explanations exhibited less variability but lower faithfulness. These findings suggest that CAM/IG reliability is architecture-dependent, and XAI should be evaluated before clinical use.
Shankar Harikrishnan (Sun,) studied this question.