Introduction
While Explainable AI (XAI) has made significant strides in interpreting classifiers that output single scalar probabilities, modern computer vision increasingly relies on representation learning. Self-supervised methods like SimCLR or SwAV produce high-dimensional vectors rather than simple class labels, creating a "black box" at the foundational level of these models. Existing XAI tools often struggle to handle these vector outputs without a specific downstream task. RELAX (REpresentation LeArning eXplainability) is the first attribution-based framework designed specifically to explain what a model learns in its representation space and to quantify the uncertainty of those explanations.
The RELAX Framework
RELAX is an occlusion-based method inspired by the RISE algorithm but re-engineered for representations. It moves beyond simple "best guess" importance maps by providing a statistical foundation for explanation reliability.
Methodology
- Masking: The algorithm generates thousands of random, smooth masks ($M$) and applies them to the input image.
- Similarity Scoring: Both the original and masked images are passed through the feature extractor. The framework then calculates the cosine similarity between the resulting representations. Empirical testing suggests cosine similarity significantly outperforms Euclidean distance in capturing semantic angular information.
- Attribution: Pixel importance is defined as the expected similarity score when that pixel is not masked.
- Uncertainty Quantification: By calculating the variance of similarity scores, RELAX produces an uncertainty map. High variance indicates that a pixel's perceived importance fluctuates wildly, signaling low reliability.
To improve efficiency, the authors developed a "one-pass" version of the algorithm that computes both importance and uncertainty simultaneously, halving the computational overhead.
Uncertainty and Faithfulness
A key innovation of this work is U-RELAX (Uncertainty-Filtered RELAX). This variant masks out high-uncertainty regions from the final explanation. By removing "noisy" parts of an explanation where the model is uncertain, the remaining map becomes much more faithful to the model's actual internal logic. The authors demonstrate that high importance does not always correlate with high certainty, making this filtering step crucial for trustworthy XAI.
Experimental Evaluation
The authors evaluated RELAX across standard benchmarks, including PASCAL VOC 2007, MS COCO 2014, and ImageNet.
Key Results
- Quantitative Superiority: RELAX consistently outperformed gradient-based baselines (such as Saliency maps and Integrated Gradients) in localization tasks. On PASCAL VOC, RELAX achieved a "Pointing Game" score of approximately 86%, compared to 82% for standard Saliency methods.
- Human Alignment: A user study involving 13 participants showed that RELAX and U-RELAX were overwhelmingly preferred over baseline methods, suggesting the explanations align better with human visual intuition.
- Versatility: The framework is not limited to deep learning; it was successfully applied to "classic" features like Histogram of Oriented Gradients (HOG), revealing that HOG focuses on sharp edges rather than central objects.
Conclusion
RELAX addresses a critical gap in XAI by providing a robust, theoretically grounded method for explaining representation learning. While perturbation-based methods remain computationally more expensive than gradient-based alternatives, the addition of uncertainty quantification and the "one-pass" optimization make RELAX a powerful tool for auditing the foundations of modern computer vision models. Future work may extend these similarity-based kernels to other domains, such as Natural Language Processing.
Summary updated