Instability and Explanation Discrepancies Between CNNs and Vision Transformers in Keratoconus Detection

Read full text
Authors: Shankar Harikrishnan
Cited by: 0

Abstract

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.

Fields of Study & Subjects

Corneal surgery and disorders Ophthalmology and Visual Impairment Studies Ocular Surface and Contact Lens

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
4 January 2026
Language
EN