Relation-Aware Meta-Learning for Zero-Shot Sketch-Based Image Retrieval

Yang Liu, Jiale Du, Xinbo Gao, Jungong Han, Ling ShaoIEEE TCSVT 2024

TL;DR

This paper introduces a novel framework, RAMLN, for Zero-Shot Sketch-Based Image Retrieval (ZS-SBIR) that tackles the challenge of retrieving images from unseen categories using sketches. It proposes a "relation-aware quadruplet loss" to better bridge the modality gap between sketches and photos and a meta-learning approach to adaptively learn the optimal margin for this loss, significantly improving retrieval performance.

What Problem Does This Paper Address?

Sketch-Based Image Retrieval (SBIR) aims to find real-world images that match a user's hand-drawn sketch. A major hurdle is that in real-world applications, users might sketch objects from categories the system wasn't initially trained on. This is the core problem of Zero-Shot SBIR (ZS-SBIR). Traditional SBIR methods focus on reducing the visual differences between sketches and photos. However, ZS-SBIR adds another layer of complexity: the model must not only bridge this "modality gap" but also generalize to entirely new object categories it has never seen during training. This requires a robust understanding of both cross-modal relationships and the ability to distinguish between different classes, even when those classes are novel.

Methods

The proposed solution, RAMLN (Relation-Aware Meta-Learning Network), introduces two key innovations:

  • Relation-Aware Quadruplet Loss: Instead of traditional triplet loss (anchor, positive, negative), this method uses a quadruplet loss. Crucially, it incorporates two negative samples from different modalities. This helps prevent a sketch's features from being too close to one type of negative photo while being too far from another, leading to better separation between classes. The loss is designed to push apart samples from different classes (inter-class) and pull together samples from the same class (intra-class), considering both cross-modal (sketch-photo) and intra-modal (sketch-sketch, photo-photo) relationships.
  • Meta-Learning for Adaptive Margin: The quadruplet loss, like triplet loss, has a hyperparameter called "margin" that controls the separation distance. The optimal margin can vary significantly across different categories and modalities. RAMLN uses a meta-learning approach with an external memory module to learn this margin adaptively. This "memory-augmented network" stores and retrieves feature information from seen classes to predict the optimal margin for unseen classes, enhancing generalization.

Datasets

The paper evaluates its method on two standard ZS-SBIR datasets:

  • Sketchy Extended: A fine-grained dataset with a large number of sketches and photos across 125 categories. For ZS-SBIR, a specific protocol (Sketchy-NO) is used, where 21 categories are held out as unseen during training.
  • TU-Berlin Extended: A category-level dataset with 250 object categories. For ZS-SBIR, 30 classes are randomly selected as unseen for testing.

Key Insights and Ideas

  • The "Double Negative" Advantage: Using two negative samples from different modalities in the quadruplet loss is more effective than a single negative. This provides a more comprehensive constraint, preventing the model from learning superficial similarities and forcing it to learn more robust cross-modal representations.
  • Adaptive Margins are Crucial for Generalization: Manually tuning the margin hyperparameter is suboptimal, especially in zero-shot settings where domain shifts are significant. Meta-learning to adapt the margin based on memory of seen classes is a powerful way to improve generalization to unseen categories.
  • Bridging Modality Gaps is Key: The core challenge in ZS-SBIR is the inherent difference between a sketch and a photograph. The proposed relation-aware loss directly addresses this by explicitly modeling and minimizing these cross-modal discrepancies.
  • Classification Loss Still Matters: Even though retrieval is primarily distance-based, incorporating a classification loss helps prevent the model from getting stuck in local optima and improves overall training stability.

Key Results

The proposed RAMLN method demonstrates significant improvements over existing state-of-the-art ZS-SBIR methods on both the TU-Berlin Extended and Sketchy Extended datasets.

  • Quantitative Improvements: The paper reports substantial gains in mAP (mean Average Precision) and Precision metrics. For instance, on the Sketchy Extended dataset, RAMLN achieves an 8.0% and 17% improvement in mAP over the ZSE method, and a 9.2% and 8.0% improvement over IVT. The method also shows strong performance with different backbone architectures (ResNet and ViT).
  • Qualitative Analysis: T-SNE visualizations show that RAMLN effectively clusters sketches and photos from the same class together, with minimal visual separation between modalities. Retrieval examples also indicate successful retrieval for most unseen class queries, though some difficult cases remain.

Limitations and Future Work

  • Difficult Cases: The authors acknowledge that some images are still clustered into the wrong group, suggesting that handling these difficult cases remains a research direction.
  • Generalization to Diverse Granularity: While the method performs well with varying sketch granularity, further exploration into its robustness against extreme variations in object shape and sample diversity could be beneficial.
  • Computational Cost: While not explicitly detailed as a limitation, meta-learning approaches can sometimes be computationally intensive. Future work might focus on optimizing the efficiency of the meta-learning process.

Summary updated

BibTeX
@article{liu2024relation,
  author = {Yang Liu and Jiale Du and Xinbo Gao and Jungong Han and Ling Shao},
  title = {{Relation-Aware Meta-Learning for Zero-Shot Sketch-Based Image Retrieval}},
  journal = {IEEE Trans. Circuits Syst. Video Technol.},
  year = {2024},
  url = {https://openreview.net/forum?id=SPX3ojtRVs},
}
Figure