Abstract
Traditional feature attribution methods in computer vision rely on spatial heatmaps, which often fail to explain distributed features like texture or color. We present Spectral Occlusion (S-Occ), a novel Explainable AI (XAI) method that operates in the frequency domain. By perturbing images via Fourier Transform, S-Occ reveals how global, non-spatial features influence model predictions, particularly in complex medical imaging tasks like dermatology.
Introduction
Most feature attribution methods, such as Grad-CAM or LIME, generate heatmaps highlighting specific pixels or regions. While effective for object recognition (e.g., identifying a dog's snout), these methods struggle in high-stakes domains like dermatology or ophthalmology. In these fields, diagnoses often rely on distributed features—fine-grained textures or global color patterns—that overlap spatially. When a relevant texture covers an entire image, a spatial heatmap provides no nuanced insight. Spectral Occlusion (S-Occ) addresses this gap by moving explanation into the frequency domain.
Methodology: Spectral Occlusion (S-Occ)
S-Occ systematically hides information in the frequency domain rather than blacking out pixel patches. The process involves three main steps:
- Transformation: Input images are converted to the spectral domain using a Fast Fourier Transform (FFT), separating them into amplitude and phase components.
- Spectral Masking: Specific frequency bands are occluded using various schemes, including circular, rectangular, and randomized sampling.
- Reconstruction: The masked spectrum is reconstructed via Inverse FFT. The resulting image is passed to the model to measure prediction changes, generating a spectral attribution map.
To enhance interpretability, the authors developed several visualization techniques:
- Accumulated Heatmaps: Averaging maps across datasets to identify global model biases.
- Frequency Emphasis: Enhancing important textures/colors in the spatial image.
- Frequency Isolation: Creating visual counterfactuals by sequentially deleting frequencies.
Experimental Results
The method was evaluated using the Derm7pt dataset, focusing on binary classification of skin lesions (Melanoma vs. Nevus). S-Occ was tested across six CNN architectures, including ConvNeXt, DenseNet, and ResNet-50.
Quantitative Performance
S-Occ consistently outperformed established spatial methods in the Sensitivity metric. On average, S-Occ improved sensitivity scores by 0.38 compared to baselines, indicating higher fidelity in explaining model decisions.
Qualitative Insights
S-Occ successfully generated interpretable counterfactuals. For instance, in a Nevus classification, gradually removing relevant frequencies smoothed atypical pigmentation and blurred lesion borders until the model's prediction flipped to Melanoma. This demonstrates the model's reliance on specific textural cues.
Key Findings
- Amplitude Dominance: Occluding the amplitude spectrum proved more stable than phase occlusion, as phase shifts often introduce unnatural spatial distortions.
- Masking Geometry: Rectangular masking outperformed radially symmetric circular masking, likely due to better alignment with image boundaries and diagonal frequency emphasis.
- Architectural Biases: Accumulated heatmaps revealed that models like DenseNet and ResNet-50 exhibit unexpected reliance on mid-range vertical frequencies, suggesting potential dataset or architectural biases in tasks that should be rotation-invariant.
Conclusion and Future Work
S-Occ serves as a powerful complement to spatial XAI. By decoupling overlapping features, it allows researchers to determine whether a model prioritizes localized shapes or global textures. Future work will focus on reducing the cognitive load of these visualizations through intuitive dashboards and exploring hybrid spatial-spectral occlusion methods.
Summary updated