Cross-Image-Attention for Conditional Embeddings in Deep Metric Learning
Dmytro Kotovenko, Pingchuan Ma, Timo Milbich, Björn Ommer
Abstract
Learning compact image embeddings that yield semantic similarities between images and that generalize to unseen test classes, is at the core of deep metric learning (DML). Finding a mapping from a rich, localized image feature map onto a compact embedding vector is challenging: Although similarity emerges between tuples of images, DML approaches marginalize out information in an individual image before considering another image to which similarity is to be computed. Instead, we propose during training to condition the embedding of an image on the image we want to compare it to. Rather than embedding by a simple pooling as in standard DML, we use cross-attention so that one image can identify relevant features in the other image. Consequently, the attention mechanism establishes a hierarchy of conditional embeddings that gradually incorporates information about the tuple to steer the representation of an individual image. The cross-attention layers bridge the gap between the original unconditional embedding and the final similarity and allow backpropagtion to update encodings more directly than through a lossy pooling layer. At test time we use the resulting improved unconditional embeddings, thus requiring no additional parameters or computational overhead. Experiments on established DML benchmarks show that our cross-attention conditional embedding during training improves the underlying standard DML pipeline significantly so that it outperforms the state-of-the-art.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- DA-VPT: Semantic-Guided Visual Prompt Tuning for Vision Transformers cites Learning Semantic Proxies from Visual Prompts for Parameter-Efficient Fine-Tuning in Deep Metric Learning
- DA-VPT: Semantic-Guided Visual Prompt Tuning for Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Learning Semantic Proxies from Visual Prompts for Parameter-Efficient Fine-Tuning in Deep Metric Learning cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Learning Semantic Proxies from Visual Prompts for Parameter-Efficient Fine-Tuning in Deep Metric Learning cites Training data-efficient image transformers & distillation through attention
- Perceiver IO: A General Architecture for Structured Inputs & Outputs cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Perceiver IO: A General Architecture for Structured Inputs & Outputs cites Training data-efficient image transformers & distillation through attention
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites A Simple Framework for Contrastive Learning of Visual Representations
- Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Cited by top-tier papers2
Builds on25
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
- Perceiver IO: A General Architecture for Structured Inputs & OutputsAndrew Jaegle, Sebastian Borgeaud, Jean-Baptiste Alayrac, Carl Doersch et al.ICLR 2022 · 797 citations
- SoftTriple Loss: Deep Metric Learning Without Triplet SamplingQi Qian, Lei Shang, Baigui Sun, Juhua Hu et al.ICCV 2019 · 419 citations
Related papers
- Towards Interpretable Deep Metric Learning with Structural MatchingWenliang Zhao, Yongming Rao, Ziyi Wang, Jiwen Lu et al.ICCV 2021 · 52 citations
- Integrating Language Guidance into Vision-based Deep Metric LearningKarsten Roth, Oriol Vinyals, Zeynep AkataCVPR 2022 · 1 citation
- Deep Relational Metric LearningWenzhao Zheng, Borui Zhang, Jiwen Lu, Jie ZhouICCV 2021 · 53 citations
- Deep Compositional Metric LearningWenzhao Zheng, Chengkun Wang, Jiwen Lu, Jie ZhouCVPR 2021
- Potential Field Based Deep Metric LearningShubhang Bhatnagar, Narendra AhujaCVPR 2025
