Introduction
Explainable AI (XAI) has traditionally focused on image classification—answering the question, "Why was this image labeled a cat?" In such scenarios, a saliency map highlighting ears or whiskers is often sufficient. However, image similarity models, which are crucial for fashion recommendation and image retrieval, present a more complex challenge. These models evaluate the interaction between two inputs. Knowing that a necklace matches a ring is one thing; understanding what specific property (e.g., color, material, or style) drives that compatibility is another.
Existing "black box" explanation methods do not easily translate to these pairwise relationships, leaving researchers with limited insight into why their embedding spaces behave as they do. To bridge this gap, we introduce SANE (Salient Attributes for Network Explanation), a framework that combines spatial saliency with human-interpretable attributes to provide causal explanations for similarity model behavior.
The SANE Framework
SANE is built upon three primary components designed to align visual importance with semantic concepts:
- Attribute Predictor: This module identifies visual attributes (e.g., "golden," "striped") and generates "activation maps" indicating their spatial locations within the image.
- Saliency Map Generator: By adapting methods like RISE and LIME, SANE identifies influential regions by perturbing the input image and measuring the resulting drop in similarity scores. This identifies the "where" of the model's decision.
- SANE Training & Ranking: During training, a "Map Matching" loss ($L_{hm}$) encourages attribute activation maps to overlap with similarity saliency maps. This forces the model to identify attributes that correspond to the regions the similarity model actually prioritizes.
At inference, attributes are ranked based on a weighted combination of prediction confidence, spatial overlap with the saliency map, and a Concept Activation Vector (TCAV) score. The TCAV score serves as a global prior for an attribute's general utility in the similarity model. This approach also accounts for the non-symmetric nature of similarity: the reason a ring matches a necklace (e.g., "black") may differ from the reason the necklace matches the ring (e.g., "golden").
Experimental Evaluation
The framework was evaluated on two distinct domains: Polyvore Outfits (fashion compatibility) and Animals with Attributes 2 (AwA2) (visual species similarity).
Key Findings
- Saliency Performance: Among adapted black-box methods, RISE (Randomized Input Sampling) performed best, demonstrating the sharpest drops in similarity scores when salient pixels were removed.
- Saliency as Supervision: Integrating saliency maps as supervision for attribute activation maps resulted in a 3% mAP boost in attribute recognition. This suggests that forcing the classifier to focus on regions driving similarity improves its overall feature extraction capabilities.
- Causal Explanations: Quantitative "insertion/deletion" tests demonstrated that SANE’s selected attributes significantly influenced similarity scores. On the Polyvore dataset, SANE achieved a 31.5% score on insertion metrics, outperforming standard attribute classifiers.
- Human Interpretability: A user study involving a "guessing game" revealed that participants were significantly more accurate at predicting model behavior when provided with SANE explanations compared to random maps or simple attribute labels.
Conclusion and Future Work
SANE demonstrates that pairing spatial saliency with semantic attributes provides a "causal" explanation that humans can verify. While the current implementation is limited by a predefined attribute vocabulary and the computational cost of black-box saliency methods, it marks a significant step toward making complex embedding spaces transparent. Future research will explore attribute discovery and more dynamic integration between saliency and attribute prediction modules.
Summary updated