Cross-Modal Fusion Distillation for Fine-Grained Sketch-Based Image Retrieval

Abhra Chaudhuri, Massimiliano Mancini, Yanbei Chen, Zeynep Akata, Anjan Dutta

Abstract

Fine-Grained Sketch-Based Image Retrieval (FG-SBIR) aims to match a specific photo to a hand-drawn sketch. Traditional methods often struggle with the "modality gap" by discarding modality-specific features in favor of a common embedding space. We present XModalViT, a framework that leverages cross-modal attention to fuse complementary information from both sketches and photos. By distilling this fused knowledge from a teacher network into independent student encoders, we achieve state-of-the-art performance across multiple benchmarks without increasing inference-time complexity.

Introduction

The core challenge in FG-SBIR lies in the significant discrepancy between dense, texture-rich photos and sparse, abstract sketches. Conventional approaches typically attempt to bridge this "modality gap" by learning modality-invariant representations, effectively filtering out features unique to one modality. However, these modality-specific nuances—such as unique sketching styles or specific photographic textures—often contain discriminative information crucial for fine-grained matching.

Methodology: The XModalViT Framework

XModalViT addresses the modality gap through a two-stage teacher-student distillation process.

The Teacher: Modality Fusion Network

The teacher network utilizes Vision Transformers (ViT) and a novel Cross-Modal Attention (XMA) mechanism. Unlike standard dual-encoder models, XMA allows features from one modality to attend to the other, capturing complementary information. Training is guided by Cross-Attention Queue Contrast (XAQC), which employs a dynamic queue of negative samples to better align positive photo-sketch pairs in the fused embedding space.

The Student: Knowledge Distillation

To maintain efficiency during retrieval, the teacher's knowledge is decoupled into independent student encoders for photos and sketches. We introduce Cross-Modal Relational Distillation (XMRD) to ensure students learn the underlying geometric relationships (distances and angles) between objects in the embedding space, rather than just point-to-point mappings.

The XModalViT framework: A teacher network fuses cross-modal information via XMA, which is then distilled into independent student encoders using XMRD.

Experiments and Results

We evaluated XModalViT on three standard benchmarks: QMUL-Shoe-V2, QMUL-Chair-V2, and Sketchy.

Quantitative Performance

XModalViT achieves state-of-the-art results, notably reaching 45.05% acc@1 on Shoe-V2 and 56.15% acc@1 on the Sketchy dataset. The latter performance is particularly significant as it surpasses reported average human-level accuracy (54.27%).

Ablation study showing the contribution of Cross-Modal Attention (XMA), Cross-Attention Queue Contrast (XAQC), and Cross-Modal Relational Distillation (XMRD) to overall retrieval accuracy.

Key Insights

  • Information Preservation: Treating modality-specific features as complementary rather than noise leads to richer object representations.
  • The Large Teacher Advantage: Experiments with varying backbone sizes revealed that larger teacher models (e.g., ViT-Large) provide a more learnable target for students. Interestingly, increasing teacher size was found to correlate with faster student convergence.
  • Structural Robustness: Qualitative analysis indicates that the distilled sketch encoder becomes highly robust to varying sketching styles, focusing on the core structural geometry of the object regardless of sketch precision.

Conclusion

XModalViT demonstrates that fusing modality-specific information, rather than discarding it, is key to overcoming the modality gap in FG-SBIR. By distilling this fused knowledge, we provide a high-performance retrieval system that remains computationally efficient at runtime. Future research will focus on mitigating false positives caused by texture-heavy photo features and extending this fusion-distillation paradigm to other cross-modal tasks.

Summary updated

BibTeX
@inproceedings{chaudhuri2022cross,
  author = {Abhra Chaudhuri and Massimiliano Mancini and Yanbei Chen and Zeynep Akata and Anjan Dutta},
  title = {{Cross-Modal Fusion Distillation for Fine-Grained Sketch-Based Image Retrieval}},
  booktitle = {BMVC},
  year = {2022},
  url = {https://openreview.net/forum?id=Y2G-DwRvcX6},
}
Figure