Attributable Visual Similarity Learning

Borui Zhang, Wenzhao Zheng, Jie Zhou, Jiwen Lu

Abstract

Traditional deep metric learning models often operate as "black boxes," mapping images to embeddings without explaining the underlying reasons for similarity. We present Attributable Visual Similarity Learning (AVSL), a framework that decomposes similarity into a hierarchical graph of visual concepts. By mimicking human cognition—comparing objects from coarse to fine—AVSL provides interpretable "attributions" for similarity scores while achieving state-of-the-art performance in image retrieval tasks.

Introduction: The Interpretability Gap in Metric Learning

Similarity Learning, or Metric Learning, is fundamental to computer vision applications like face recognition and image search. Conventional models typically compress an image into a single mathematical vector (an embedding) and calculate distances between these vectors. However, this approach lacks transparency; it is difficult to determine why a model considers two images similar or different. Furthermore, by collapsing information into a single point, these models often fail to capture the inherent hierarchical structure of objects.

Hierarchical attribution of similarity between two cars, showing how global similarity is decomposed into specific parts like the body, wheels, and engine hood.

The AVSL Framework

The proposed AVSL framework moves away from monolithic embeddings toward a structured, graph-based representation. It operates through two distinct phases:

1. Bottom-Up Similarity Construction

Instead of relying solely on the final network layer, AVSL extracts features across multiple levels of abstraction. It constructs an undirected graph where nodes represent similarity at different hierarchical levels. To ensure these comparisons are semantically meaningful, the framework employs Class Activation Maps (CAMs) to identify and align corresponding spatial regions, such as a bird's wing or a car's headlight.

2. Top-Down Similarity Inference

This phase introduces a "rectification" mechanism. The model estimates the reliability of high-level similarity nodes. If a coarse-grained concept is deemed unreliable or ambiguous, the framework dynamically adjusts the final score by deferring to more certain, lower-level features. This hierarchical inference allows the model to "trace back" the final similarity score to specific visual components.

The AVSL architecture, illustrating the bottom-up construction of similarity nodes across layers and the top-down inference process for reliability-driven rectification.

Experimental Evaluation

AVSL was evaluated on three standard benchmarks for image retrieval in a zero-shot setting:

  • CUB-200-2011: Fine-grained bird species recognition.
  • Cars196: Classification of 196 car types.
  • Stanford Online Products (SOP): A large-scale dataset of commercial products.

The framework consistently outperformed state-of-the-art (SOTA) methods. For instance, on the Cars196 dataset, AVSL improved the Recall@1 score of the popular ProxyAnchor baseline from 87.7% to 91.5%. On CUB-200-2011, it pushed the Margin loss baseline from 65.6% to 68.8%.

Key Insights

  • Active Explainability: Unlike passive post-hoc explanation methods, AVSL integrates interpretability directly into the learning process, which in turn improves feature quality.
  • Inductive Bias through Hierarchy: By forcing the model to follow a part-to-whole hierarchy, it generalizes more effectively to unseen classes.
  • Reliability-Driven Rectification: The ability to weigh features based on their estimated reliability provides a robust mechanism for handling visual noise and complex scenes.

Conclusion and Future Work

AVSL demonstrates that interpretability and performance are not mutually exclusive in metric learning. While the current implementation faces challenges regarding computational complexity and perfect concept disentanglement, it opens new avenues for hierarchical graph-based learning. Future research may extend this framework to multi-modal data, such as text-image retrieval or speech analysis.

Summary updated

BibTeX
@inproceedings{zhang2022attributable,
  author = {Borui Zhang and Wenzhao Zheng and Jie Zhou and Jiwen Lu},
  title = {{Attributable Visual Similarity Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
}
Figure