Instability and Interpretability Discrepancies Between CNNs and Vision Transformers in Keratoconus Detection
The stability and reliability of explanations from explainable artificial intelligence (XAI) are unclear, while its use has grown in medical imaging. In this study, we evaluate the stability and faithfulness of class activation mapping (CAM) based explanations from convolutional neural networks (CNNs) and vision transformers (ViTs) when classifying keratoconus with corneal topography maps. CNNs (ResNet) and ViTs (B/16) were trained on a public dataset of corneal topography images classified as normal, suspect, or keratoconus. Grad-CAM generated heatmaps displaying regions important to a model’s diagnosis. Explanation reliability was measured with CAM instability, structural similarity index (SSIM), performance with CAM and random pixel removal, and explanation dispersion values (EDV). CNN CAM instability was high for normal and keratoconus (0.908 and 0.895), but lower for suspect (0.556). There was low explanation agreement between the models (SSIM = 0.0218). ViT prediction confidence was more sensitive to the removal of CAM-guided regions compared to random ones (0.287 vs. 0.568), while CNN had no significant difference between the two (0.356 vs. 0.333). EDV values were an order-of-magnitude lower for ViT (2.02x10-5) compared to CNN (1.46x10-4). Even with the same diagnosis, the two models generated very different explanations. The ViT’s faithfulness was high since its confidence was more sensitive to CAM removal compared to random removal, directly contrasting with the CNN. ViT explanations also had less variability compared to CNN ones. These findings suggest that CAM reliability is architecture-dependent, and XAI should be evaluated before clinical use.
Authors
- Shankar Harikrishnan
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2025-12-30
- DOI
- https://doi.org/10.5281/zenodo.18102672
- Primary Topic
- Corneal surgery and disorders
- Type
- article
- Field-Weighted Citation Impact
- 0.00